x86 emulator: Add missing decoder flags for sub instruction
PATCH 1/2 x86 emulator: Add missing decoder flags for sub instruction
This adds missing decoder flags for sub instructions (opcodes 0x2c - 0x2d)
--- arch/x86/kvm/emulate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +1 -1
@@ -126,7 +126,7 @@ static u32 opcode_table[256] = {/* 0x28 - 0x2F */ ByteOp | DstMem | SrcReg | ModRM | Lock, DstMem | SrcReg | ModRM | Lock, ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM, -0 ,0 ,0 ,0 , + ByteOp | DstAcc | SrcImmByte, DstAcc | SrcImm,0 ,0 ,/* 0x30 - 0x37 */ ByteOp | DstMem | SrcReg | ModRM | Lock, DstMem | SrcReg | ModRM | Lock, ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM,
Signature · 1 line
1.7.0.4
PATCH 2/2 x86 emulator: Add missing decoder flags for xor instructions
This adds missing decoder flags for xor instructions (opcodes 0x34 - 0x35)
--- arch/x86/kvm/emulate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +1 -1
@@ -130,7 +130,7 @@ static u32 opcode_table[256] = {/* 0x30 - 0x37 */ ByteOp | DstMem | SrcReg | ModRM | Lock, DstMem | SrcReg | ModRM | Lock, ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM, -0 ,0 ,0 ,0 , + ByteOp | DstAcc | SrcImmByte, DstAcc | SrcImm,0 ,0 ,/* 0x38 - 0x3F */ ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM,
Signature · 1 line
1.7.0.4
Quoted 3 lines · Mohammed Gamal
This adds missing decoder flags for sub instructions (opcodes
0x2c-0x2d)
Looks good (both patches). Please post test cases for realmode.c.
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
Marcelo Tosatti
AppliedQuoted 6 lines · Mohammed Gamal
This adds missing decoder flags for sub instructions (opcodes
0x2c-0x2d)Signed-off-by Mohammed Gamal <[email protected]>--- arch/x86/kvm/emulate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied both, thanks.
Quoted 11 lines · Marcelo Tosatti
Quoted 6 lines · Mohammed Gamal
This adds missing decoder flags for sub instructions (opcodes
0x2c-0x2d)Signed-off-by Mohammed Gamal <[email protected]>---
arch/x86/kvm/emulate.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)Applied both, thanks.
Thanks Marcelo, please also take a look at the test cases for these instructions that I posted to the mailing list.