summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorWei Yongjun2010-08-05 10:34:39 +0200
committerAvi Kivity2010-10-24 10:50:59 +0200
commitd3ad6243293d92c82530a50c77d71bb0a0a42fdc (patch)
tree203846ec7528cef3086a417a84ea646344db0b86 /arch/x86
parentKVM: PPC: Move KVM trampolines before __end_interrupts (diff)
downloadkernel-qcow2-linux-d3ad6243293d92c82530a50c77d71bb0a0a42fdc.tar.gz
kernel-qcow2-linux-d3ad6243293d92c82530a50c77d71bb0a0a42fdc.tar.xz
kernel-qcow2-linux-d3ad6243293d92c82530a50c77d71bb0a0a42fdc.zip
KVM: x86 emulator: simplify two-byte opcode check
Two-byte opcode always start with 0x0F and the decode flags of opcode 0xF0 is always 0, so remove dup check. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/emulate.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index ddbad15c9486..a9a4a0b78a7d 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2375,13 +2375,11 @@ done_prefixes:
/* Opcode byte(s). */
opcode = opcode_table[c->b];
- if (opcode.flags == 0) {
- /* Two-byte opcode? */
- if (c->b == 0x0f) {
- c->twobyte = 1;
- c->b = insn_fetch(u8, 1, c->eip);
- opcode = twobyte_table[c->b];
- }
+ /* Two-byte opcode? */
+ if (c->b == 0x0f) {
+ c->twobyte = 1;
+ c->b = insn_fetch(u8, 1, c->eip);
+ opcode = twobyte_table[c->b];
}
c->d = opcode.flags;