WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Paging support for guest walk tables to p

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Paging support for guest walk tables to page in l1-l3 page table pages.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Dec 2009 22:40:27 -0800
Delivery-date: Wed, 16 Dec 2009 22:42:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1261031275 0
# Node ID b0bef85100ec4cb91f78b290042bd9dbf018eb33
# Parent  f24609ab0b95d3116e57142ff7cf339f1cfb034d
Paging support for guest walk tables to page in l1-l3 page table pages.

A new page flag has been added to indicate that a paged out page was found
while walking the page tables. The paging in code is automatically called,
so the flag is only an indicator that the operation should be retried, not
that the page should be paged in.

Signed-off-by: Patrick Colp <Patrick.Colp@xxxxxxxxxx>
---
 xen/arch/x86/mm/guest_walk.c |   21 +++++++++++++++++++++
 xen/include/asm-x86/page.h   |    1 +
 2 files changed, 22 insertions(+)

diff -r f24609ab0b95 -r b0bef85100ec xen/arch/x86/mm/guest_walk.c
--- a/xen/arch/x86/mm/guest_walk.c      Thu Dec 17 06:27:55 2009 +0000
+++ b/xen/arch/x86/mm/guest_walk.c      Thu Dec 17 06:27:55 2009 +0000
@@ -125,6 +125,13 @@ guest_walk_tables(struct vcpu *v, unsign
 
     /* Map the l3 table */
     gw->l3mfn = gfn_to_mfn(d, guest_l4e_get_gfn(gw->l4e), &p2mt);
+    if ( p2m_is_paging(p2mt) )
+    {
+        p2m_mem_paging_populate(d, gfn_x(guest_l4e_get_gfn(gw->l4e)));
+
+        rc = _PAGE_PAGED;
+        goto out;
+    }
     if ( !p2m_is_ram(p2mt) ) 
     {
         rc |= _PAGE_PRESENT;
@@ -154,6 +161,13 @@ guest_walk_tables(struct vcpu *v, unsign
 
     /* Map the l2 table */
     gw->l2mfn = gfn_to_mfn(d, guest_l3e_get_gfn(gw->l3e), &p2mt);
+    if ( p2m_is_paging(p2mt) )
+    {
+        p2m_mem_paging_populate(d, gfn_x(guest_l3e_get_gfn(gw->l3e)));
+
+        rc = _PAGE_PAGED;
+        goto out;
+    }
     if ( !p2m_is_ram(p2mt) )
     {
         rc |= _PAGE_PRESENT;
@@ -212,6 +226,13 @@ guest_walk_tables(struct vcpu *v, unsign
     {
         /* Not a superpage: carry on and find the l1e. */
         gw->l1mfn = gfn_to_mfn(d, guest_l2e_get_gfn(gw->l2e), &p2mt);
+        if ( p2m_is_paging(p2mt) )
+        {
+            p2m_mem_paging_populate(d, gfn_x(guest_l2e_get_gfn(gw->l2e)));
+
+            rc = _PAGE_PAGED;
+            goto out;
+        }
         if ( !p2m_is_ram(p2mt) )
         {
             rc |= _PAGE_PRESENT;
diff -r f24609ab0b95 -r b0bef85100ec xen/include/asm-x86/page.h
--- a/xen/include/asm-x86/page.h        Thu Dec 17 06:27:55 2009 +0000
+++ b/xen/include/asm-x86/page.h        Thu Dec 17 06:27:55 2009 +0000
@@ -311,6 +311,7 @@ void setup_idle_pagetable(void);
 #define _PAGE_AVAIL2   0x800U
 #define _PAGE_AVAIL    0xE00U
 #define _PAGE_PSE_PAT 0x1000U
+#define _PAGE_PAGED   0x2000U
 
 /*
  * Debug option: Ensure that granted mappings are not implicitly unmapped.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Paging support for guest walk tables to page in l1-l3 page table pages., Xen patchbot-unstable <=