[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 2/7] xen-bus: Do not destroy frontend/backend directories
From: |
Volodymyr Babchuk |
Subject: |
[PATCH v1 2/7] xen-bus: Do not destroy frontend/backend directories |
Date: |
Fri, 10 Nov 2023 20:42:22 +0000 |
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
The PV backend running in other than Dom0 domain (non toolstack domain)
is not allowed to destroy frontend/backend directories. The more,
it does not need to do that at all, this is purely toolstack/xl devd
business.
I do not know for what reason the backend does that here, this is not really
needed, probably it is just a leftover and all xs_node_destroy()
instances should go away completely.
Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
hw/xen/xen-bus.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c
index 06d5192aca..75474d4b43 100644
--- a/hw/xen/xen-bus.c
+++ b/hw/xen/xen-bus.c
@@ -598,8 +598,9 @@ static void xen_device_backend_destroy(XenDevice *xendev)
g_assert(xenbus->xsh);
- xs_node_destroy(xenbus->xsh, XBT_NULL, xendev->backend_path,
- &local_err);
+ if (xenbus->backend_id == 0)
+ xs_node_destroy(xenbus->xsh, XBT_NULL, xendev->backend_path,
+ &local_err);
g_free(xendev->backend_path);
xendev->backend_path = NULL;
@@ -754,8 +755,9 @@ static void xen_device_frontend_destroy(XenDevice *xendev)
g_assert(xenbus->xsh);
- xs_node_destroy(xenbus->xsh, XBT_NULL, xendev->frontend_path,
- &local_err);
+ if (xenbus->backend_id == 0)
+ xs_node_destroy(xenbus->xsh, XBT_NULL, xendev->frontend_path,
+ &local_err);
g_free(xendev->frontend_path);
xendev->frontend_path = NULL;
--
2.42.0
- Re: [PATCH v1 7/7] xen_arm: Add basic virtio-pci support, (continued)
- [PATCH v1 1/7] xen-block: Do not write frontend nodes, Volodymyr Babchuk, 2023/11/10
- Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, David Woodhouse, 2023/11/11
- Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, Andrew Cooper, 2023/11/11
- Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, David Woodhouse, 2023/11/11
- Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, Andrew Cooper, 2023/11/11
- Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, David Woodhouse, 2023/11/11
- Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, Volodymyr Babchuk, 2023/11/14
- Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, David Woodhouse, 2023/11/14
Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, Paul Durrant, 2023/11/12
[PATCH v1 2/7] xen-bus: Do not destroy frontend/backend directories,
Volodymyr Babchuk <=
[PATCH v1 4/7] xen_pvdev: Do not assume Dom0 when creating a directrory, Volodymyr Babchuk, 2023/11/10
[PATCH v1 5/7] xen-bus: Set offline if backend's state is XenbusStateClosed, Volodymyr Babchuk, 2023/11/10
[PATCH v1 3/7] xen: xenstore: add possibility to preserve owner, Volodymyr Babchuk, 2023/11/10