Re: [Xen-devel] [PATCH 03/10] pvh: Set online VCPU map to avail_vcpus
On 11/07/2016 10:36 AM, Konrad Rzeszutek Wilk wrote: > On Sun, Nov 06, 2016 at 04:42:36PM -0500, Boris Ostrovsky wrote: >> ACPI builder marks VCPUS set in vcpu_online map as enabled in MADT. >> With ACPI-based CPU hotplug we only want VCPUs that are started by >> the guest to be marked as such. Remaining VCPUs will be set to > Oh, so this is a bug then? We always marked them as enabled? > Is this mentioned somewhere in the ACPI docs? > > But what about guests that don't want to start their CPUs using > ACPI but are using SMP MPtables? This code is only applicable to PVH guests and it wasn't a bug because until now I assumed PV-like CPU hotplug (where the guest would watch xenstore). That required having all VCPUs marked as enabled in MADT and the guest (well, Linux guest) would immediately offline them. Now that we are going full-ACPI this is no longer the case. > >> "enable" by ACPI code during hotplug. > . which ACPI code? The libacpi one? You may want to be specific. > Or the QEMU code? AML code in DSDT. I'll update the comment. (No qemu --- this is PVH) -boris ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH 03/10] pvh: Set online VCPU map to avail_vcpus
On Sun, Nov 06, 2016 at 04:42:36PM -0500, Boris Ostrovsky wrote: > ACPI builder marks VCPUS set in vcpu_online map as enabled in MADT. > With ACPI-based CPU hotplug we only want VCPUs that are started by > the guest to be marked as such. Remaining VCPUs will be set to Oh, so this is a bug then? We always marked them as enabled? Is this mentioned somewhere in the ACPI docs? But what about guests that don't want to start their CPUs using ACPI but are using SMP MPtables? > "enable" by ACPI code during hotplug. . which ACPI code? The libacpi one? You may want to be specific. Or the QEMU code? > > Signed-off-by: Boris Ostrovsky > --- > tools/libxl/libxl_x86_acpi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/libxl/libxl_x86_acpi.c b/tools/libxl/libxl_x86_acpi.c > index ff0e2df..949f555 100644 > --- a/tools/libxl/libxl_x86_acpi.c > +++ b/tools/libxl/libxl_x86_acpi.c > @@ -98,7 +98,7 @@ static int init_acpi_config(libxl__gc *gc, > uint32_t domid = dom->guest_domid; > xc_dominfo_t info; > struct hvm_info_table *hvminfo; > -int i, rc = 0; > +int rc = 0; > > config->dsdt_anycpu = config->dsdt_15cpu = dsdt_pvh; > config->dsdt_anycpu_len = config->dsdt_15cpu_len = dsdt_pvh_len; > @@ -144,8 +144,8 @@ static int init_acpi_config(libxl__gc *gc, > hvminfo->nr_vcpus = info.max_vcpu_id + 1; > } > > -for (i = 0; i < hvminfo->nr_vcpus; i++) > -hvminfo->vcpu_online[i / 8] |= 1 << (i & 7); > +memcpy(hvminfo->vcpu_online, b_info->avail_vcpus.map, > + b_info->avail_vcpus.size); > > config->hvminfo = hvminfo; > > -- > 2.7.4 > > > ___ > Xen-devel mailing list > Xen-devel@lists.xen.org > https://lists.xen.org/xen-devel ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
[Xen-devel] [PATCH 03/10] pvh: Set online VCPU map to avail_vcpus
ACPI builder marks VCPUS set in vcpu_online map as enabled in MADT. With ACPI-based CPU hotplug we only want VCPUs that are started by the guest to be marked as such. Remaining VCPUs will be set to "enable" by ACPI code during hotplug. Signed-off-by: Boris Ostrovsky --- tools/libxl/libxl_x86_acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_x86_acpi.c b/tools/libxl/libxl_x86_acpi.c index ff0e2df..949f555 100644 --- a/tools/libxl/libxl_x86_acpi.c +++ b/tools/libxl/libxl_x86_acpi.c @@ -98,7 +98,7 @@ static int init_acpi_config(libxl__gc *gc, uint32_t domid = dom->guest_domid; xc_dominfo_t info; struct hvm_info_table *hvminfo; -int i, rc = 0; +int rc = 0; config->dsdt_anycpu = config->dsdt_15cpu = dsdt_pvh; config->dsdt_anycpu_len = config->dsdt_15cpu_len = dsdt_pvh_len; @@ -144,8 +144,8 @@ static int init_acpi_config(libxl__gc *gc, hvminfo->nr_vcpus = info.max_vcpu_id + 1; } -for (i = 0; i < hvminfo->nr_vcpus; i++) -hvminfo->vcpu_online[i / 8] |= 1 << (i & 7); +memcpy(hvminfo->vcpu_online, b_info->avail_vcpus.map, + b_info->avail_vcpus.size); config->hvminfo = hvminfo; -- 2.7.4 ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel