Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133707
b: refs/heads/master
c: 8b3079a
h: refs/heads/master
i:
  133705: eda0159
  133703: 34b6d65
v: v3
  • Loading branch information
Avi Kivity committed Mar 24, 2009
1 parent 35a984f commit 29bcce4
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 350f69dcd169d536307aa4a8c38c480e3a51c0db
refs/heads/master: 8b3079a5c0c031de07c8390aa160a4229088274f
8 changes: 6 additions & 2 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ struct vcpu_vmx {
} rmode;
int vpid;
bool emulation_required;
enum emulation_result invalid_state_emulation_result;

/* Support for vnmi-less CPUs */
int soft_vnmi_blocked;
Expand Down Expand Up @@ -3130,7 +3131,8 @@ static int handle_nmi_window(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
struct kvm_run *kvm_run)
{
int err;
struct vcpu_vmx *vmx = to_vmx(vcpu);
enum emulation_result err = EMULATE_DONE;

preempt_enable();
local_irq_enable();
Expand All @@ -3154,6 +3156,8 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,

local_irq_disable();
preempt_disable();

vmx->invalid_state_emulation_result = err;
}

/*
Expand Down Expand Up @@ -3205,7 +3209,7 @@ static int kvm_handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
if (vmx->emulation_required && emulate_invalid_guest_state) {
if (guest_state_valid(vcpu))
vmx->emulation_required = 0;
return 0;
return vmx->invalid_state_emulation_result != EMULATE_DO_MMIO;
}

/* Access CR3 don't cause VMExit in paging mode, so we need
Expand Down

0 comments on commit 29bcce4

Please sign in to comment.