This limits the ability of the guest to play around with its own rings, and DoS
itself.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
(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 )
(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 )
{