Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247988
b: refs/heads/master
c: c5ca8e5
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity committed May 11, 2011
1 parent 95632a9 commit 208b0c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00eba012d53e63f620455f7013917e4bf59424f2
refs/heads/master: c5ca8e572c4d8cb8dec1cf5b3fc9c7066f6b2c29
9 changes: 7 additions & 2 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3902,6 +3902,7 @@ static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx)
|| vmx->exit_reason == EXIT_REASON_EXCEPTION_NMI))
return;

vmx->exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
exit_intr_info = vmx->exit_intr_info;

/* Handle machine checks before interrupts are enabled */
Expand All @@ -3919,7 +3920,7 @@ static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx)

static void vmx_recover_nmi_blocking(struct vcpu_vmx *vmx)
{
u32 exit_intr_info = vmx->exit_intr_info;
u32 exit_intr_info;
bool unblock_nmi;
u8 vector;
bool idtv_info_valid;
Expand All @@ -3929,6 +3930,11 @@ static void vmx_recover_nmi_blocking(struct vcpu_vmx *vmx)
if (cpu_has_virtual_nmis()) {
if (vmx->nmi_known_unmasked)
return;
/*
* Can't use vmx->exit_intr_info since we're not sure what
* the exit reason is.
*/
exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
unblock_nmi = (exit_intr_info & INTR_INFO_UNBLOCK_NMI) != 0;
vector = exit_intr_info & INTR_INFO_VECTOR_MASK;
/*
Expand Down Expand Up @@ -4176,7 +4182,6 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
vmx->launched = 1;

vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
vmx->exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);

vmx_complete_atomic_exit(vmx);
vmx_recover_nmi_blocking(vmx);
Expand Down

0 comments on commit 208b0c7

Please sign in to comment.