Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80638
b: refs/heads/master
c: a22436b
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Vivier authored and Avi Kivity committed Jan 30, 2008
1 parent 38426eb commit 34164b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: e4f8e03956de4b1a1dc4bbbdefa9c973d01ee91f
refs/heads/master: a22436b7b8ec9b14a0451d9ac0fdc9d370bd7800
10 changes: 7 additions & 3 deletions trunk/drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
u16 error_code,
int no_decode)
{
int r = 0;
int r;

vcpu->mmio_fault_cr2 = cr2;
kvm_x86_ops->cache_regs(vcpu);
Expand Down Expand Up @@ -1294,10 +1294,14 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
get_segment_base(vcpu, VCPU_SREG_FS);

r = x86_decode_insn(&vcpu->emulate_ctxt, &emulate_ops);
if (r) {
if (kvm_mmu_unprotect_page_virt(vcpu, cr2))
return EMULATE_DONE;
return EMULATE_FAIL;
}
}

if (r == 0)
r = x86_emulate_insn(&vcpu->emulate_ctxt, &emulate_ops);
r = x86_emulate_insn(&vcpu->emulate_ctxt, &emulate_ops);

if (vcpu->pio.string)
return EMULATE_DO_MMIO;
Expand Down

0 comments on commit 34164b3

Please sign in to comment.