tools/xenstored: Remove stubdom special casing

posix.c and minios.c implement the same named functions serving slightly
different purposes.

For xenbus_map()
posix.c maps the local /dev/xen/xsd_kva
minios.c maps dom0 via grant and there is open coding for stub_domid in
map_interface.

Change xenbus_map() to map the local domain's interface.  The default
grant table mapping is performed otherwise.

Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
Jason Andryuk authored and Jan Beulich committed 2025-08-19 11:04:08 +02:00
1 parent 9947e2ad88
commit 671e80d990
2 files changed
+1 -8

No files matched your search

-5
View File
@@ -512,11 +512,6 @@ static void *map_interface(domid_t domid)
if (domid == store_domid)
return xenbus_map();
#ifdef __MINIOS__
if (domid == stub_domid)
return xenstore_buf;
#endif
return xengnttab_map_grant_ref(*xgt_handle, domid,
GNTTAB_RESERVED_XENSTORE,
PROT_READ|PROT_WRITE);
+1 -3
View File
@@ -61,13 +61,11 @@ evtchn_port_t get_domain_evtchn(unsigned int domid)
void *xenbus_map(void)
{
return xengnttab_map_grant_ref(*xgt_handle, xenbus_master_domid(),
GNTTAB_RESERVED_XENSTORE, PROT_READ|PROT_WRITE);
return xenstore_buf;
}
void unmap_xenbus(void *interface)
{
xengnttab_unmap(*xgt_handle, interface, 1);
}
void early_init(bool live_update, bool dofork, const char *pidfile)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.