move global x2apic_enabled into arch dir

the x2apic_enabled should be x86 specific field.

Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Xu, Anthony <anthony.xu@intel.com>
This commit is contained in:
Jason Chen CJ 2018-07-29 18:17:01 +08:00 committed by lijinxia
parent 72f9c9a26e
commit 63ef1236de
4 changed files with 5 additions and 3 deletions

View File

@ -27,6 +27,9 @@ volatile uint16_t up_count = 0U;
/* physical cpu active bitmap, support up to 64 cpus */
uint64_t pcpu_active_bitmap = 0UL;
/* X2APIC mode is disabled by default. */
bool x2apic_enabled = false;
/* TODO: add more capability per requirement */
/* APICv features */
#define VAPIC_FEATURE_VIRT_ACCESS (1U << 0)

View File

@ -6,6 +6,8 @@
#include <hypervisor.h>
extern bool x2apic_enabled;
static inline struct vcpuid_entry *find_vcpuid_entry(struct vcpu *vcpu,
uint32_t leaf_arg, uint32_t subleaf)
{

View File

@ -8,8 +8,6 @@
#include <schedule.h>
#include <softirq.h>
bool x2apic_enabled;
static void run_vcpu_pre_work(struct vcpu *vcpu)
{
uint64_t *pending_pre_work = &vcpu->pending_pre_work;

View File

@ -190,6 +190,5 @@ struct vm *get_vm_from_vmid(uint16_t vm_id);
extern struct list_head vm_list;
extern spinlock_t vm_list_lock;
extern bool x2apic_enabled;
#endif /* VM_H_ */