On Mon, Dec 04, 2017 at 08:38:54PM -0500, John Ferlan wrote:
Move the call to qemuDomainCheckCCWS390AddressSupport from qemuBuildControllerDevStr to qemuDomainDeviceDefValidateController. This means we will get the qemuCaps from the driver opaque variable passed to qemuDomainDeviceDefValidate. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/qemu/qemu_command.c | 4 ---- src/qemu/qemu_domain.c | 18 +++++++++++++++--- 2 files changed, 15 insertions(+), 7 deletions(-)
@@ -3990,9 +3995,15 @@ qemuDomainDeviceDefValidateController(const virDomainControllerDef *controller, static int qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev, const virDomainDef *def, - void *opaque ATTRIBUTE_UNUSED) + void *opaque) { int ret = 0; + virQEMUDriverPtr driver = opaque; + virQEMUCapsPtr qemuCaps = NULL; + + if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, + def->emulator))) + return -1;
The corresponding Unref should be a part of this patch Jan
switch ((virDomainDeviceType) dev->type) { case VIR_DOMAIN_DEVICE_NET: @@ -4032,7 +4043,8 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev, break; case VIR_DOMAIN_DEVICE_CONTROLLER: - ret = qemuDomainDeviceDefValidateController(dev->data.controller, def); + ret = qemuDomainDeviceDefValidateController(dev->data.controller, def, + qemuCaps); break; case VIR_DOMAIN_DEVICE_LEASE: -- 2.13.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list