Reattach PCI devices to host, while stopping ch guest. Signed-off-by: Praveen K Paladugu <prapal@xxxxxxxxxxxxxxxxxxx> --- src/ch/ch_process.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index ed0fa1fedb..61e263b62b 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -971,12 +971,13 @@ virCHProcessStart(virCHDriver *driver, } int -virCHProcessStop(virCHDriver *driver G_GNUC_UNUSED, +virCHProcessStop(virCHDriver *driver, virDomainObj *vm, virDomainShutoffReason reason) { int ret; int retries = 0; + unsigned int hostdev_flags = VIR_HOSTDEV_SP_PCI; virCHDomainObjPrivate *priv = vm->privateData; virCHDriverConfig *cfg = virCHDriverGetConfig(driver); virDomainDef *def = vm->def; @@ -1015,6 +1016,8 @@ virCHProcessStop(virCHDriver *driver G_GNUC_UNUSED, virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, reason); + virHostdevReAttachDomainDevices(driver->hostdevMgr, CH_DRIVER_NAME, def, + hostdev_flags); return 0; } -- 2.44.0