From: Igor Mammedov <imammedo@redhat.com>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>
Cc: "Liu, Jingqi" <jingqi.liu@intel.com>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"mst@redhat.com" <mst@redhat.com>
Subject: Re: [PATCH 2/3] hw/acpi-build: account for NVDIMM numa nodes in SRAT
Date: Thu, 28 May 2020 12:41:31 +0200 [thread overview]
Message-ID: <20200528124131.19cc986e@redhat.com> (raw)
In-Reply-To: <b91f0709d2a425e39d8ecaff5824c022dc893ee6.camel@intel.com>
On Thu, 28 May 2020 01:24:42 +0000
"Verma, Vishal L" <vishal.l.verma@intel.com> wrote:
> On Thu, 2020-05-21 at 17:16 +0200, Igor Mammedov wrote:
>
> Hi Igor, Thanks for the review.
>
> [..]
> > >
> > > @@ -2429,6 +2430,25 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
> > > MEM_AFFINITY_ENABLED);
> > > }
> > > }
> > > +
> > > + if (machine->nvdimms_state->is_enabled) {
> > > + GSList *device_list = nvdimm_get_device_list();
> > > +
> > > + for (; device_list; device_list = device_list->next) {
> > > + DeviceState *dev = device_list->data;
> > > + int node = object_property_get_int(OBJECT(dev), PC_DIMM_NODE_PROP,
> > > + NULL);
> > > + uint64_t addr = object_property_get_uint(OBJECT(dev),
> > > + PC_DIMM_ADDR_PROP, NULL);
> > > + uint64_t size = object_property_get_uint(OBJECT(dev),
> > > + PC_DIMM_SIZE_PROP, NULL);
> > > +
> > suggest to use error_abort in getters
>
> Yep, fixed in v2.
>
> >
> > > + numamem = acpi_data_push(table_data, sizeof *numamem);
> > > + build_srat_memory(numamem, addr, size, node,
> > > + MEM_AFFINITY_ENABLED | MEM_AFFINITY_NON_VOLATILE);
> > > + }
> > who is in charge of freeing device_list ?
>
> Thanks, also fixed in v2.
>
> >
> > > + }
> >
> > There is ARM version of build_srat(),
> > I suggest to put this NVDIMM specific part in helper function within hw/acpi/nvdimm.c
> > and use it from both build_srat() functions.
>
> Splitting the work out into a helper function in nvdimm.c does make
> sense, and I've done that. However, looking at the arm version of
> build_srat and generally in virt-acpi-build.c, I don't see any NVDIMM
> support, so unless I'm mistaken, it wouldn't make sense to actually call
> this from the arm version of build_srat.
perhaps you are lookin into old version on QEMU
current HEAD has followin snippet:
virt-acpi-build.c:
if (ms->nvdimms_state->is_enabled) {
nvdimm_build_acpi(table_offsets, tables_blob, tables->linker,
ms->nvdimms_state, ms->ram_slots);
}
>
> I'll send a v2 with the above fixes.
>
> >
> > > +
> > > slots = (table_data->len - numa_start) / sizeof *numamem;
> > > for (; slots < pcms->numa_nodes + 2; slots++) {
> > > numamem = acpi_data_push(table_data, sizeof *numamem);
next prev parent reply other threads:[~2020-05-28 10:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 1:28 [PATCH 0/3] account for NVDIMM nodes during SRAT generation Vishal Verma
2020-04-28 1:28 ` [PATCH 1/3] diffs-allowed: add the SRAT AML to diffs-allowed Vishal Verma
2020-04-28 1:28 ` [PATCH 2/3] hw/acpi-build: account for NVDIMM numa nodes in SRAT Vishal Verma
2020-04-30 3:42 ` Liu, Jingqi
2020-05-21 15:16 ` Igor Mammedov
2020-05-28 1:24 ` Verma, Vishal L
2020-05-28 10:41 ` Igor Mammedov [this message]
2020-05-28 16:27 ` Verma, Vishal L
2020-04-28 1:28 ` [PATCH 3/3] tests/acpi: update expected SRAT files Vishal Verma
2020-04-28 2:44 ` [PATCH 0/3] account for NVDIMM nodes during SRAT generation no-reply
2020-04-28 16:02 ` Verma, Vishal L
2020-05-12 18:45 ` Verma, Vishal L
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=20200528124131.19cc986e@redhat.com \
--to=imammedo@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=jingqi.liu@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vishal.l.verma@intel.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).