From: Auger Eric <eric.auger@redhat.com>
To: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, drjones@redhat.com,
jonathan.cameron@huawei.com, linuxarm@huawei.com,
alex.williamson@redhat.com, zhaoshenglong@huawei.com,
imammedo@redhat.com
Subject: Re: [Qemu-arm] [RFC v2 5/6] hw/arm: ACPI SRAT changes to accommodate non-contiguous mem
Date: Mon, 28 May 2018 16:21:36 +0200 [thread overview]
Message-ID: <12945c4d-97f6-df0c-1046-b5d981624c18@redhat.com> (raw)
In-Reply-To: <20180516152026.2920-6-shameerali.kolothum.thodi@huawei.com>
Hi Shameer,
On 05/16/2018 05:20 PM, Shameer Kolothum wrote:
> This is in preparation for the next patch where initial ram is split
> into a non-pluggable chunk and a pc-dimm modeled mem if the vaild
valid
> iova regions are non-contiguous.
>
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> ---
> hw/arm/virt-acpi-build.c | 24 ++++++++++++++++++++----
> 1 file changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index c7c6a57..8d17b40 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -488,7 +488,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
> AcpiSratProcessorGiccAffinity *core;
> AcpiSratMemoryAffinity *numamem;
> int i, srat_start;
> - uint64_t mem_base;
> + uint64_t mem_base, mem_sz, mem_len;
> MachineClass *mc = MACHINE_GET_CLASS(vms);
> const CPUArchIdList *cpu_list = mc->possible_cpu_arch_ids(MACHINE(vms));
>
> @@ -505,12 +505,28 @@ build_srat(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
> core->flags = cpu_to_le32(1);
> }
>
> - mem_base = vms->memmap[VIRT_MEM].base;
> + mem_base = vms->bootinfo.loader_start;
> + mem_sz = vms->bootinfo.loader_start;
> for (i = 0; i < nb_numa_nodes; ++i) {
> numamem = acpi_data_push(table_data, sizeof(*numamem));
> - build_srat_memory(numamem, mem_base, numa_info[i].node_mem, i,
> + mem_len = MIN(numa_info[i].node_mem, mem_sz);
same question as in previous patch
Thanks
Eric
> + build_srat_memory(numamem, mem_base, mem_len, i,
> MEM_AFFINITY_ENABLED);
> - mem_base += numa_info[i].node_mem;
> + mem_base += mem_len;
> + mem_sz -= mem_len;
> + if (!mem_sz) {
> + break;
> + }
> + }
> +
> + /* Create table for initial pc-dimm ram, if any */
> + if (vms->bootinfo.dimm_mem) {
> + numamem = acpi_data_push(table_data, sizeof(*numamem));
> + build_srat_memory(numamem, vms->bootinfo.dimm_mem->base,
> + vms->bootinfo.dimm_mem->size,
> + vms->bootinfo.dimm_mem->node,
> + MEM_AFFINITY_ENABLED);
> +
> }
>
> build_header(linker, table_data, (void *)(table_data->data + srat_start),
>
next prev parent reply other threads:[~2018-05-28 14:22 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 15:20 [Qemu-arm] [RFC v2 0/6] hw/arm: Add support for non-contiguous iova regions Shameer Kolothum
2018-05-16 15:20 ` [Qemu-arm] [RFC v2 1/6] hw/vfio: Retrieve valid iova ranges from kernel Shameer Kolothum
2018-05-28 14:21 ` [Qemu-arm] [Qemu-devel] " Auger Eric
2018-05-30 14:43 ` Shameerali Kolothum Thodi
2018-05-16 15:20 ` [Qemu-arm] [RFC v2 2/6] hw/arm/virt: Enable dynamic generation of guest RAM memory regions Shameer Kolothum
2018-05-28 14:21 ` Auger Eric
2018-05-30 14:43 ` Shameerali Kolothum Thodi
2018-05-28 16:47 ` [Qemu-arm] [Qemu-devel] " Andrew Jones
2018-05-30 14:50 ` Shameerali Kolothum Thodi
2018-05-16 15:20 ` [Qemu-devel] [RFC v2 3/6] hw/arm/virt: Add pc-dimm mem hotplug framework Shameer Kolothum
2018-05-28 14:21 ` Auger Eric
2018-05-30 14:46 ` [Qemu-arm] " Shameerali Kolothum Thodi
2018-05-16 15:20 ` [Qemu-arm] [RFC v2 4/6] hw/arm: Changes required to accommodate non-contiguous DT mem nodes Shameer Kolothum
2018-05-28 14:21 ` [Qemu-arm] [Qemu-devel] " Auger Eric
2018-05-30 14:46 ` Shameerali Kolothum Thodi
2018-05-16 15:20 ` [Qemu-arm] [RFC v2 5/6] hw/arm: ACPI SRAT changes to accommodate non-contiguous mem Shameer Kolothum
2018-05-28 14:21 ` Auger Eric [this message]
2018-05-28 17:02 ` [Qemu-arm] [Qemu-devel] " Andrew Jones
2018-05-30 14:51 ` Shameerali Kolothum Thodi
2018-05-31 20:15 ` Auger Eric
2018-06-01 11:09 ` Shameerali Kolothum Thodi
2018-05-16 15:20 ` [Qemu-arm] [RFC v2 6/6] hw/arm: Populate non-contiguous memory regions Shameer Kolothum
2018-05-28 14:21 ` [Qemu-devel] " Auger Eric
2018-05-30 14:48 ` [Qemu-arm] " Shameerali Kolothum Thodi
2018-06-05 7:49 ` Shameerali Kolothum Thodi
2018-06-15 15:44 ` [Qemu-arm] [Qemu-devel] " Andrew Jones
2018-06-15 15:54 ` Peter Maydell
2018-06-15 16:13 ` Auger Eric
2018-06-15 16:33 ` Peter Maydell
2018-06-18 9:46 ` [Qemu-arm] " Shameerali Kolothum Thodi
2018-06-15 15:55 ` Auger Eric
2018-05-28 14:22 ` [Qemu-arm] [RFC v2 0/6] hw/arm: Add support for non-contiguous iova regions Auger Eric
2018-05-30 14:39 ` Shameerali Kolothum Thodi
2018-05-30 15:24 ` Auger Eric
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=12945c4d-97f6-df0c-1046-b5d981624c18@redhat.com \
--to=eric.auger@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=drjones@redhat.com \
--cc=imammedo@redhat.com \
--cc=jonathan.cameron@huawei.com \
--cc=linuxarm@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=zhaoshenglong@huawei.com \
/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).