diff mbox

KVM: x86: Call-far should not be emulated as stack op

Message ID 1430673777-15451-1-git-send-email-namit@cs.technion.ac.il (mailing list archive)
State New, archived
Headers show

Commit Message

Nadav Amit May 3, 2015, 5:22 p.m. UTC
Far call in 64-bit has a 32-bit operand size. Remove the marking of this
operation as Stack so it can be emulated correctly in 64-bit.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
---
 arch/x86/kvm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini May 7, 2015, 9:31 a.m. UTC | #1
On 03/05/2015 19:22, Nadav Amit wrote:
> Far call in 64-bit has a 32-bit operand size. Remove the marking of this
> operation as Stack so it can be emulated correctly in 64-bit.
> 
> Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
> ---
>  arch/x86/kvm/emulate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 630bcb0..5839fc5 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3840,7 +3840,7 @@ static const struct opcode group5[] = {
>  	F(DstMem | SrcNone | Lock,		em_inc),
>  	F(DstMem | SrcNone | Lock,		em_dec),
>  	I(SrcMem | NearBranch,			em_call_near_abs),
> -	I(SrcMemFAddr | ImplicitOps | Stack,	em_call_far),
> +	I(SrcMemFAddr | ImplicitOps,		em_call_far),
>  	I(SrcMem | NearBranch,			em_jmp_abs),
>  	I(SrcMemFAddr | ImplicitOps,		em_jmp_far),
>  	I(SrcMem | Stack,			em_push), D(Undefined),
> 

Applied, thanks.

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

Patch

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 630bcb0..5839fc5 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3840,7 +3840,7 @@  static const struct opcode group5[] = {
 	F(DstMem | SrcNone | Lock,		em_inc),
 	F(DstMem | SrcNone | Lock,		em_dec),
 	I(SrcMem | NearBranch,			em_call_near_abs),
-	I(SrcMemFAddr | ImplicitOps | Stack,	em_call_far),
+	I(SrcMemFAddr | ImplicitOps,		em_call_far),
 	I(SrcMem | NearBranch,			em_jmp_abs),
 	I(SrcMemFAddr | ImplicitOps,		em_jmp_far),
 	I(SrcMem | Stack,			em_push), D(Undefined),