proposed interface change for setting the ldt

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

 



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


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux