diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-04-28 16:15:25 (GMT) |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 07:35:29 (GMT) |
commit | b8a98945ea5b735e083eaf92906aa0ff9ece92e8 (patch) | |
tree | 3eefe44ffc5035f0ed281ede1f63c866a67b28c4 /arch/x86 | |
parent | f0c13ef1a8f31be08bf1b1244fe4565f11f4b009 (diff) | |
download | linux-fsl-qoriq-b8a98945ea5b735e083eaf92906aa0ff9ece92e8.tar.xz |
KVM: x86 emulator: cleanup nop emulation
Make it more explicit what we are checking for.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/emulate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index a99d49c..03a7291 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2799,8 +2799,8 @@ special_insn: goto done; break; case 0x90: /* nop / xchg r8,rax */ - if (!(c->rex_prefix & 1)) { /* nop */ - c->dst.type = OP_NONE; + if (c->dst.ptr == (unsigned long *)&c->regs[VCPU_REGS_RAX]) { + c->dst.type = OP_NONE; /* nop */ break; } case 0x91 ... 0x97: /* xchg reg,rax */ |