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

Re: [Xen-devel] [PATCH 9/18 V2]: PVH xen: create PVH vmcs, and initialization

>>> On 19.03.13 at 02:00, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> On Mon, 18 Mar 2013 11:28:43 -0400 Konrad Rzeszutek Wilk 
> <konrad.wilk@xxxxxxxxxx> wrote:
>> On Fri, Mar 15, 2013 at 05:39:25PM -0700, Mukesh Rathor wrote:
>> > +    __vmwrite(GUEST_CS_SELECTOR, 0x10);
>> 0x10. Could you use a #define for it? Somehow I thought it would
>> be running in FLAT_KERNEL_CS but that would be odd. And of course
>> since are booting in the Linux kernel without the PV MMU we would
>> be using its native segments. So this would correspond to
>> GDT_ENTRY_KERNEL_CS right? Might want to mention that
>> so if the Linux kernel alters its GDT page we don't blow up?
>> Thought I guess it does not matter - this is just the initial
>> bootstrap segments. Presumarily the load_gdt in the Linux kernel
>> later on resets it to whatever the "new" GDT is.
> Correct:
> #define __KERNEL_CS     (GDT_ENTRY_KERNEL_CS*8)

What Linux does, or what selector values it uses doesn't matter
at all here. Whatever value you want to put there, it needs an
explanation if it's not one of the Xen defined ones (in particular
if the value was arbitrarily chosen, as that would leave future
readers completely clueless).

Perhaps to some degree the same also goes for the descriptor
attributes that you store, albeit one can certainly reconstruct
why the value was chosen the way it is.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.