From: Auger Eric <eric.auger@redhat.com>
To: David Hildenbrand <david@redhat.com>,
eric.auger.pro@gmail.com, qemu-devel@nongnu.org,
qemu-arm@nongnu.org, peter.maydell@linaro.org,
shameerali.kolothum.thodi@huawei.com, imammedo@redhat.com
Cc: dgilbert@redhat.com, agraf@suse.de, david@gibson.dropbear.id.au,
drjones@redhat.com, wei@redhat.com
Subject: Re: [Qemu-devel] [RFC v3 07/15] hw/arm/virt: Add memory hotplug framework
Date: Tue, 3 Jul 2018 21:34:29 +0200 [thread overview]
Message-ID: <4dfad441-b94f-916f-025e-fc69b6375465@redhat.com> (raw)
In-Reply-To: <cc538632-e853-adbc-ec34-a2f524415406@redhat.com>
Hi David,
On 07/03/2018 08:44 PM, David Hildenbrand wrote:
> On 03.07.2018 09:19, Eric Auger wrote:
>> From: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
>>
>> This patch adds the the memory hot-plug/hot-unplug infrastructure
>> in machvirt.
>>
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
>> Signed-off-by: Kwangwoo Lee <kwangwoo.lee@sk.com>
>>
>> ---
>>
>> v1 -> v2:
>> - s/virt_dimm_plug|unplug/virt_memory_plug|unplug
>> - s/pc_dimm_memory_plug/pc_dimm_plug
>> - reworded title and commit message
>> - added pre_plug cb
>> - don't handle get_memory_region failure anymore
>> ---
>> default-configs/arm-softmmu.mak | 2 ++
>> hw/arm/virt.c | 68 ++++++++++++++++++++++++++++++++++++++++-
>> 2 files changed, 69 insertions(+), 1 deletion(-)
>>
>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>> index 834d45c..28fe8f3 100644
>> --- a/default-configs/arm-softmmu.mak
>> +++ b/default-configs/arm-softmmu.mak
>> @@ -152,3 +152,5 @@ CONFIG_PCI_DESIGNWARE=y
>> CONFIG_STRONGARM=y
>> CONFIG_HIGHBANK=y
>> CONFIG_MUSICPAL=y
>> +CONFIG_MEM_HOTPLUG=y
>> +
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index 6fefb78..7190962 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -60,6 +60,8 @@
>> #include "standard-headers/linux/input.h"
>> #include "hw/arm/smmuv3.h"
>> #include "hw/acpi/acpi.h"
>> +#include "hw/mem/pc-dimm.h"
>> +#include "hw/mem/nvdimm.h"
>>
>> #define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \
>> static void virt_##major##_##minor##_class_init(ObjectClass *oc, \
>> @@ -1785,6 +1787,53 @@ static const CPUArchIdList *virt_possible_cpu_arch_ids(MachineState *ms)
>> return ms->possible_cpus;
>> }
>>
>> +static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
>> + Error **errp)
>> +{
>> + const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
>> +
>> + if (is_nvdimm) {
>> + error_setg(errp, "nvdimm is not yet supported");
>> + return;
>> + }
>
> You mention that actual hotplug is not supported, only coldplug.
> Wouldn't this be the right place to check for that? (only skimmed over
> your patches, how do you handle that?)
At the moment I don't check it. I did not look yet at ways to
discriminate both cases.
Thanks
Eric
>
>
next prev parent reply other threads:[~2018-07-03 19:34 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 7:19 [Qemu-devel] [RFC v3 00/15] ARM virt: PCDIMM/NVDIMM at 2TB Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 01/15] linux-headers: header update for KVM/ARM KVM_ARM_GET_MAX_VM_PHYS_SHIFT Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 02/15] hw/boards: Add a MachineState parameter to kvm_type callback Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 03/15] kvm: add kvm_arm_get_max_vm_phys_shift Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 04/15] hw/arm/virt: support kvm_type property Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 05/15] hw/arm/virt: handle max_vm_phys_shift conflicts on migration Eric Auger
2018-07-03 18:41 ` David Hildenbrand
2018-07-03 19:32 ` Auger Eric
2018-07-04 11:53 ` David Hildenbrand
2018-07-04 12:50 ` Auger Eric
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 06/15] hw/arm/virt: Allocate device_memory Eric Auger
2018-07-03 18:25 ` David Hildenbrand
2018-07-03 19:27 ` Auger Eric
2018-07-04 12:05 ` David Hildenbrand
2018-07-05 11:42 ` Auger Eric
2018-07-05 11:54 ` David Hildenbrand
2018-07-05 12:00 ` Auger Eric
2018-07-05 12:09 ` David Hildenbrand
2018-07-05 12:17 ` Auger Eric
2018-07-05 13:19 ` Shameerali Kolothum Thodi
2018-07-05 14:27 ` Auger Eric
2018-07-11 13:17 ` Igor Mammedov
2018-07-12 14:22 ` Auger Eric
2018-07-12 14:45 ` Andrew Jones
2018-07-12 14:53 ` Auger Eric
2018-07-12 15:15 ` Andrew Jones
2018-07-18 13:00 ` Igor Mammedov
2018-08-08 9:33 ` Auger Eric
2018-08-09 8:45 ` Igor Mammedov
2018-08-09 9:54 ` Auger Eric
2018-07-18 13:05 ` Igor Mammedov
2018-08-08 9:33 ` Auger Eric
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 07/15] hw/arm/virt: Add memory hotplug framework Eric Auger
2018-07-03 18:28 ` David Hildenbrand
2018-07-03 19:28 ` Auger Eric
2018-07-03 18:44 ` David Hildenbrand
2018-07-03 19:34 ` Auger Eric [this message]
2018-07-04 11:47 ` David Hildenbrand
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 08/15] hw/arm/boot: introduce fdt_add_memory_node helper Eric Auger
2018-07-18 14:04 ` Igor Mammedov
2018-08-08 9:44 ` Auger Eric
2018-08-09 8:57 ` Igor Mammedov
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 09/15] hw/arm/boot: Expose the PC-DIMM nodes in the DT Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 10/15] acpi: move build_srat_hotpluggable_memory to generic ACPI source Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 11/15] hw/arm/virt-acpi-build: Add PC-DIMM in SRAT Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 12/15] nvdimm: use configurable ACPI IO base and size Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 13/15] hw/arm/virt: Add nvdimm hot-plug infrastructure Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 14/15] hw/arm/boot: Expose the pmem nodes in the DT Eric Auger
2018-07-03 7:19 ` [Qemu-devel] [RFC v3 15/15] hw/arm/virt: Add nvdimm and nvdimm-persistence options Eric Auger
2018-07-18 14:08 ` [Qemu-devel] [RFC v3 00/15] ARM virt: PCDIMM/NVDIMM at 2TB Igor Mammedov
2018-10-18 12:56 ` Auger Eric
2018-10-03 13:49 ` Auger Eric
2018-10-03 14:13 ` Dr. David Alan Gilbert
2018-10-03 14:42 ` Auger Eric
2018-10-03 14:46 ` Dr. David Alan Gilbert
2018-10-04 11:11 ` Igor Mammedov
2018-10-04 11:32 ` Auger Eric
2018-10-04 12:02 ` David Hildenbrand
2018-10-04 12:07 ` Auger Eric
2018-10-04 13:16 ` Igor Mammedov
2018-10-04 14:16 ` Dr. David Alan Gilbert
2018-10-05 8:18 ` 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=4dfad441-b94f-916f-025e-fc69b6375465@redhat.com \
--to=eric.auger@redhat.com \
--cc=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=drjones@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=imammedo@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=wei@redhat.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).