aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/tests/xen-access/xen-access.c5
-rw-r--r--tools/xenpaging/xenpaging.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c
index fce886432a..b861aff323 100644
--- a/tools/tests/xen-access/xen-access.c
+++ b/tools/tests/xen-access/xen-access.c
@@ -269,6 +269,11 @@ xenaccess_t *xenaccess_init(xc_interface **xch_r, domid_t domain_id)
(mem_event_sring_t *)xenaccess->mem_event.ring_page,
PAGE_SIZE);
+ /* Now that the ring is set, remove it from the guest's physmap */
+ if ( xc_domain_decrease_reservation_exact(xch,
+ xenaccess->mem_event.domain_id, 1, 0, &ring_pfn) )
+ PERROR("Failed to remove ring from guest physmap");
+
/* Get platform info */
xenaccess->platform_info = malloc(sizeof(xc_platform_info_t));
if ( xenaccess->platform_info == NULL )
diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c
index b9ba00fa11..5c1cd81ecc 100644
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -416,6 +416,11 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
(mem_event_sring_t *)paging->mem_event.ring_page,
PAGE_SIZE);
+ /* Now that the ring is set, remove it from the guest's physmap */
+ if ( xc_domain_decrease_reservation_exact(xch,
+ paging->mem_event.domain_id, 1, 0, &ring_pfn) )
+ PERROR("Failed to remove ring from guest physmap");
+
/* Get max_pages from guest if not provided via cmdline */
if ( !paging->max_pages )
{