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

[Xen-devel] [PATCH] 4-level shadow mode support for x86_64 domU and VMX domains


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
  • Date: Sun, 10 Jul 2005 22:40:54 -0700
  • Delivery-date: Mon, 11 Jul 2005 05:39:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcWAdj6HIOOy1PNlTDibSuwbwqbMUwFYTgbg
  • Thread-topic: [PATCH] 4-level shadow mode support for x86_64 domU and VMX domains

Now we have extended the patch to support x86_64 domU as well. The
shadow mode survived with the domU running lmbench, ltp, kernbench, etc.
by running a script that enables shadow LOGDIRTY mode, CLEAN, and
disables at 5-second intervals in an infinite loop. Thanks Ian for
providing the Python script. Tested x86 domU and VMX domains as well.
Big ones are all new, and are used for 64-bit only. Please apply.

We also verified that shadow_64.c and shadow_public.c could be built for
x86 and that they worked fine there. We can provide a small patch that
does it (once the code is in ;-).

 b/xen/arch/x86/shadow_64.c            | 2938
++++++++++++++++++++++++++++++++++
 b/xen/arch/x86/shadow_public.c        | 1654 +++++++++++++++++++
 b/xen/include/asm-x86/page-guest32.h  |  107 +
 b/xen/include/asm-x86/shadow_64.h     |  504 +++++
 b/xen/include/asm-x86/shadow_public.h |   59 
 xen/arch/x86/Makefile                 |    5 
 xen/arch/x86/audit.c                  |    2 
 xen/arch/x86/domain.c                 |    2 
 xen/arch/x86/shadow.c                 |    2 
 xen/arch/x86/traps.c                  |    3 
 xen/arch/x86/vmx.c                    |   10 
 xen/arch/x86/vmx_platform.c           |    4 
 xen/arch/x86/vmx_vmcs.c               |    5 
 xen/include/asm-x86/domain.h          |    1 
 xen/include/asm-x86/mm.h              |   27 
 xen/include/asm-x86/page.h            |    8 
 xen/include/asm-x86/shadow.h          |   27 
 17 files changed, 5332 insertions(+), 26 deletions(-)

Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx>
Signed-off-by: Chengyuan Li <chengyuan.li@xxxxxxxxx>
Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxx>

Jun
---
Intel Open Source Technology Center

Nakajima, Jun wrote:
> Combined with the previous two patches, this patch now allows the
> current Xen in the tree to run unmodified x86_64 guests. We tested
> the UP kernel as is in x86_64 FC3 booting from a partition installed.
> It booted from the boot grub loader using vmxassist using the guest
> BIOS in QEMU, i.e. in the exactly same fashion as the native system
> does. We needed to disable local/IO APIC via the boot parameters
> because those device models are not in yet, but that's preferable
> because we can avoid timer interrupts from the local APIC that way.  
> 
> The x86_64 Linux in the VMX domain seems very stable. We ran LTP and
> a loop of kernel build in the VMX domain along _with_ LTP/kernel
> build in dom0 on an HT-enabled system. For LTP we got the same
> results (of course?) as the ones we did on the native x86_64 Linux.
> We did not have any problem with the kernel build as long as we kept
> it running a half day (with kernel build running on dom0). Also NX/XD
> is enabled there.      
> 
> This code has an infrastructure where shadow_64.c can be compiled
> multiple times by switching macro definitions to handle 32-bit guests
> page tables which use a different PTE size (4-byte) from the host
> (8-byte); all of the functions are defined as static, and
> shadow_public.c exposes the same functions as exposed by shadow.c
> today. Support for 32-bit guests on top of 64-bit Xen is not complete
> yet, but we believe that the infrastructure is god enough. Most of
> the codes in shadow_64.c and shadow_public.c are not new, but from
> shadow.c as they are (with mechanical changes). The file shadow_64.c
> has additional code that supports level 3 and 4, and it should be a
> superset of shadow.c. That way we can avoid breaking 32-bit shadow
> mode, while we can try new things on 64-bit that will work for 32-bit
> as well (such as PAE).            
> 
>  b/xen/arch/x86/shadow_64.c            | 2866
>  ++++++++++++++++++++++++++++++++++ b/xen/arch/x86/shadow_public.c   
>  | 1559 ++++++++++++++++++ b/xen/include/asm-x86/page-guest32.h  | 
>  107 + b/xen/include/asm-x86/shadow_64.h     |  497 +++++
>  b/xen/include/asm-x86/shadow_public.h |   59
>  xen/arch/x86/Makefile                 |    5
>  xen/arch/x86/vmx.c                    |   10
>  xen/arch/x86/vmx_platform.c           |    4
>  xen/arch/x86/vmx_vmcs.c               |    4
>  xen/include/asm-x86/domain.h          |    1
>  xen/include/asm-x86/mm.h              |   27
>  xen/include/asm-x86/shadow.h          |   21
> 
> Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx>
> Signed-off-by: Chengyuan Li <chengyuan.li@xxxxxxxxx>
> Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxx>
> 
> Jun
> ---
> Intel Open Source Technology Center


Attachment: shadow_vmx_domU_2.patch
Description: shadow_vmx_domU_2.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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