Re: [PATCH] x86 emulator: Add 'push es' instruction (opcode 0x06)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 17, 2009 at 11:03 AM, Avi Kivity<avi@xxxxxxxxxx> wrote:
> On 08/16/2009 08:51 PM, Mohammed Gamal wrote:
>>
>> +static void emulate_push_sreg(struct x86_emulate_ctxt *ctxt, int seg)
>> +{
>> +       struct decode_cache *c =&ctxt->decode;
>> +       struct kvm_segment segment;
>> +       kvm_x86_ops->get_segment(ctxt->vcpu,&segment, seg);
>> +       c->src.ptr = (unsigned long *)&segment.selector;
>> +       emulate_push(ctxt);
>> +}
>>
>
> This will pick up random junk from segment.type if used in 32-bit mode,
> since segment.selector is only 16 bits wide.
>
> btw, I see that emulate_push() uses src.val, not src.ptr.  Have you tested
> this?
>
Hmmm, there are no test cases that test conventional push/pop
instructions. I'll write a test case and see if the function behaves
correctly.

>
> --
> error compiling committee.c: too many arguments to function
>
>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux