Skip to content

Commit 63ef123

Browse files
JasonChenCJlijinxia
authored andcommitted
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>
1 parent 72f9c9a commit 63ef123

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

hypervisor/arch/x86/cpu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ volatile uint16_t up_count = 0U;
2727
/* physical cpu active bitmap, support up to 64 cpus */
2828
uint64_t pcpu_active_bitmap = 0UL;
2929

30+
/* X2APIC mode is disabled by default. */
31+
bool x2apic_enabled = false;
32+
3033
/* TODO: add more capability per requirement */
3134
/* APICv features */
3235
#define VAPIC_FEATURE_VIRT_ACCESS (1U << 0)

hypervisor/arch/x86/cpuid.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
#include <hypervisor.h>
88

9+
extern bool x2apic_enabled;
10+
911
static inline struct vcpuid_entry *find_vcpuid_entry(struct vcpu *vcpu,
1012
uint32_t leaf_arg, uint32_t subleaf)
1113
{

hypervisor/common/hv_main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include <schedule.h>
99
#include <softirq.h>
1010

11-
bool x2apic_enabled;
12-
1311
static void run_vcpu_pre_work(struct vcpu *vcpu)
1412
{
1513
uint64_t *pending_pre_work = &vcpu->pending_pre_work;

hypervisor/include/arch/x86/guest/vm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,5 @@ struct vm *get_vm_from_vmid(uint16_t vm_id);
190190

191191
extern struct list_head vm_list;
192192
extern spinlock_t vm_list_lock;
193-
extern bool x2apic_enabled;
194193

195194
#endif /* VM_H_ */

0 commit comments

Comments
 (0)