Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215908
b: refs/heads/master
c: 49e9d55
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity committed Oct 24, 2010
1 parent 8134c67 commit d6b11eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a92601bb707f6f49fd5563ef3d09928e70cc222e
refs/heads/master: 49e9d557f9b6e9639390b63b645f2def8dde5f1b
9 changes: 9 additions & 0 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3582,8 +3582,17 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
struct vcpu_vmx *vmx = to_vmx(vcpu);
enum emulation_result err = EMULATE_DONE;
int ret = 1;
u32 cpu_exec_ctrl;
bool intr_window_requested;

cpu_exec_ctrl = vmcs_read32(CPU_BASED_VM_EXEC_CONTROL);
intr_window_requested = cpu_exec_ctrl & CPU_BASED_VIRTUAL_INTR_PENDING;

while (!guest_state_valid(vcpu)) {
if (intr_window_requested
&& (kvm_get_rflags(&vmx->vcpu) & X86_EFLAGS_IF))
return handle_interrupt_window(&vmx->vcpu);

err = emulate_instruction(vcpu, 0, 0, 0);

if (err == EMULATE_DO_MMIO) {
Expand Down

0 comments on commit d6b11eb

Please sign in to comment.