Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xen for openSUSE:Factory checked in at 2022-01-13 00:22:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xen (Old) and /work/SRC/openSUSE:Factory/.xen.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xen" Thu Jan 13 00:22:11 2022 rev:310 rq:945654 version:4.16.0_04 Changes: -------- --- /work/SRC/openSUSE:Factory/xen/xen.changes 2022-01-08 23:23:04.390204899 +0100 +++ /work/SRC/openSUSE:Factory/.xen.new.1892/xen.changes 2022-01-13 00:22:32.451937599 +0100 @@ -1,0 +2,8 @@ +Tue Jan 11 10:47:10 MST 2022 - carn...@suse.com + +- bsc#1193307 - pci backend does not exist when attach a vf to a pv + guest + libxl-Fix-PV-hotplug-and-stubdom-coldplug.patch + Drop libxl-PCI-defer-backend-wait.patch + +------------------------------------------------------------------- Old: ---- libxl-PCI-defer-backend-wait.patch New: ---- libxl-Fix-PV-hotplug-and-stubdom-coldplug.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xen.spec ++++++ --- /var/tmp/diff_new_pack.sXgD8I/_old 2022-01-13 00:22:34.071938765 +0100 +++ /var/tmp/diff_new_pack.sXgD8I/_new 2022-01-13 00:22:34.075938768 +0100 @@ -221,7 +221,7 @@ Patch467: xenstore-run-in-studomain.patch Patch468: libxl.helper_done-crash.patch Patch469: libxl.LIBXL_HOTPLUG_TIMEOUT.patch -Patch470: libxl-PCI-defer-backend-wait.patch +Patch470: libxl-Fix-PV-hotplug-and-stubdom-coldplug.patch # python3 conversion patches Patch500: build-python3-conversion.patch Patch501: migration-python3-conversion.patch ++++++ libxl-Fix-PV-hotplug-and-stubdom-coldplug.patch ++++++ libxl/PCI: Fix PV hotplug & stubdom coldplug Commit 0fdb48ffe7a1 "libxl: Make sure devices added by pci-attach are reflected in the config" broken PCI hotplug (xl pci-attach) for PV domains when it moved libxl__create_pci_backend() later in the function. This also broke HVM + stubdom PCI passthrough coldplug. For that, the PCI devices are hotplugged to a running PV stubdom, and then the QEMU QMP device_add commands are made to QEMU inside the stubdom. Are running PV domain calls libxl__wait_for_backend(). With the current placement of libxl__create_pci_backend(), the path does not exist and the call immediately fails: libxl: error: libxl_device.c:1388:libxl__wait_for_backend: Backend /local/domain/0/backend/pci/43/0 does not exist libxl: error: libxl_pci.c:1764:device_pci_add_done: Domain 42:libxl__device_pci_add failed for PCI device 0:2:0.0 (rc -3) libxl: error: libxl_create.c:1857:domcreate_attach_devices: Domain 42:unable to add pci devices The wait is only relevant when the backend is already present. num_devs is already used to determine if the backend needs to be created. Re-use num_devs to determine if the backend wait is necessary. The wait is necessary to avoid racing with another PCI attachment reconfiguring the front/back or changing to some other state like closing. If we are creating the backend, then we don't have to worry about the state since it is being created. Fixes: 0fdb48ffe7a1 ("libxl: Make sure devices added by pci-attach are reflected in the config") Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx> diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c index 4c2d7aeefb..e8fd3bd937 100644 --- a/tools/libs/light/libxl_pci.c +++ b/tools/libs/light/libxl_pci.c @@ -157,8 +157,10 @@ static int libxl__device_pci_add_xenstore(libxl__gc *gc, if (domtype == LIBXL_DOMAIN_TYPE_INVALID) return ERROR_FAIL; - if (!starting && domtype == LIBXL_DOMAIN_TYPE_PV) { - if (libxl__wait_for_backend(gc, be_path, GCSPRINTF("%d", XenbusStateConnected)) < 0) + /* wait is only needed if the backend already exists (num_devs != NULL) */ + if (num_devs && !starting && domtype == LIBXL_DOMAIN_TYPE_PV) { + if (libxl__wait_for_backend(gc, be_path, + GCSPRINTF("%d", XenbusStateConnected)) < 0) return ERROR_FAIL; }