[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature
From: |
Auger Eric |
Subject: |
Re: [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt" |
Date: |
Fri, 29 Mar 2019 14:41:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi Shameer,
On 3/29/19 10:41 AM, Shameerali Kolothum Thodi wrote:
> Hi Eric,
>
>> -----Original Message-----
>> From: Auger Eric [mailto:address@hidden
>> Sent: 29 March 2019 09:32
>> To: Shameerali Kolothum Thodi <address@hidden>;
>> address@hidden; address@hidden; address@hidden;
>> address@hidden; address@hidden;
>> address@hidden; address@hidden
>> Cc: Linuxarm <address@hidden>; xuwei (O) <address@hidden>;
>> Laszlo Ersek <address@hidden>; Ard Biesheuvel
>> <address@hidden>; Leif Lindholm <address@hidden>
>> Subject: Re: [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt"
>>
>> Hi Shameer,
>>
>> [ + Laszlo, Ard, Leif ]
>>
>> On 3/21/19 11:47 AM, Shameer Kolothum wrote:
>>> This is to disable/enable populating DT nodes in case
>>> any conflict with acpi tables. The default is "off".
>> The name of the option sounds misleading to me. Also we don't really
>> know the scope of the disablement. At the moment this just aims to
>> prevent the hotpluggable dt nodes from being added if we boot in ACPI mode.
>
> Yes, I was not very happy with the name "fdt". If this is not useful other
> than
> this device memory conflict case, then we can be more specific. But I am not
> sure
> we might need this for any other future conflicts, hence a more generic name.
>
> May be "force_fdt" or "dimm_fdt"? I am open to suggestions.
mask_spurious_dt_nodes. But I am unsure this is the way we should go.
>
>>>
>>> This will be used in subsequent patch where cold plug
>>> device-memory support is added for DT boot.
>> I am concerned about the fact that in dt mode, by default, you won't see
>> any PCDIMM nodes.
>
> True. But is there any other way to detect that the Guest is using DT?
I don't know any
in machvirt_init, there is firmware_loaded that tells you whether you
have a FW image. If this one is not set, you can induce dt. But if there
is a FW it can be either DT or ACPI booted. You also have the
acpi_enabled knob.
Thanks
Eric
>
> Thanks,
> Shameer
>
>>> If DT memory node support is added for cold-plugged device
>>> memory, those memory will be visible to Guest kernel via
>>> UEFI GetMemoryMap() and gets treated as early boot memory.
>> Don't we have an issue in UEFI then. Normally the SRAT indicates whether
>> the slots are hotpluggable or not. Shouldn't the UEFI code look at this
>> info.
>>> Hence memory becomes non hot-un-unpluggable even if Guest
>>> is booted in ACPI mode.
>>
>>
>>
>>>
>>> Signed-off-by: Shameer Kolothum <address@hidden>
>>> ---
>>> hw/arm/virt.c | 23 +++++++++++++++++++++++
>>> include/hw/arm/virt.h | 1 +
>>> 2 files changed, 24 insertions(+)
>>>
>>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>>> index 13db0e9..b602151 100644
>>> --- a/hw/arm/virt.c
>>> +++ b/hw/arm/virt.c
>>> @@ -1717,6 +1717,20 @@ static void virt_set_highmem(Object *obj, bool
>> value, Error **errp)
>>> vms->highmem = value;
>>> }
>>>
>>> +static bool virt_get_fdt(Object *obj, Error **errp)
>>> +{
>>> + VirtMachineState *vms = VIRT_MACHINE(obj);
>>> +
>>> + return vms->use_fdt;
>>> +}
>>> +
>>> +static void virt_set_fdt(Object *obj, bool value, Error **errp)
>>> +{
>>> + VirtMachineState *vms = VIRT_MACHINE(obj);
>>> +
>>> + vms->use_fdt = value;
>>> +}
>>> +
>>> static bool virt_get_its(Object *obj, Error **errp)
>>> {
>>> VirtMachineState *vms = VIRT_MACHINE(obj);
>>> @@ -2005,6 +2019,15 @@ static void virt_instance_init(Object *obj)
>>> object_property_set_description(obj, "gic-version",
>>> "Set GIC version. "
>>> "Valid values are 2, 3 and host",
>> NULL);
>>> + /* fdt is disabled by default */
>>> + vms->use_fdt = false;
>>> + object_property_add_bool(obj, "fdt", virt_get_fdt,
>>> + virt_set_fdt, NULL);
>>> + object_property_set_description(obj, "fdt",
>>> + "Set on/off to enable/disable
>> device tree "
>>> + "nodes in case any conflict with
>> ACPI"
>> in case of
>>
>> Thanks
>>
>> Eric
>>> + "(eg: device memory node)",
>>> + NULL);
>>>
>>> vms->highmem_ecam = !vmc->no_highmem_ecam;
>>>
>>> diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
>>> index c5e4c96..14b2e0a 100644
>>> --- a/include/hw/arm/virt.h
>>> +++ b/include/hw/arm/virt.h
>>> @@ -119,6 +119,7 @@ typedef struct {
>>> bool highmem_ecam;
>>> bool its;
>>> bool virt;
>>> + bool use_fdt;
>>> int32_t gic_version;
>>> VirtIOMMUType iommu;
>>> struct arm_boot_info bootinfo;
>>>
- Re: [Qemu-devel] [PATCH v3 09/10] hw/acpi: Add ACPI Generic Event Device Support, (continued)
- [Qemu-devel] [PATCH v3 10/10] hw/arm/virt: Init GED device and enable memory hotplug, Shameer Kolothum, 2019/03/21
- [Qemu-devel] [PATCH v3 06/10] hw/arm/virt-acpi-build: Add PC-DIMM in SRAT, Shameer Kolothum, 2019/03/21
- [Qemu-devel] [PATCH v3 08/10] hw/arm/boot: Expose the PC-DIMM nodes in the DT, Shameer Kolothum, 2019/03/21
- [Qemu-devel] [PATCH v3 02/10] hw/acpi: Do not create memory hotplug method when handler is not defined, Shameer Kolothum, 2019/03/21
- [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt", Shameer Kolothum, 2019/03/21
- Re: [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt", Auger Eric, 2019/03/29
- Re: [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt", Shameerali Kolothum Thodi, 2019/03/29
- Re: [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt", Auger Eric, 2019/03/29
- Re: [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt", Ard Biesheuvel, 2019/03/29
- Re: [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt", Auger Eric, 2019/03/29
- Re: [Qemu-devel] [PATCH v3 07/10] hw/arm/virt: Introduce opt-in feature "fdt", Shameerali Kolothum Thodi, 2019/03/29
[Qemu-devel] [PATCH v3 03/10] hw/arm/virt: Add virtual ACPI device, Shameer Kolothum, 2019/03/21
[Qemu-devel] [PATCH v3 01/10] hw/acpi: Make ACPI IO address space configurable, Shameer Kolothum, 2019/03/21
[Qemu-devel] [PATCH v3 04/10] hw/arm/virt: Add memory hotplug framework, Shameer Kolothum, 2019/03/21