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 07 of 24] libxc: replace open-coded use of XENMEM_dec

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 07 of 24] libxc: replace open-coded use of XENMEM_decrease_reservation
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 06 Sep 2010 14:38:27 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Mon, 06 Sep 2010 06:46:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1283780300@xxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1283779691 -3600
# Node ID 4d8b7ca524c7aeace21ba151cb21c784b268ae5f
# Parent  e79d9a42c67e1d03f79d40529b2578578a5aa547
libxc: replace open-coded use of XENMEM_decrease_reservation

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r e79d9a42c67e -r 4d8b7ca524c7 tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c   Mon Sep 06 14:28:11 2010 +0100
+++ b/tools/libxc/xc_domain_restore.c   Mon Sep 06 14:28:11 2010 +0100
@@ -1529,15 +1529,7 @@ int xc_domain_restore(xc_interface *xch,
 
         if ( nr_frees > 0 )
         {
-            struct xen_memory_reservation reservation = {
-                .nr_extents   = nr_frees,
-                .extent_order = 0,
-                .domid        = dom
-            };
-            set_xen_guest_handle(reservation.extent_start, 
tailbuf.u.pv.pfntab);
-
-            if ( (frc = xc_memory_op(xch, XENMEM_decrease_reservation,
-                                     &reservation)) != nr_frees )
+            if ( (frc = xc_domain_memory_decrease_reservation(xch, dom, 
nr_frees, 0, tailbuf.u.pv.pfntab)) != nr_frees )
             {
                 PERROR("Could not decrease reservation : %d", frc);
                 goto out;

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

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