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] Base paging support for HVM guests.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Base paging support for HVM guests.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Dec 2009 22:40:29 -0800
Delivery-date: Wed, 16 Dec 2009 22:41:17 -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 52a97cb711dd57d0bf4301e11ece2095ecc0a180
# Parent  b0bef85100ec4cb91f78b290042bd9dbf018eb33
Base paging support for HVM guests.

This includes paging support for HVMOPs, HAP nested paging, and HVM map entry.
In all cases, the page is paged in automatically and an error returned,
indicating that the failed operation should be retried.

Signed-off-by: Patrick Colp <Patrick.Colp@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+)

diff -r b0bef85100ec -r 52a97cb711dd xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Thu Dec 17 06:27:55 2009 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Thu Dec 17 06:27:55 2009 +0000
@@ -940,6 +940,10 @@ bool_t hvm_hap_nested_page_fault(unsigne
         return 1;
     }
 
+    /* Check if the page has been paged out */
+    if ( p2m_is_paged(p2mt) || (p2mt == p2m_ram_paging_out) )
+        p2m_mem_paging_populate(current->domain, gfn);
+
     /* Log-dirty: mark the page dirty and let the guest write it again */
     if ( paging_mode_log_dirty(current->domain)
          && p2m_is_ram(p2mt) && (p2mt != p2m_ram_ro) )
@@ -1315,6 +1319,11 @@ static void *hvm_map_entry(unsigned long
     pfec = PFEC_page_present;
     gfn = paging_gva_to_gfn(current, va, &pfec);
     mfn = mfn_x(gfn_to_mfn_current(gfn, &p2mt));
+    if ( p2m_is_paging(p2mt) )
+    {
+        p2m_mem_paging_populate(current->domain, gfn);
+        return NULL;
+    }
     if ( !p2m_is_ram(p2mt) )
     {
         gdprintk(XENLOG_ERR, "Failed to look up descriptor table entry\n");
@@ -2948,6 +2957,13 @@ long do_hvm_op(unsigned long op, XEN_GUE
         {
             p2m_type_t t;
             mfn_t mfn = gfn_to_mfn(d, pfn, &t);
+            if ( p2m_is_paging(t) )
+            {
+                p2m_mem_paging_populate(d, pfn);
+
+                rc = -EINVAL;
+                goto param_fail3;
+            }
             if ( mfn_x(mfn) != INVALID_MFN )
             {
                 paging_mark_dirty(d, mfn_x(mfn));
@@ -3001,6 +3017,13 @@ long do_hvm_op(unsigned long op, XEN_GUE
             p2m_type_t nt;
             mfn_t mfn;
             mfn = gfn_to_mfn(d, pfn, &t);
+            if ( p2m_is_paging(t) )
+            {
+                p2m_mem_paging_populate(d, pfn);
+
+                rc = -EINVAL;
+                goto param_fail4;
+            }
             if ( p2m_is_grant(t) )
             {
                 gdprintk(XENLOG_WARNING,

_______________________________________________
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] Base paging support for HVM guests., Xen patchbot-unstable <=