qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Andrew Jones <drjones@redhat.com>
Cc: qemu-arm@nongnu.org, peter.maydell@linaro.org,
	qemu-devel@nongnu.org, david.daney@cavium.com,
	peter.huangpeng@huawei.com, shannon.zhao@linaro.org,
	imammedo@redhat.com
Subject: Re: [Qemu-devel] [PATCH v5 5/5] hw/arm/virt-acpi-build: Generate SRAT table
Date: Sat, 23 Apr 2016 09:08:52 +0800	[thread overview]
Message-ID: <571ACB24.2010109@huawei.com> (raw)
In-Reply-To: <20160422132605.gjyuda3magcoktyf@hawk.localdomain>



On 2016/4/22 21:26, Andrew Jones wrote:
>> +        core->flags = cpu_to_le32(1);
>> > +    }
>> > +    g_free(cpu_node);
>> > +
>> > +    mem_base = guest_info->memmap[VIRT_MEM].base;
>> > +    for (i = 0; i < nb_numa_nodes; ++i) {
>> > +        mem_len = numa_info[i].node_mem;
>> > +        numamem = acpi_data_push(table_data, sizeof *numamem);
>> > +        numamem->type = ACPI_SRAT_MEMORY;
>> > +        numamem->length = sizeof(*numamem);
>> > +        memset(numamem->proximity, 0, 4);
>> > +        numamem->proximity[0] = i;
> This is weird (but I see x86 does it too). The spec says proximity is
> "Integer that represents the proximity domain to which the processor
>  belongs", and its 4 bytes. So why doesn't the structure define it as
> a uint32_t and then we'd just do
> 
>   numamem->proximity = cpu_to_le32(i);
> 
> (adding Igor)
> 
>> > +        numamem->flags = cpu_to_le32(1);
>> > +        numamem->base_addr = cpu_to_le64(mem_base);
>> > +        numamem->range_length = cpu_to_le64(mem_len);
> How about moving acpi_build_srat_memory from hw/i386/acpi-build.c to
> somewhere in hw/acpi and reusing it?
> 
Good point! Will do that.

Thanks,
-- 
Shannon

  reply	other threads:[~2016-04-23  1:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21  6:23 [Qemu-devel] [PATCH v5 0/5] ARM: Add NUMA support for machine virt Shannon Zhao
2016-04-21  6:23 ` [Qemu-devel] [PATCH v5 1/5] ARM: Virt: Add /distance-map node for NUMA Shannon Zhao
2016-04-22 12:25   ` Andrew Jones
2016-04-23  1:17     ` Shannon Zhao
2016-04-23  7:03       ` Andrew Jones
2016-04-23  7:27         ` Shannon Zhao
2016-04-21  6:23 ` [Qemu-devel] [PATCH v5 2/5] ARM: Virt: Set numa-node-id for CPUs Shannon Zhao
2016-04-22 12:34   ` Andrew Jones
2016-04-21  6:23 ` [Qemu-devel] [PATCH v5 3/5] ARM: Add numa-node-id for /memory node Shannon Zhao
2016-04-22 12:48   ` Andrew Jones
2016-04-23  1:16     ` Shannon Zhao
2016-04-23  7:45       ` Andrew Jones
2016-04-23  8:02         ` Shannon Zhao
2016-04-21  6:23 ` [Qemu-devel] [PATCH v5 4/5] include/hw/acpi/acpi-defs: Add GICC Affinity Structure Shannon Zhao
2016-04-22 13:26   ` Andrew Jones
2016-04-21  6:23 ` [Qemu-devel] [PATCH v5 5/5] hw/arm/virt-acpi-build: Generate SRAT table Shannon Zhao
2016-04-22 13:26   ` Andrew Jones
2016-04-23  1:08     ` Shannon Zhao [this message]
2016-04-25 10:44     ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=571ACB24.2010109@huawei.com \
    --to=zhaoshenglong@huawei.com \
    --cc=david.daney@cavium.com \
    --cc=drjones@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).