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-devel

[Xen-devel] [PATCH 1 of 3] Made arch_memory_op propagate (instead of ign

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 3] Made arch_memory_op propagate (instead of ignore) errors from guest_physmap_add_page
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 03 Dec 2009 18:50:01 -0000
Cc: keir.fraser@xxxxxxxxxxxxx
Delivery-date: Thu, 03 Dec 2009 11:01:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1259866200@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1259866200@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.3
# HG changeset patch
# User konrad@xxxxxxxxxxxxxxxxxxx
# Date 1259769438 18000
# Node ID f9eeb0545e1c48cd9fc090c3be8d994b258dd636
# Parent  50aaf5df87ff75fbffffdc7cf9e6d128adef8ecb
Made arch_memory_op propagate (instead of ignore) errors from 
guest_physmap_add_page.

Authored-by: David Lively
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

diff -r 50aaf5df87ff -r f9eeb0545e1c xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Dec 02 10:35:41 2009 -0500
+++ b/xen/arch/x86/mm.c Wed Dec 02 10:57:18 2009 -0500
@@ -4005,6 +4005,7 @@
         struct xen_add_to_physmap xatp;
         unsigned long prev_mfn, mfn = 0, gpfn;
         struct domain *d;
+        int rc = 0;
 
         if ( copy_from_guest(&xatp, arg, 1) )
             return -EFAULT;
@@ -4089,7 +4090,7 @@
             guest_physmap_remove_page(d, gpfn, mfn, 0);
 
         /* Map at new location. */
-        guest_physmap_add_page(d, xatp.gpfn, mfn, 0);
+        rc = guest_physmap_add_page(d, xatp.gpfn, mfn, 0);
 
         domain_unlock(d);
 
@@ -4098,7 +4099,7 @@
 
         rcu_unlock_domain(d);
 
-        break;
+        return rc;
     }
 
     case XENMEM_set_memory_map:



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

<Prev in Thread] Current Thread [Next in Thread>