[PATCH 2/2] Transparent privilege levels in entry.S

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

 



* zach@xxxxxxxxxx (zach@xxxxxxxxxx) wrote:
> i386 Transparent Paravirtualization Patch #2
> 
> Changes required to low level fault / system call code for supporting
> transparent paravirtualization where the kernel may be running at non-zero
> CPL.
> 
> The testing of VM_MASK and CS together uses a neat trick which is now extended
> to support CPL 0,1,2 kernels.

Hmm, I expected a simple macro there, but that's an interesting one.  I
suspect it needs a nice comment if that's the way we go.

> Note that assembly code must test against __ESPFIX_SS, the 16-bit stack on
> interrupts and exceptions.  To do so at non-zero CPL requires masking off
> the RPL of the selector (which is a nop for the mach-default implementation).

Hmm, OK, Xen just removes that code IIRC.  I'll have to go back and look
closely.  Do you have test cases for these?  I'd really prefer to test
these less obvious kind of changes.

> Also, there is no reason to load __KERNEL_DS into %ds or %es.  __KERNEL_DS
> is actually quite poorly named, and is in fact the kernel stack selector.  The
> kernel uses __USER_DS internally as both %es and %ds (since it is a flat CPL-3
> accessible data segment that allows the kernel to skip reloading segments on
> sysexit).  The reason for avoiding the __KERNEL_DS macro is it is predefined
> as an RPL zero segment.

Hmm, this one is also not exactly intuitive.

[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