|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 22/23] libxl/acpi: Build ACPI tables for HVMlite guests
On 08/09/2016 10:46 AM, Jan Beulich wrote:
>>>> On 04.08.16 at 23:06, <boris.ostrovsky@xxxxxxxxxx> wrote:
>> + if (dom->nr_vnodes) {
>> + struct acpi_numa *numa = &config->numa;
>> +
>> + rc = xc_domain_getvnuma(xch, domid, &numa->nr_vnodes,
>> + &numa->nr_vmemranges,
>> + &config->hvminfo->nr_vcpus, NULL, NULL,
>> NULL);
>> + if (rc) {
>> + LOG(ERROR, "%s: xc_domain_getvnuma failed (rc=%d)",
>> + __FUNCTION__, rc);
>> + return rc;
>> + }
>> +
>> + numa->vmemrange = libxl__zalloc(gc, dom->nr_vmemranges *
>> + sizeof(*numa->vmemrange));
>> + numa->vdistance = libxl__zalloc(gc, dom->nr_vnodes *
>> + sizeof(*numa->vdistance));
>> + numa->vcpu_to_vnode = libxl__zalloc(gc, config->hvminfo->nr_vcpus *
>> + sizeof(*numa->vcpu_to_vnode));
>> + rc = xc_domain_getvnuma(xch, domid, &numa->nr_vnodes,
>> + &numa->nr_vmemranges,
>> + &config->hvminfo->nr_vcpus, numa->vmemrange,
>> + numa->vdistance, numa->vcpu_to_vnode);
> I guess that's the code portion you refer to as requiring the NUMA
> pointers to be to non-const? If so I have to disagree: By using
> local variables you can still have them have the const qualifiers,
> and I'd very much prefer them to be that way.
Ah, OK, this will work. (xc_domain_getvnuma() wouldn't take constified
parameters, which is what I was referring to. Haven't considered using
local variables).
-boris
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |