From 50ca52274eda838f0562938fae3432a0f05f2585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Date: Fri, 9 Oct 2015 12:57:32 +0200 Subject: [PATCH 4/8] x86/hap: make hap_track_dirty_vram use non-contiguous memory for temporary map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just like it's done for shadow_track_dirty_vram allocate the temporary buffer using non-contiguous memory. Signed-off-by: Roger Pau Monné Reviewed-by: Tim Deegan --- xen/arch/x86/mm/hap/hap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index abf3d7a..f7b12a8 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -87,7 +87,7 @@ int hap_track_dirty_vram(struct domain *d, } rc = -ENOMEM; - dirty_bitmap = xzalloc_bytes(size); + dirty_bitmap = vzalloc(size); if ( !dirty_bitmap ) goto out; @@ -168,8 +168,7 @@ int hap_track_dirty_vram(struct domain *d, p2m_ram_logdirty, p2m_ram_rw); } out: - if ( dirty_bitmap ) - xfree(dirty_bitmap); + vfree(dirty_bitmap); return rc; } -- 1.9.5 (Apple Git-50.3)