From: Igor Mammedov <imammedo@redhat.com>
To: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Cc: peter.maydell@linaro.org, xiaoguangrong.eric@gmail.com,
mst@redhat.com, shannon.zhaosl@gmail.com, qemu-devel@nongnu.org,
xuwei5@hisilicon.com, linuxarm@huawei.com, eric.auger@redhat.com,
qemu-arm@nongnu.org, lersek@redhat.com
Subject: Re: [PATCH v2 4/7] hw/arm/virt: Add nvdimm hot-plug infrastructure
Date: Mon, 10 Feb 2020 14:35:07 +0100 [thread overview]
Message-ID: <20200210143507.63e54bd0@redhat.com> (raw)
In-Reply-To: <20200117174522.22044-5-shameerali.kolothum.thodi@huawei.com>
On Fri, 17 Jan 2020 17:45:19 +0000
Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> wrote:
> From: Kwangwoo Lee <kwangwoo.lee@sk.com>
>
> Prepare pre-plug and plug handlers for NVDIMM support.
> Please note nvdimm_support is not yet enabled.
looks fine to me,
except of commit message which should be updated to reflect
what patch actually does.
>
> Signed-off-by: Kwangwoo Lee <kwangwoo.lee@sk.com>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> ---
> hw/arm/Kconfig | 1 +
> hw/arm/virt-acpi-build.c | 6 ++++++
> hw/arm/virt.c | 19 +++++++++++++++++++
> hw/mem/Kconfig | 2 +-
> include/hw/arm/virt.h | 1 +
> 5 files changed, 28 insertions(+), 1 deletion(-)
>
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index c6e7782580..851dd81289 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -24,6 +24,7 @@ config ARM_VIRT
> select DIMM
> select ACPI_MEMORY_HOTPLUG
> select ACPI_HW_REDUCED
> + select ACPI_NVDIMM
>
> config CHEETAH
> bool
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index bd5f771e9b..c51eae549e 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -44,6 +44,7 @@
> #include "hw/pci/pcie_host.h"
> #include "hw/pci/pci.h"
> #include "hw/arm/virt.h"
> +#include "hw/mem/nvdimm.h"
> #include "sysemu/numa.h"
> #include "sysemu/reset.h"
> #include "kvm_arm.h"
> @@ -839,6 +840,11 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
> }
> }
>
> + if (ms->nvdimms_state->is_enabled) {
> + nvdimm_build_acpi(table_offsets, tables_blob, tables->linker,
> + ms->nvdimms_state, ms->ram_slots);
> + }
> +
> if (its_class_name() && !vmc->no_its) {
> acpi_add_table(table_offsets, tables_blob);
> build_iort(tables_blob, tables->linker, vms);
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 39ab5f47e0..7987c8f5b8 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -143,6 +143,7 @@ static const MemMapEntry base_memmap[] = {
> [VIRT_SMMU] = { 0x09050000, 0x00020000 },
> [VIRT_PCDIMM_ACPI] = { 0x09070000, MEMORY_HOTPLUG_IO_LEN },
> [VIRT_ACPI_GED] = { 0x09080000, ACPI_GED_EVT_SEL_LEN },
> + [VIRT_NVDIMM_ACPI] = { 0x09090000, NVDIMM_ACPI_IO_LEN},
> [VIRT_MMIO] = { 0x0a000000, 0x00000200 },
> /* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that size */
> [VIRT_PLATFORM_BUS] = { 0x0c000000, 0x02000000 },
> @@ -1749,6 +1750,18 @@ static void machvirt_init(MachineState *machine)
>
> create_platform_bus(vms);
>
> + if (machine->nvdimms_state->is_enabled) {
> + const struct AcpiGenericAddress arm_virt_nvdimm_acpi_dsmio = {
> + .space_id = AML_AS_SYSTEM_MEMORY,
> + .address = vms->memmap[VIRT_NVDIMM_ACPI].base,
> + .bit_width = NVDIMM_ACPI_IO_LEN << 3
> + };
> +
> + nvdimm_init_acpi_state(machine->nvdimms_state, sysmem,
> + arm_virt_nvdimm_acpi_dsmio,
> + vms->fw_cfg, OBJECT(vms));
> + }
> +
> vms->bootinfo.ram_size = machine->ram_size;
> vms->bootinfo.nb_cpus = smp_cpus;
> vms->bootinfo.board_id = -1;
> @@ -1936,6 +1949,8 @@ static void virt_memory_plug(HotplugHandler *hotplug_dev,
> {
> HotplugHandlerClass *hhc;
> VirtMachineState *vms = VIRT_MACHINE(hotplug_dev);
> + MachineState *ms = MACHINE(hotplug_dev);
> + bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
> Error *local_err = NULL;
>
> pc_dimm_plug(PC_DIMM(dev), MACHINE(vms), &local_err);
> @@ -1943,6 +1958,10 @@ static void virt_memory_plug(HotplugHandler *hotplug_dev,
> goto out;
> }
>
> + if (is_nvdimm) {
> + nvdimm_plug(ms->nvdimms_state);
> + }
> +
> hhc = HOTPLUG_HANDLER_GET_CLASS(vms->acpi_dev);
> hhc->plug(HOTPLUG_HANDLER(vms->acpi_dev), dev, &error_abort);
> out:
> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
> index 620fd4cb59..0d5f8f321a 100644
> --- a/hw/mem/Kconfig
> +++ b/hw/mem/Kconfig
> @@ -8,4 +8,4 @@ config MEM_DEVICE
> config NVDIMM
> bool
> default y
> - depends on PC
> + depends on PC || ARM_VIRT
> diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
> index 38f0c33c77..9c9eaaa89d 100644
> --- a/include/hw/arm/virt.h
> +++ b/include/hw/arm/virt.h
> @@ -79,6 +79,7 @@ enum {
> VIRT_SECURE_MEM,
> VIRT_PCDIMM_ACPI,
> VIRT_ACPI_GED,
> + VIRT_NVDIMM_ACPI,
> VIRT_LOWMEMMAP_LAST,
> };
>
next prev parent reply other threads:[~2020-02-10 13:35 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 17:45 [PATCH v2 0/7] ARM virt: Add NVDIMM support Shameer Kolothum
2020-01-17 17:45 ` [PATCH v2 1/7] exec: Fix for qemu_ram_resize() callback Shameer Kolothum
2020-02-04 15:23 ` Igor Mammedov
2020-02-04 16:44 ` David Hildenbrand
2020-02-04 19:05 ` David Hildenbrand
2020-02-05 16:29 ` Shameerali Kolothum Thodi
2020-02-05 16:40 ` David Hildenbrand
2020-02-06 10:20 ` Shameerali Kolothum Thodi
2020-02-06 10:55 ` David Hildenbrand
2020-02-06 11:28 ` Shameerali Kolothum Thodi
2020-02-06 14:54 ` David Hildenbrand
2020-02-07 16:05 ` Shameerali Kolothum Thodi
2020-02-10 9:29 ` David Hildenbrand
2020-02-10 9:50 ` Shameerali Kolothum Thodi
2020-02-10 9:53 ` David Hildenbrand
2020-02-12 17:07 ` Shameerali Kolothum Thodi
2020-02-12 18:20 ` David Hildenbrand
2020-02-13 16:38 ` Shameerali Kolothum Thodi
2020-02-13 16:59 ` David Hildenbrand
2020-02-13 17:09 ` David Hildenbrand
2020-02-28 16:49 ` Shameerali Kolothum Thodi
2020-02-28 17:59 ` David Hildenbrand
2020-03-11 17:28 ` Shameerali Kolothum Thodi
2020-01-17 17:45 ` [PATCH v2 2/7] hw/acpi/nvdimm: Fix for NVDIMM incorrect DSM output buffer length Shameer Kolothum
2020-01-28 17:08 ` Auger Eric
2020-02-06 16:06 ` Igor Mammedov
2020-03-10 11:22 ` Shameerali Kolothum Thodi
2020-03-10 11:36 ` Michael S. Tsirkin
2020-03-10 11:59 ` Shameerali Kolothum Thodi
2020-01-17 17:45 ` [PATCH v2 3/7] nvdimm: Use configurable ACPI IO base and size Shameer Kolothum
2020-01-17 17:45 ` [PATCH v2 4/7] hw/arm/virt: Add nvdimm hot-plug infrastructure Shameer Kolothum
2020-01-28 13:02 ` Auger Eric
2020-02-10 13:35 ` Igor Mammedov [this message]
2020-01-17 17:45 ` [PATCH v2 5/7] hw/arm/virt: Add nvdimm hotplug support Shameer Kolothum
2020-01-28 16:29 ` Auger Eric
2020-02-10 13:43 ` Igor Mammedov
2020-01-17 17:45 ` [PATCH v2 6/7] tests: Update ACPI tables list for upcoming arm/virt test changes Shameer Kolothum
2020-01-17 17:45 ` [PATCH v2 7/7] tests/bios-tables-test: Update arm/virt memhp test Shameer Kolothum
2020-01-28 16:29 ` Auger Eric
2020-01-29 10:35 ` Shameerali Kolothum Thodi
2020-01-29 13:01 ` Auger Eric
2020-02-11 10:20 ` Michael S. Tsirkin
2020-01-28 15:29 ` [PATCH v2 0/7] ARM virt: Add NVDIMM support Auger Eric
2020-01-29 10:44 ` Shameerali Kolothum Thodi
2020-01-29 12:55 ` 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=20200210143507.63e54bd0@redhat.com \
--to=imammedo@redhat.com \
--cc=eric.auger@redhat.com \
--cc=lersek@redhat.com \
--cc=linuxarm@huawei.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shannon.zhaosl@gmail.com \
--cc=xiaoguangrong.eric@gmail.com \
--cc=xuwei5@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.