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

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

 



On Fri, Nov 23, 2018 at 03:27:50PM +0100, Pino Toscano wrote:
> 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
> 

Hi Pino,

Yep, sure I can leave the 'capsType == VIR_DOMAIN_VIRT_QEMU' as is.

Thank you,
Roman

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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