From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwUk1-0004Fc-Ju for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwUjy-00032K-HO for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:47:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50198) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwUjy-00031z-C1 for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:47:38 -0400 Date: Tue, 18 Oct 2016 15:47:33 +0200 From: Igor Mammedov Message-ID: <20161018154733.3523996d@nial.brq.redhat.com> In-Reply-To: <20161018130721.GP3275@thinpad.lan.raisama.net> References: <1476352367-69400-1-git-send-email-imammedo@redhat.com> <1476352367-69400-3-git-send-email-imammedo@redhat.com> <20161018130721.GP3275@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 02/13] pc: acpi: x2APIC support for SRAT table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: liuxiaojian6@huawei.com, mst@redhat.com, rkrcmar@redhat.com, qemu-devel@nongnu.org, peterx@redhat.com, kevin@koconnor.net, kraxel@redhat.com, pbonzini@redhat.com, lersek@redhat.com, chao.gao@intel.com On Tue, 18 Oct 2016 11:07:21 -0200 Eduardo Habkost wrote: > On Thu, Oct 13, 2016 at 11:52:36AM +0200, Igor Mammedov wrote > [...] > > @@ -2441,18 +2440,33 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine) > > > > for (i = 0; i < apic_ids->len; i++) { > > int j = numa_get_node_for_cpu(i); > > - int apic_id = apic_ids->cpus[i].arch_id; > > + uint32_t apic_id = apic_ids->cpus[i].arch_id; > > > > - core = acpi_data_push(table_data, sizeof *core); > > - core->type = ACPI_SRAT_PROCESSOR_APIC; > > - core->length = sizeof(*core); > > - core->local_apic_id = apic_id; > > - if (j < nb_numa_nodes) { > > + if (apic_id < 255) { > > + AcpiSratProcessorAffinity *core; > > + > > + core = acpi_data_push(table_data, sizeof *core); > > + core->type = ACPI_SRAT_PROCESSOR_APIC; > > + core->length = sizeof(*core); > > + core->local_apic_id = apic_id; > > + if (j < nb_numa_nodes) { > > core->proximity_lo = j; > > + } > > + memset(core->proximity_hi, 0, 3); > > + core->local_sapic_eid = 0; > > + core->flags = cpu_to_le32(1); > > + } else { > > + AcpiSratProcessorX2ApicAffinity *core; > > + > > + core = acpi_data_push(table_data, sizeof *core); > > + core->type = ACPI_SRAT_PROCESSOR_x2APIC; > > + core->length = sizeof(*core); > > + core->x2apic_id = apic_id; > > cpu_to_le32()? Sure, will fix and respin series as a lot of fixes are accumulated by now. > > > + if (j < nb_numa_nodes) { > > + core->proximity_domain = cpu_to_le32(j); > > + } > > + core->flags = cpu_to_le32(1); > > } > > - memset(core->proximity_hi, 0, 3); > > - core->local_sapic_eid = 0; > > - core->flags = cpu_to_le32(1); > > } > > > > > > -- > > 2.7.4 > > >