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

Re: [Xen-devel] [PATCH v4 12/15] tools: Call XEN_DOMCTL_acpi_access on PVH VCPU hotplug



On 12/12/2016 11:35 AM, Wei Liu wrote:
> On Tue, Nov 29, 2016 at 10:33:19AM -0500, Boris Ostrovsky wrote:
> [...]
>> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
>> index 33c5e4c..d80ab77 100644
>> --- a/tools/libxl/libxl.c
>> +++ b/tools/libxl/libxl.c
>> @@ -5147,8 +5147,14 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t 
>> domid, libxl_bitmap *cpumap)
>>      switch (libxl__domain_type(gc, domid)) {
>>      case LIBXL_DOMAIN_TYPE_HVM:
>>          switch (libxl__device_model_version_running(gc, domid)) {
>> -        case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL:
>>          case LIBXL_DEVICE_MODEL_VERSION_NONE:
>> +            rc = libxl__arch_set_vcpuonline(gc, domid, cpumap);
>> +            if (rc < 0) {
>> +                LOGE(ERROR, "Can't change vcpu online map (%d)", rc);
>> +                goto out;
>> +            }
>> +            /* fallthrough */
>> +        case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL:
> What is this "fallthrough"? I don't see description for this part in
> your doc later.

It is not required for VCPU hotplug to function.I do this for
consistency because otherwise even after hotplug the VCPU is still
marked as offline in xenstore.

Come think of it, maybe we should do this for all guests (which really
means for HVM too)?

-boris

>
>>              rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info);
>>              break;
>>          case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
>> diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h
>> index 5e1fc60..1869626 100644
>> --- a/tools/libxl/libxl_arch.h
>> +++ b/tools/libxl/libxl_arch.h
>> @@ -71,6 +71,10 @@ int libxl__arch_extra_memory(libxl__gc *gc,
>>                               const libxl_domain_build_info *info,
>>                               uint64_t *out);
>>  
>> +_hidden
>> +int libxl__arch_set_vcpuonline(libxl__gc *gc, uint32_t domid,
>> +                           libxl_bitmap *cpumap);
> No tabs please.
>
> Wei.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.