[libvirt] [PATCH 04/17] qemu: Move CCW S390 Address check to controller def validate
Ján Tomko
jtomko at redhat.com
Tue Dec 5 13:48:57 UTC 2017
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 at redhat.com>
>---
> 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 at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171205/8b8c1af7/attachment-0001.sig>
More information about the libvir-list
mailing list