On Thu, Nov 21, 2019 at 08:13:00PM +0200, Oleksandr Grytsov wrote: > From: Oleksandr Grytsov <oleksandr_gryt...@epam.com> > > Adding/removing device is handled for specific devices only: VBD, VIF, > QDISK. This commit adds default case to handle adding/removing for all PV > devices by default, except QDISK device, which requires special handling. > If any other device is required a special handling it should be done by > implementing separate case (similar to QDISK device). The default > behaviour for adding device is to wait when the backend goes to > XenbusStateInitWait and the default behaviour on removing device is to > start generic device remove procedure. > > Also this commit fixes removing guest function: before the guest was > removed when all VIF and VBD devices are removed. The fix removes > guest when all created devices are removed. This is done by checking the > guest device list instead of checking num_vifs and num_vbds. num_vifs and > num_vbds variables are removed as redundant in this case. > > Signed-off-by: Oleksandr Grytsov <oleksandr_gryt...@epam.com>
I agree with this approach in general, but I haven't looked closely into the implementation. FWIW: Acked-by: Wei Liu <w...@xen.org> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel