aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenpaging
diff options
context:
space:
mode:
authorTim Deegan <tim@xen.org>2012-03-08 16:40:05 +0000
committerTim Deegan <tim@xen.org>2012-03-08 16:40:05 +0000
commit08d62198150bb50f4a0e19e5f96141c2394415f0 (patch)
tree3055b81042d900319cd4ba735fcf451a2408b9f3 /tools/xenpaging
parent9a0405c411fcec03d316342e900c75f417a21486 (diff)
downloadxen-08d62198150bb50f4a0e19e5f96141c2394415f0.tar.gz
xen-08d62198150bb50f4a0e19e5f96141c2394415f0.tar.bz2
xen-08d62198150bb50f4a0e19e5f96141c2394415f0.zip
Tools: Remove shared page from mem_event/access/paging interfaces
Don't use the superfluous shared page, return the event channel directly as part of the domctl struct, instead. In-tree consumers (xenpaging, xen-access) updated. This is an ABI/API change, so please voice any concerns. Known pending issues: - pager could die and its ring page could be used by some other process, yet Xen retains the mapping to it. - use a saner interface for the paging_load buffer. This change also affects the x86/mm bits in the hypervisor that process the mem_event setup domctl. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'tools/xenpaging')
-rw-r--r--tools/xenpaging/xenpaging.c17
-rw-r--r--tools/xenpaging/xenpaging.h2
2 files changed, 3 insertions, 16 deletions
diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c
index c0f08e3c4c..06ccdd9960 100644
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -337,14 +337,6 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
goto err;
}
- /* Initialise shared page */
- paging->mem_event.shared_page = init_page();
- if ( paging->mem_event.shared_page == NULL )
- {
- PERROR("Error initialising shared page");
- goto err;
- }
-
/* Initialise ring page */
paging->mem_event.ring_page = init_page();
if ( paging->mem_event.ring_page == NULL )
@@ -361,7 +353,7 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
/* Initialise Xen */
rc = xc_mem_paging_enable(xch, paging->mem_event.domain_id,
- paging->mem_event.shared_page,
+ &paging->mem_event.evtchn_port,
paging->mem_event.ring_page);
if ( rc != 0 )
{
@@ -393,7 +385,7 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
/* Bind event notification */
rc = xc_evtchn_bind_interdomain(paging->mem_event.xce_handle,
paging->mem_event.domain_id,
- paging->mem_event.shared_page->port);
+ paging->mem_event.evtchn_port);
if ( rc < 0 )
{
PERROR("Failed to bind event channel");
@@ -474,11 +466,6 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
munlock(paging->paging_buffer, PAGE_SIZE);
free(paging->paging_buffer);
}
- if ( paging->mem_event.shared_page )
- {
- munlock(paging->mem_event.shared_page, PAGE_SIZE);
- free(paging->mem_event.shared_page);
- }
if ( paging->mem_event.ring_page )
{
diff --git a/tools/xenpaging/xenpaging.h b/tools/xenpaging/xenpaging.h
index e348db63c5..5a300c755c 100644
--- a/tools/xenpaging/xenpaging.h
+++ b/tools/xenpaging/xenpaging.h
@@ -36,7 +36,7 @@ struct mem_event {
xc_evtchn *xce_handle;
int port;
mem_event_back_ring_t back_ring;
- mem_event_shared_page_t *shared_page;
+ uint32_t evtchn_port;
void *ring_page;
};