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] [XEN] Shadow: fix mark_dirty invocation t

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Shadow: fix mark_dirty invocation to use gfn, not mfn
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Mar 2007 09:40:09 -0800
Delivery-date: Fri, 09 Mar 2007 09:39:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1173370801 0
# Node ID 0e08d98dfd57ea1e950164460f342ea468ede795
# Parent  f78b4aad353ec349e582cedbc2191186ecfc182b
[XEN] Shadow: fix mark_dirty invocation to use gfn, not mfn
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff -r f78b4aad353e -r 0e08d98dfd57 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Thu Mar 08 16:18:50 2007 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Thu Mar 08 16:20:01 2007 +0000
@@ -380,7 +380,7 @@ void hvm_triple_fault(void)
  */
 static int __hvm_copy(void *buf, paddr_t addr, int size, int dir, int virt)
 {
-    unsigned long mfn;
+    unsigned long gfn, mfn;
     char *p;
     int count, todo;
 
@@ -390,9 +390,11 @@ static int __hvm_copy(void *buf, paddr_t
         count = min_t(int, PAGE_SIZE - (addr & ~PAGE_MASK), todo);
 
         if ( virt )
-            mfn = get_mfn_from_gpfn(paging_gva_to_gfn(current, addr));
+            gfn = paging_gva_to_gfn(current, addr);
         else
-            mfn = get_mfn_from_gpfn(addr >> PAGE_SHIFT);
+            gfn = addr >> PAGE_SHIFT;
+        
+        mfn = get_mfn_from_gpfn(gfn);
 
         if ( mfn == INVALID_MFN )
             return todo;
@@ -400,14 +402,15 @@ static int __hvm_copy(void *buf, paddr_t
         p = (char *)map_domain_page(mfn) + (addr & ~PAGE_MASK);
 
         if ( dir )
+        {
             memcpy(p, buf, count); /* dir == TRUE:  *to* guest */
+            mark_dirty(current->domain, gfn);
+        }
         else
             memcpy(buf, p, count); /* dir == FALSE: *from guest */
 
         unmap_domain_page(p);
         
-        mark_dirty(current->domain, mfn);
-
         addr += count;
         buf  += count;
         todo -= count;

_______________________________________________
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] [XEN] Shadow: fix mark_dirty invocation to use gfn, not mfn, Xen patchbot-unstable <=