Re: [Xen-devel] [PATCH v2 03/11] pvh: Set online VCPU map to avail_vcpus
On Fri, Nov 11, 2016 at 02:57:58PM -0500, Konrad Rzeszutek Wilk wrote: > On Wed, Nov 09, 2016 at 09:39:51AM -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 > > "enable" by AML code during hotplug. > > > > Signed-off-by: Boris Ostrovsky> > Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v2 03/11] pvh: Set online VCPU map to avail_vcpus
On Wed, Nov 09, 2016 at 09:39:51AM -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 > "enable" by AML code during hotplug. > > Signed-off-by: Boris OstrovskyReviewed-by: Konrad Rzeszutek Wilk > --- > Changes in v2: > * Clarified in the commit message that it's AML that updates MADT > > 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 v2 03/11] 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 AML code during hotplug. Signed-off-by: Boris Ostrovsky--- Changes in v2: * Clarified in the commit message that it's AML that updates MADT 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