[libvirt] [PATCHv2 07/16] qemu: Introduce virQEMUCapsTypeIsAccelerated
Pino Toscano
ptoscano at redhat.com
Fri Nov 23 14:27:50 UTC 2018
On Wednesday, 21 November 2018 15:01:50 CET Roman Bolshakov wrote:
> +static bool
> +virQEMUCapsTypeIsAccelerated(virDomainVirtType type)
> +{
> + return type == VIR_DOMAIN_VIRT_KVM;
> +}
> [...]
> @@ -4966,7 +4971,8 @@ virQEMUCapsCacheLookupDefault(virFileCachePtr cache,
> if (virttype == VIR_DOMAIN_VIRT_NONE)
> virttype = capsType;
>
> - if (virttype == VIR_DOMAIN_VIRT_KVM && capsType == VIR_DOMAIN_VIRT_QEMU) {
> + if (virQEMUCapsTypeIsAccelerated(virttype) &&
> + !virQEMUCapsTypeIsAccelerated(capsType)) {
> virReportError(VIR_ERR_INVALID_ARG,
> _("KVM is not supported by '%s' on this host"),
> binary);
>From what I see, this check is now different:
- "capsType == VIR_DOMAIN_VIRT_QEMU" will be true only when capsType is
VIR_DOMAIN_VIRT_QEMU
- !virQEMUCapsTypeIsAccelerated(capsType) will be true when capsType is
not VIR_DOMAIN_VIRT_KVM
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20181123/35ae1d12/attachment-0001.sig>
More information about the libvir-list
mailing list