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] Handle PoD case in hvm_hap_nested_page_fa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Handle PoD case in hvm_hap_nested_page_fault()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 06 Jan 2010 04:50:14 -0800
Delivery-date: Wed, 06 Jan 2010 04:50:11 -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 1262781923 0
# Node ID cba56c13ca3eba67a3b56e78256418fd62445a95
# Parent  a1d0a575b4bace0a79ecfb48704b24fc9ae7866b
Handle PoD case in hvm_hap_nested_page_fault()

The new combined nested page fault handling doesn't consider the case
where the gfn_to_mfn() translation caused the page to be transparently
populated.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff -r a1d0a575b4ba -r cba56c13ca3e xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Wed Jan 06 10:13:55 2010 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Wed Jan 06 12:45:23 2010 +0000
@@ -951,22 +951,21 @@ bool_t hvm_hap_nested_page_fault(unsigne
     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) )
+    /* Mem sharing: unshare the page and try again */
+    if ( p2mt == p2m_ram_shared )
+    {
+        mem_sharing_unshare_page(current->domain, gfn, 0);
+        return 1;
+    }
+ 
+    /* Spurious fault? PoD and log-dirty also take this path. */
+    if ( p2m_is_ram(p2mt) )
     {
         paging_mark_dirty(current->domain, mfn_x(mfn));
         p2m_change_type(current->domain, gfn, p2m_ram_logdirty, p2m_ram_rw);
         return 1;
     }
 
-    /* Mem sharing: unshare the page and try again */
-    if ( p2mt == p2m_ram_shared )
-    {
-        mem_sharing_unshare_page(current->domain, gfn, 0);
-        return 1;
-    }
- 
     /* Shouldn't happen: Maybe the guest was writing to a r/o grant mapping? */
     if ( p2mt == p2m_grant_map_ro )
     {

_______________________________________________
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] Handle PoD case in hvm_hap_nested_page_fault(), Xen patchbot-unstable <=