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

Re: [libvirt] [PATCHv2 07/16] qemu: Introduce virQEMUCapsTypeIsAccelerated



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

Attachment: signature.asc
Description: This is a digitally signed message part.


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