[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/15] hw/xen: populate store frontend nodes with XenStore PFN/por
From: |
David Woodhouse |
Subject: |
[PULL 05/15] hw/xen: populate store frontend nodes with XenStore PFN/port |
Date: |
Tue, 7 Nov 2023 09:21:37 +0000 |
From: David Woodhouse <dwmw@amazon.co.uk>
This is kind of redundant since without being able to get these through
some other method (HVMOP_get_param) the guest wouldn't be able to access
XenStore in order to find them.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
---
hw/i386/kvm/xen_xenstore.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c
index 831da535fc..b7c0407765 100644
--- a/hw/i386/kvm/xen_xenstore.c
+++ b/hw/i386/kvm/xen_xenstore.c
@@ -1434,6 +1434,7 @@ static void alloc_guest_port(XenXenstoreState *s)
int xen_xenstore_reset(void)
{
XenXenstoreState *s = xen_xenstore_singleton;
+ GList *perms;
int err;
if (!s) {
@@ -1461,6 +1462,16 @@ int xen_xenstore_reset(void)
}
s->be_port = err;
+ /* Create frontend store nodes */
+ perms = g_list_append(NULL, xs_perm_as_string(XS_PERM_NONE, DOMID_QEMU));
+ perms = g_list_append(perms, xs_perm_as_string(XS_PERM_READ, xen_domid));
+
+ relpath_printf(s, perms, "store/port", "%u", s->guest_port);
+ relpath_printf(s, perms, "store/ring-ref", "%lu",
+ XEN_SPECIAL_PFN(XENSTORE));
+
+ g_list_free_full(perms, g_free);
+
/*
* We don't actually access the guest's page through the grant, because
* this isn't real Xen, and we can just use the page we gave it in the
--
2.41.0
- [PULL 00/15] xenfv.for-upstream queue, David Woodhouse, 2023/11/07
- [PULL 09/15] hw/xen: update Xen console to XenDevice model, David Woodhouse, 2023/11/07
- [PULL 04/15] i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID, David Woodhouse, 2023/11/07
- [PULL 15/15] docs: update Xen-on-KVM documentation, David Woodhouse, 2023/11/07
- [PULL 10/15] hw/xen: add support for Xen primary console in emulated mode, David Woodhouse, 2023/11/07
- [PULL 02/15] hw/xen: Clean up event channel 'type_val' handling to use union, David Woodhouse, 2023/11/07
- [PULL 01/15] i386/xen: Ignore VCPU_SSHOTTMR_future flag in set_singleshot_timer(), David Woodhouse, 2023/11/07
- [PULL 13/15] hw/i386/pc: support '-nic' for xen-net-device, David Woodhouse, 2023/11/07
- [PULL 11/15] hw/xen: only remove peers of PCI NICs on unplug, David Woodhouse, 2023/11/07
- [PULL 05/15] hw/xen: populate store frontend nodes with XenStore PFN/port,
David Woodhouse <=
- [PULL 03/15] include: update Xen public headers to Xen 4.17.2 release, David Woodhouse, 2023/11/07
- [PULL 12/15] hw/xen: update Xen PV NIC to XenDevice model, David Woodhouse, 2023/11/07
- [PULL 07/15] hw/xen: add get_frontend_path() method to XenDeviceClass, David Woodhouse, 2023/11/07
- [PULL 14/15] xen-platform: unplug AHCI disks, David Woodhouse, 2023/11/07
- [PULL 06/15] hw/xen: automatically assign device index to block devices, David Woodhouse, 2023/11/07
- [PULL 08/15] hw/xen: do not repeatedly try to create a failing backend device, David Woodhouse, 2023/11/07
- Re: [PULL 00/15] xenfv.for-upstream queue, Stefan Hajnoczi, 2023/11/07