All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86 emulator: Add stc instruction (opcode 0xf9)
@ 2010-08-05 12:42 Mohammed Gamal
  2010-08-05 12:49 ` Gleb Natapov
  0 siblings, 1 reply; 4+ messages in thread
From: Mohammed Gamal @ 2010-08-05 12:42 UTC (permalink / raw)
  To: avi; +Cc: mtosatti, kvm, Mohammed Gamal

Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
---
 arch/x86/kvm/emulate.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index f0f4a43..f345df0 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2269,7 +2269,7 @@ static struct opcode opcode_table[256] = {
 	N, N, N, N,
 	D(ImplicitOps | Priv), D(ImplicitOps), G(ByteOp, group3), G(0, group3),
 	/* 0xF8 - 0xFF */
-	D(ImplicitOps), N, D(ImplicitOps), D(ImplicitOps),
+	D(ImplicitOps), D(ImplicitOps), D(ImplicitOps), D(ImplicitOps),
 	D(ImplicitOps), D(ImplicitOps), G(0, group4), G(0, group5),
 };
 
@@ -3129,6 +3129,10 @@ special_insn:
 		ctxt->eflags &= ~EFLG_CF;
 		c->dst.type = OP_NONE;	/* Disable writeback. */
 		break;
+	case 0xf9: /* stc */
+		ctxt->eflags |= EFLG_CF;
+		c->dst.type = OP_NONE;	/* Disable writeback */
+		break;
 	case 0xfa: /* cli */
 		if (emulator_bad_iopl(ctxt, ops)) {
 			emulate_gp(ctxt, 0);
-- 
1.7.0.4


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

* Re: [PATCH] x86 emulator: Add stc instruction (opcode 0xf9)
  2010-08-05 12:42 [PATCH] x86 emulator: Add stc instruction (opcode 0xf9) Mohammed Gamal
@ 2010-08-05 12:49 ` Gleb Natapov
  2010-08-05 13:01   ` Mohammed Gamal
  0 siblings, 1 reply; 4+ messages in thread
From: Gleb Natapov @ 2010-08-05 12:49 UTC (permalink / raw)
  To: Mohammed Gamal; +Cc: avi, mtosatti, kvm

On Thu, Aug 05, 2010 at 03:42:49PM +0300, Mohammed Gamal wrote:
> Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
> ---
>  arch/x86/kvm/emulate.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index f0f4a43..f345df0 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -2269,7 +2269,7 @@ static struct opcode opcode_table[256] = {
>  	N, N, N, N,
>  	D(ImplicitOps | Priv), D(ImplicitOps), G(ByteOp, group3), G(0, group3),
>  	/* 0xF8 - 0xFF */
> -	D(ImplicitOps), N, D(ImplicitOps), D(ImplicitOps),
> +	D(ImplicitOps), D(ImplicitOps), D(ImplicitOps), D(ImplicitOps),
>  	D(ImplicitOps), D(ImplicitOps), G(0, group4), G(0, group5),
>  };
>  
> @@ -3129,6 +3129,10 @@ special_insn:
>  		ctxt->eflags &= ~EFLG_CF;
>  		c->dst.type = OP_NONE;	/* Disable writeback. */
>  		break;
> +	case 0xf9: /* stc */
> +		ctxt->eflags |= EFLG_CF;
> +		c->dst.type = OP_NONE;	/* Disable writeback */
With "disable writeback when decode dest operand" patch (which should be
applied already) this is no longer needed.

> +		break;
>  	case 0xfa: /* cli */
>  		if (emulator_bad_iopl(ctxt, ops)) {
>  			emulate_gp(ctxt, 0);
> -- 
> 1.7.0.4
> 
> --
> 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

--
			Gleb.

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

* Re: [PATCH] x86 emulator: Add stc instruction (opcode 0xf9)
  2010-08-05 12:49 ` Gleb Natapov
@ 2010-08-05 13:01   ` Mohammed Gamal
  2010-08-05 13:12     ` Avi Kivity
  0 siblings, 1 reply; 4+ messages in thread
From: Mohammed Gamal @ 2010-08-05 13:01 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: avi, mtosatti, kvm

