[libvirt] [PATCH 1/4] vcpupin: inroduce a new libvir API (virDomainPinVcpuFlags)
Taku Izumi
izumi.taku at jp.fujitsu.com
Mon Apr 11 05:56:59 UTC 2011
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.
>> + 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
More information about the libvir-list
mailing list