Skip to content

Commit cf3646e

Browse files
Sean Christophersonbonzini
authored andcommitted
KVM: VMX: Expose misc variables needed for nested VMX
Exposed vmx_msr_index, vmx_return and host_efer via vmx.h so that the nested code can be moved out of vmx.c. Signed-off-by: Sean Christopherson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent ff24148 commit cf3646e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

arch/x86/kvm/vmx/vmx.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ module_param(ple_window_shrink, uint, 0444);
187187
static unsigned int ple_window_max = KVM_VMX_DEFAULT_PLE_WINDOW_MAX;
188188
module_param(ple_window_max, uint, 0444);
189189

190-
extern const ulong vmx_return;
191190
extern const ulong vmx_early_consistency_check_return;
192191

193192
static DEFINE_STATIC_KEY_FALSE(vmx_l1d_should_flush);
@@ -437,15 +436,15 @@ static const struct kvm_vmx_segment_field {
437436
VMX_SEGMENT_FIELD(LDTR),
438437
};
439438

440-
static u64 host_efer;
439+
u64 host_efer;
441440

442441
static void ept_save_pdptrs(struct kvm_vcpu *vcpu);
443442

444443
/*
445444
* Keep MSR_STAR at the end, as setup_msrs() will try to optimize it
446445
* away by decrementing the array size.
447446
*/
448-
static const u32 vmx_msr_index[] = {
447+
const u32 vmx_msr_index[] = {
449448
#ifdef CONFIG_X86_64
450449
MSR_SYSCALL_MASK, MSR_LSTAR, MSR_CSTAR,
451450
#endif

arch/x86/kvm/vmx/vmx.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#include "ops.h"
1111
#include "vmcs.h"
1212

13+
extern const u32 vmx_msr_index[];
14+
extern const ulong vmx_return;
15+
extern u64 host_efer;
16+
1317
#define MSR_TYPE_R 1
1418
#define MSR_TYPE_W 2
1519
#define MSR_TYPE_RW 3

0 commit comments

Comments
 (0)