On Thu, Aug 5, 2010 at 3:49 PM, Gleb Natapov <gleb@redhat.com> wrote:
> On Thu, Aug 05, 2010 at 03:42:49PM +0300, Mohammed Gamal wrote:
>> Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
>> ---
>>  arch/x86/kvm/emulate.c |    6 +++++-
>>  1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
>> index f0f4a43..f345df0 100644
>> --- a/arch/x86/kvm/emulate.c
>> +++ b/arch/x86/kvm/emulate.c
>> @@ -2269,7 +2269,7 @@ static struct opcode opcode_table[256] = {
>>       N, N, N, N,
>>       D(ImplicitOps | Priv), D(ImplicitOps), G(ByteOp, group3), G(0, group3),
>>       /* 0xF8 - 0xFF */
>> -     D(ImplicitOps), N, D(ImplicitOps), D(ImplicitOps),
>> +     D(ImplicitOps), D(ImplicitOps), D(ImplicitOps), D(ImplicitOps),
>>       D(ImplicitOps), D(ImplicitOps), G(0, group4), G(0, group5),
>>  };
>>
>> @@ -3129,6 +3129,10 @@ special_insn:
>>               ctxt->eflags &= ~EFLG_CF;
>>               c->dst.type = OP_NONE;  /* Disable writeback. */
>>               break;
>> +     case 0xf9: /* stc */
>> +             ctxt->eflags |= EFLG_CF;
>> +             c->dst.type = OP_NONE;  /* Disable writeback */
> With "disable writeback when decode dest operand" patch (which should be
> applied already) this is no longer needed.
Right. Should I wait for it to be merged and resend?
>
>> +             break;
>>       case 0xfa: /* cli */
>>               if (emulator_bad_iopl(ctxt, ops)) {
>>                       emulate_gp(ctxt, 0);
>> --
>> 1.7.0.4
>>
>> --
>> 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
>
> --
>                        Gleb.
>

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

* Re: [PATCH] x86 emulator: Add stc instruction (opcode 0xf9)
  2010-08-05 13:01   ` Mohammed Gamal
@ 2010-08-05 13:12     ` Avi Kivity
  0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2010-08-05 13:12 UTC (permalink / raw)
  To: Mohammed Gamal; +Cc: Gleb Natapov, mtosatti, kvm

  On 08/05/2010 04:01 PM, Mohammed Gamal wrote:
> On Thu, Aug 5, 2010 at 3:49 PM, Gleb Natapov<gleb@redhat.com>  wrote:
>> On Thu, Aug 05, 2010 at 03:42:49PM +0300, Mohammed Gamal wrote:
>>> Signed-off-by: Mohammed Gamal<m.gamal005@gmail.com>
>>> ---
>>>   arch/x86/kvm/emulate.c |    6 +++++-
>>>   1 files changed, 5 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
>>> index f0f4a43..f345df0 100644
>>> --- a/arch/x86/kvm/emulate.c
>>> +++ b/arch/x86/kvm/emulate.c
>>> @@ -2269,7 +2269,7 @@ static struct opcode opcode_table[256] = {
>>>        N, N, N, N,
>>>        D(ImplicitOps | Priv), D(ImplicitOps), G(ByteOp, group3), G(0, group3),
>>>        /* 0xF8 - 0xFF */
>>> -     D(ImplicitOps), N, D(ImplicitOps), D(ImplicitOps),
>>> +     D(ImplicitOps), D(ImplicitOps), D(ImplicitOps), D(ImplicitOps),
>>>        D(ImplicitOps), D(ImplicitOps), G(0, group4), G(0, group5),
>>>   };
>>>
>>> @@ -3129,6 +3129,10 @@ special_insn:
>>>                ctxt->eflags&= ~EFLG_CF;
>>>                c->dst.type = OP_NONE;  /* Disable writeback. */
>>>                break;
>>> +     case 0xf9: /* stc */
>>> +             ctxt->eflags |= EFLG_CF;
>>> +             c->dst.type = OP_NONE;  /* Disable writeback */
>> With "disable writeback when decode dest operand" patch (which should be
>> applied already) this is no longer needed.
> Right. Should I wait for it to be merged and resend?

It's merged (in next branch), but I'll just drop that line when applying.

-- 
error compiling committee.c: too many arguments to function


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

end of thread, other threads:[~2010-08-05 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 12:42 [PATCH] x86 emulator: Add stc instruction (opcode 0xf9) Mohammed Gamal
2010-08-05 12:49 ` Gleb Natapov
2010-08-05 13:01   ` Mohammed Gamal
2010-08-05 13:12     ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.