diff options
-rw-r--r-- | arch/x86/kvm/vmx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 5a87a58af49d..8d52bcf371df 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -7106,7 +7106,6 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) | |||
7106 | vmcs12->vm_entry_instruction_len); | 7106 | vmcs12->vm_entry_instruction_len); |
7107 | vmcs_write32(GUEST_INTERRUPTIBILITY_INFO, | 7107 | vmcs_write32(GUEST_INTERRUPTIBILITY_INFO, |
7108 | vmcs12->guest_interruptibility_info); | 7108 | vmcs12->guest_interruptibility_info); |
7109 | vmcs_write32(GUEST_ACTIVITY_STATE, vmcs12->guest_activity_state); | ||
7110 | vmcs_write32(GUEST_SYSENTER_CS, vmcs12->guest_sysenter_cs); | 7109 | vmcs_write32(GUEST_SYSENTER_CS, vmcs12->guest_sysenter_cs); |
7111 | kvm_set_dr(vcpu, 7, vmcs12->guest_dr7); | 7110 | kvm_set_dr(vcpu, 7, vmcs12->guest_dr7); |
7112 | vmcs_writel(GUEST_RFLAGS, vmcs12->guest_rflags); | 7111 | vmcs_writel(GUEST_RFLAGS, vmcs12->guest_rflags); |
@@ -7325,6 +7324,11 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch) | |||
7325 | return 1; | 7324 | return 1; |
7326 | } | 7325 | } |
7327 | 7326 | ||
7327 | if (vmcs12->guest_activity_state != GUEST_ACTIVITY_ACTIVE) { | ||
7328 | nested_vmx_failValid(vcpu, VMXERR_ENTRY_INVALID_CONTROL_FIELD); | ||
7329 | return 1; | ||
7330 | } | ||
7331 | |||
7328 | if ((vmcs12->cpu_based_vm_exec_control & CPU_BASED_USE_MSR_BITMAPS) && | 7332 | if ((vmcs12->cpu_based_vm_exec_control & CPU_BASED_USE_MSR_BITMAPS) && |
7329 | !IS_ALIGNED(vmcs12->msr_bitmap, PAGE_SIZE)) { | 7333 | !IS_ALIGNED(vmcs12->msr_bitmap, PAGE_SIZE)) { |
7330 | /*TODO: Also verify bits beyond physical address width are 0*/ | 7334 | /*TODO: Also verify bits beyond physical address width are 0*/ |
@@ -7555,7 +7559,6 @@ static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) | |||
7555 | vmcs12->guest_gdtr_base = vmcs_readl(GUEST_GDTR_BASE); | 7559 | vmcs12->guest_gdtr_base = vmcs_readl(GUEST_GDTR_BASE); |
7556 | vmcs12->guest_idtr_base = vmcs_readl(GUEST_IDTR_BASE); | 7560 | vmcs12->guest_idtr_base = vmcs_readl(GUEST_IDTR_BASE); |
7557 | 7561 | ||
7558 | vmcs12->guest_activity_state = vmcs_read32(GUEST_ACTIVITY_STATE); | ||
7559 | vmcs12->guest_interruptibility_info = | 7562 | vmcs12->guest_interruptibility_info = |
7560 | vmcs_read32(GUEST_INTERRUPTIBILITY_INFO); | 7563 | vmcs_read32(GUEST_INTERRUPTIBILITY_INFO); |
7561 | vmcs12->guest_pending_dbg_exceptions = | 7564 | vmcs12->guest_pending_dbg_exceptions = |