Re: [PATCH 1/4] KVM: Fix x86_decode_insn() return code check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/04/2011 03:14 PM, Avi Kivity wrote:
x86_decode_insn() doesn't return X86EMUL_* values, it returns
EMULATION_* codes.  Adjust the check.

Signed-off-by: Avi Kivity<avi@xxxxxxxxxx>
---
  arch/x86/kvm/x86.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index fa708c9..b20499d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4391,7 +4391,7 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
  		vcpu->arch.emulate_ctxt.perm_ok = false;

  		r = x86_decode_insn(&vcpu->arch.emulate_ctxt, insn, insn_len);
-		if (r == X86EMUL_PROPAGATE_FAULT)
+		if (r != EMULATION_OK)
  			goto done;

  		trace_kvm_emulate_insn_start(vcpu);

Strangely, this patch causes a failure in Windows XP. Dropping until submitter investigates and fixes.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux