mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
ch: reattach PCI devices to host while stopping guest
Reattach PCI devices to host, while stopping ch guest. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1e8cc91f9d
commit
cec5bb372a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user