]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
tools/helpers: allocate xenstore event channel for xenstore stubdom
authorJuergen Gross <jgross@suse.com>
Mon, 5 Feb 2024 10:49:46 +0000 (11:49 +0100)
committerJulien Grall <jgrall@amazon.com>
Mon, 5 Feb 2024 19:26:32 +0000 (19:26 +0000)
In order to prepare support of PV frontends in xenstore-stubdom, add
allocation of a Xenstore event channel to init-xenstore-domain.c.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jason Andryuk <jandryuk@gmail.com>
tools/helpers/init-xenstore-domain.c

index b2d5df8ba5600665e0617a2f1a51a0466b3c657f..140ed610aecf447211c05121e7486197b4375dfe 100644 (file)
@@ -248,6 +248,13 @@ static int build(xc_interface *xch)
     dom->cmdline = xc_dom_strdup(dom, cmdline);
     dom->xenstore_domid = domid;
     dom->console_evtchn = console_evtchn;
+    rv = xc_evtchn_alloc_unbound(xch, domid, domid);
+    if ( rv < 0 )
+    {
+        fprintf(stderr, "xc_evtchn_alloc_unbound failed\n");
+        goto err;
+    }
+    dom->xenstore_evtchn = rv;
 
     rv = xc_dom_mem_init(dom, memory);
     if ( rv )