Re: [PATCH 1/4] vcpupin: inroduce a new libvir API (virDomainPinVcpuFlags)

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

 



At 04/11/2011 01:56 PM, Taku Izumi Write:
> Wen-san, Hu-san, Osier-san,
> 
> Thank you for reviewing.
> I'll update this.
> 
> to Wen-san,
> 
>>> +
>>>> +    if (flags & ~(VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_CONFIG)) {
>>>> +        virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
>>>> +        virDispatchError(NULL);
>>>> +        return -1;
>>>> +    }
>> Why we check the flags here? We can check it in hypervisor's implementation.
>>
> 
>  We can't use this API with flags except VIR_DOMAIN_VCPU_LIVE or VIR_DOMAIN_VCPU_CONFIG.
>  I think validation should be done here.

The other API virDomain*Flags do not check the flags here.
If we do not check it here, it will cause some problems?

>  
>>> +    if (conn->driver->domainPinVcpuFlags) {
>>>> +        int ret;
>>>> +        ret = conn->driver->domainPinVcpuFlags (domain, vcpu, cpumap, maplen, flags);
>> There is no need to add space between 'domainPinVcpuFlags' and '(domain', it is old coding
>> style.
>>
> 
>  I intentionally did because such a style is adopted in a lot of other places
> where drivers' function are invoked.
>  
> 
> Best regards,
> Taku Izumi
> 
> 

--
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]