Jeremy Fitzhardinge wrote:
> A better interface for us would be simply:
>
>     set_ldt(const struct desc_struct *ldt, int num_entries);
>
> since this maps directly to the appropriate Xen hypercall.  If you 
> still want to implement it by plugging the LDT descriptor into the GDT 
> and then lldt, then there's no reason you can't implement it that way.
>
> Thoughts?

This interface doesn't work for anything other than Xen.  It is 
impossible to implement it without specific knowledge of kernel 
internals, since it doesn't provide the GDT selector for the LDT.  Now 
everything that looks like real hardware needs to move the knowledge of 
the LDT structure into paravirt-ops, and it has no clear calling 
convention, so you've now got to reason about SMP preemption correctness 
inside the paravirt-op, instead of at the higher level where it should 
be done.

This is an example of one place where Xen has broken the x86 
architecture in favor of a simpler implementation of the hypervisor, but 
a radical change to the kernel.  It is one of the reasons why XenoLinux 
as implemented is unable to boot on native hardware.  I would strongly 
prefer if we didn't introduce this ugliness into paravirt-ops.

Zach
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/virtualization

Reply via email to