[PATCH 3/4] qemu: validate: Fix check for unsupported FS-device bootindex use on un-assigned addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When hot-plugging a FS device with un-assigned address with a bootindex
the recently-added validation check would fail as validation on hotplug
is done prior to address assignment.

To fix this problem we can simply relax the check to also pass on _NONE
addresses. Unsupported configurations will still be caught as previous
commit re-checks the definition after address assignment prior to
hotplug.

Resolves: https://issues.redhat.com/browse/RHEL-39271
Fixes: 4690058b6d3dab672bd18ff69c83392245253024
Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_validate.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index ac1940cb31..c08e1538f9 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -4519,7 +4519,10 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs,
                 return -1;
             }

-            if (fs->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
+            /* Address type may be _NONE when validating and will be assigned
+             * later during hotplug */
+            if (fs->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
+                fs->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                                _("setting virtiofs boot order is supported only with PCI bus"));
                 return -1;
-- 
2.45.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux