[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 5/7] xen-bus: Set offline if backend's state is XenbusStateClo
|
From: |
Volodymyr Babchuk |
|
Subject: |
[PATCH v1 5/7] xen-bus: Set offline if backend's state is XenbusStateClosed |
|
Date: |
Fri, 10 Nov 2023 20:42:23 +0000 |
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Both state (XenbusStateClosed) and online (0) are expected by
toolstack/xl devd to completely destroy the device. But "offline"
is never being set by the backend resulting in timeout during
domain destruction, garbage in Xestore and still running Qemu
instance.
Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
hw/xen/xen-bus.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c
index 75474d4b43..6e7ec3af64 100644
--- a/hw/xen/xen-bus.c
+++ b/hw/xen/xen-bus.c
@@ -519,6 +519,10 @@ static void xen_device_backend_changed(void *opaque, const
char *path)
xen_device_backend_set_state(xendev, XenbusStateClosed);
}
+ if (xen_device_backend_get_state(xendev) == XenbusStateClosed) {
+ xen_device_backend_set_online(xendev, false);
+ }
+
/*
* If a backend is still 'online' then we should leave it alone but,
* if a backend is not 'online', then the device is a candidate
--
2.42.0
- Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes, (continued)
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, 2023/11/10
[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 <=
[PATCH v1 3/7] xen: xenstore: add possibility to preserve owner, Volodymyr Babchuk, 2023/11/10
Re: [PATCH v1 3/7] xen: xenstore: add possibility to preserve owner, Paul Durrant, 2023/11/12