diff options
author | Avi Kivity <avi@redhat.com> | 2009-12-06 10:21:14 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:35:39 -0500 |
commit | cdc0e24456bf5678f63497569c3676c9019f82c1 (patch) | |
tree | cbbe377ec0717fb747c41b9ef5c3c87de61655b9 /arch/x86/kvm/vmx.c | |
parent | 59708670b639bff00f92e519df1ae14da240e919 (diff) |
KVM: VMX: Move some cr[04] related constants to vmx.c
They have no place in common code.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 8a8e13965076..efbb614ccd36 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -61,6 +61,19 @@ module_param_named(unrestricted_guest, | |||
61 | static int __read_mostly emulate_invalid_guest_state = 0; | 61 | static int __read_mostly emulate_invalid_guest_state = 0; |
62 | module_param(emulate_invalid_guest_state, bool, S_IRUGO); | 62 | module_param(emulate_invalid_guest_state, bool, S_IRUGO); |
63 | 63 | ||
64 | #define KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST \ | ||
65 | (X86_CR0_WP | X86_CR0_NE | X86_CR0_NW | X86_CR0_CD) | ||
66 | #define KVM_GUEST_CR0_MASK \ | ||
67 | (KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST | X86_CR0_PG | X86_CR0_PE) | ||
68 | #define KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST \ | ||
69 | (X86_CR0_WP | X86_CR0_NE | X86_CR0_TS | X86_CR0_MP) | ||
70 | #define KVM_VM_CR0_ALWAYS_ON \ | ||
71 | (KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST | X86_CR0_PG | X86_CR0_PE) | ||
72 | #define KVM_GUEST_CR4_MASK \ | ||
73 | (X86_CR4_VME | X86_CR4_PSE | X86_CR4_PAE | X86_CR4_PGE | X86_CR4_VMXE) | ||
74 | #define KVM_PMODE_VM_CR4_ALWAYS_ON (X86_CR4_PAE | X86_CR4_VMXE) | ||
75 | #define KVM_RMODE_VM_CR4_ALWAYS_ON (X86_CR4_VME | X86_CR4_PAE | X86_CR4_VMXE) | ||
76 | |||
64 | /* | 77 | /* |
65 | * These 2 parameters are used to config the controls for Pause-Loop Exiting: | 78 | * These 2 parameters are used to config the controls for Pause-Loop Exiting: |
66 | * ple_gap: upper bound on the amount of time between two successive | 79 | * ple_gap: upper bound on the amount of time between two successive |