[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: Add GS base to HVM VCPU context
On 23/04/2012 20:11, "Aravindh Puthiyaparambil" <aravindh@xxxxxxxxxxxx> wrote: >>>>> +#ifdef __x86_64__ >>>>> + if ( ring_0(&c.nat->user_regs) ) >>>>> + c.nat->gs_base_kernel = sreg.base; >>>>> + else >>>>> + c.nat->gs_base_user = sreg.base; >>>>> +#endif >>>> >>>> If you do anything like this, do it completely please (i.e. fill all three >>>> base address fields instead of just one). >>>> >>> >>> Sure. I was not sure if it was ok to add fields to the vcpu context >>> structure which is why I didn't do it across the board. I will do so and >>> resubmit. >> >> I don't see what fields you would need to add. > > Don't I need to add ss_base, cs_base, es_base, ds_base to > vcpu_guest_context? I am assuming both 32-bit and 64-bit cases. Only the existing (x86_64-only) fs_base, gs_base_kernel, gs_base_user fields need be filled in. All other base addresses are zero in 64-bit mode, and in 32-bit mode the base addresses are obtained from the GDT/LDT when the segment register is loaded, and so do not need to be stored in the vcpu_context. -- Keir > Aravindh > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |