[PATCH 12/12; UPDATED] xen-ldt

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

 



Chris Wright wrote:

>* zach@xxxxxxxxxx (zach@xxxxxxxxxx) wrote:
>  
>
>>Add Xen accessors for LDT updates.
>>
>>Todo: Bring back return values from write_ldt_entry.
>>
>>Signed-off-by: Zachary Amsden <zach@xxxxxxxxxx>
>>Index: linux-2.6.13/arch/i386/kernel/ldt.c
>>===================================================================
>>--- linux-2.6.13.orig/arch/i386/kernel/ldt.c	2005-08-08 21:13:56.000000000 -0700
>>+++ linux-2.6.13/arch/i386/kernel/ldt.c	2005-08-08 21:16:15.000000000 -0700
>>@@ -18,6 +18,7 @@
>> #include <asm/system.h>
>> #include <asm/ldt.h>
>> #include <asm/desc.h>
>>+#include <hypervisor_hooks.h>
>>    
>>
>
>This is a departure from what we've done so far, which is to push things
>into subarch for relevant header.  I don't think we want to be
>specifying the hypervisor interface here/yet.  Esp. with generic term
>like these.
>
>  
>
>> #ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
>> static void flush_ldt(void *null)
>>@@ -58,16 +59,22 @@
>> #ifdef CONFIG_SMP
>> 		cpumask_t mask;
>> 		preempt_disable();
>>+		make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) / 
>>+								PAGE_SIZE);
>>    
>>
>
>As I mentioned earlier, this needs a different name.  It can map to
>readonly pages internal to hook.  This is about ldt handling.
>  
>

mark_ldt_pages(pc->ldt, (pc->size * LDT_ENTRY_SIZE) / PAGE_SIZE)

Note that this also moves the hook back into 
include/asm-i386/mach-default/mach_desc.h  - we could leave it in 
mach_ldt.h, but it seems rather wasteful to have mach_ldt.h, mach_gdt.h, 
mach_tss.h, etc..

I'm a little bit less sure about the purpose and naming of 
add_context_to_unpinned, del_context_from_unpinned.

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