public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: Emulator: Opcode 0x80 gets a byte immediate
@ 2012-04-27 14:23 Nadav Amit
  2012-04-29  8:22 ` Gleb Natapov
  0 siblings, 1 reply; 2+ messages in thread
From: Nadav Amit @ 2012-04-27 14:23 UTC (permalink / raw)
  To: avi, mtosatti; +Cc: tglx, mingo, hpa, kvm, linux-kernel, x86, Nadav Amit

The single byte opcode 0x80 should get a byte immediate.
The previous emulation is broken for opcode 0x80.
---
 arch/x86/kvm/emulate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 8375622..dd53e53 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3464,7 +3464,7 @@ static struct opcode opcode_table[256] = {
 	/* 0x70 - 0x7F */
 	X16(D(SrcImmByte)),
 	/* 0x80 - 0x87 */
-	G(ByteOp | DstMem | SrcImm | ModRM | Group, group1),
+	G(ByteOp | DstMem | SrcImmByte | ModRM | Group, group1),
 	G(DstMem | SrcImm | ModRM | Group, group1),
 	G(ByteOp | DstMem | SrcImm | ModRM | No64 | Group, group1),
 	G(DstMem | SrcImmByte | ModRM | Group, group1),
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: Emulator: Opcode 0x80 gets a byte immediate
  2012-04-27 14:23 [PATCH] KVM: Emulator: Opcode 0x80 gets a byte immediate Nadav Amit
@ 2012-04-29  8:22 ` Gleb Natapov
  0 siblings, 0 replies; 2+ messages in thread
From: Gleb Natapov @ 2012-04-29  8:22 UTC (permalink / raw)
  To: Nadav Amit; +Cc: avi, mtosatti, tglx, mingo, hpa, kvm, linux-kernel, x86

On Fri, Apr 27, 2012 at 05:23:36PM +0300, Nadav Amit wrote:
> The single byte opcode 0x80 should get a byte immediate.
> The previous emulation is broken for opcode 0x80.
It is not. That what ByteOp is about.

> ---
>  arch/x86/kvm/emulate.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 8375622..dd53e53 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3464,7 +3464,7 @@ static struct opcode opcode_table[256] = {
>  	/* 0x70 - 0x7F */
>  	X16(D(SrcImmByte)),
>  	/* 0x80 - 0x87 */
> -	G(ByteOp | DstMem | SrcImm | ModRM | Group, group1),
> +	G(ByteOp | DstMem | SrcImmByte | ModRM | Group, group1),
>  	G(DstMem | SrcImm | ModRM | Group, group1),
>  	G(ByteOp | DstMem | SrcImm | ModRM | No64 | Group, group1),
>  	G(DstMem | SrcImmByte | ModRM | Group, group1),
> -- 
> 1.7.4.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

--
			Gleb.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-29  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 14:23 [PATCH] KVM: Emulator: Opcode 0x80 gets a byte immediate Nadav Amit
2012-04-29  8:22 ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox