From: Ian Campbell Subject: [PATCH 18 of 25] libxc: switch page offlining interfaces to hypercall buffers Date: Thu, 21 Oct 2010 11:59:01 +0100 Message-ID: <19f7acc52f243f91f3ba.1287658741@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Ian Campbell # Date 1287650255 -3600 # Node ID 19f7acc52f243f91f3ba539b0475dafbb0546ba0 # Parent 0d9e118f705231b0ac88b9ae98f996e0e62152c7 libxc: switch page offlining interfaces to hypercall buffers There is no need to lock/bounce minfo->pfn_type in init_mem_info since xc_get_pfn_type_batch() will take care of that for us. Signed-off-by: Ian Campbell diff -r 0d9e118f7052 -r 19f7acc52f24 tools/libxc/xc_offline_page.c --- a/tools/libxc/xc_offline_page.c Thu Oct 21 09:37:35 2010 +0100 +++ b/tools/libxc/xc_offline_page.c Thu Oct 21 09:37:35 2010 +0100 @@ -294,12 +294,6 @@ static int init_mem_info(xc_interface *x minfo->pfn_type[i] = pfn_to_mfn(i, minfo->p2m_table, minfo->guest_width); - if ( lock_pages(xch, minfo->pfn_type, minfo->p2m_size * sizeof(*minfo->pfn_type)) ) - { - ERROR("Unable to lock pfn_type array"); - goto failed; - } - for (i = 0; i < minfo->p2m_size ; i+=1024) { int count = ((dinfo->p2m_size - i ) > 1024 ) ? 1024: (dinfo->p2m_size - i); @@ -307,13 +301,11 @@ static int init_mem_info(xc_interface *x minfo->pfn_type + i)) ) { ERROR("Failed to get pfn_type %x\n", rc); - goto unlock; + goto failed; } } return 0; -unlock: - unlock_pages(xch, minfo->pfn_type, minfo->p2m_size * sizeof(*minfo->pfn_type)); failed: if (minfo->pfn_type) {