[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] hw/arm/virt: Add linux, pci-domain property
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH] hw/arm/virt: Add linux, pci-domain property |
Date: |
Mon, 23 Apr 2018 17:58:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2018-04-23 15:11, Peter Maydell wrote:
> On 23 April 2018 at 06:18, Jan Kiszka <address@hidden> wrote:
>> From: Jan Kiszka <address@hidden>
>>
>> This allows to pin the host controller in the Linux PCI domain space.
>> Linux requires that property to be available consistently or not at all,
>> in which case the domain number becomes unstable on additions/removals.
>> Adding it here won't make a difference in practice for most setups as we
>> only expose one controller.
>>
>> However, enabling Jailhouse on top may introduce another controller, and
>> that one would like to have stable address as well. So the property is
>> needed for the first controller as well.
>
> Am I right in thinking that for ACPI the PCI domain number is
> communicated via the _SEG method? If so, looks like we already
> set that, and we set it to 0, which matches what we're doing here
> in the DT, so that's good.
Looking at the related arm64 kernel code (not the spec), it seems __SEG
is involved, yet.
Jan
>
>> Signed-off-by: Jan Kiszka <address@hidden>
>> ---
>> hw/arm/virt.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index 94dcb125d3..943371b75e 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -1023,6 +1023,7 @@ static void create_pcie(const VirtMachineState *vms,
>> qemu_irq *pic)
>> qemu_fdt_setprop_string(vms->fdt, nodename, "device_type", "pci");
>> qemu_fdt_setprop_cell(vms->fdt, nodename, "#address-cells", 3);
>> qemu_fdt_setprop_cell(vms->fdt, nodename, "#size-cells", 2);
>> + qemu_fdt_setprop_cell(vms->fdt, nodename, "linux,pci-domain", 0);
>> qemu_fdt_setprop_cells(vms->fdt, nodename, "bus-range", 0,
>> nr_pcie_buses - 1);
>> qemu_fdt_setprop(vms->fdt, nodename, "dma-coherent", NULL, 0);
>> --
>
> Drew -- is minor changes to the DTC something we can do without
> having to condition it on machine version? I forget...
>
> thanks
> -- PMM
>
signature.asc
Description: OpenPGP digital signature