Hi Jan,

On 8/19/20 12:18 PM, Jan Kiszka wrote:
>>     > + *
>>     > + * Reservation via device tree: reg = <0x0 0x20000000 0x10000000>;
>>     > + *                              reg = <0x0 0xe0000000 0x200000>;
>>
>>     Why this split-up into two regions?
>>
>>     This will also mean I need to add a patch to [1] so that the DT will
>>     carry the carve out. And drop the mem= from [2]. Or can we rearrange the
>>     reservation to keep that mem= cut-off, at the price of wasting memory on
>>     larger RPi variants?
>>
>>
>> It's because the PCI MMIO address space is mapped to 0xe0000000 in the
>> original configuration. I don't know where this address comes from, but
>> I've had some issues then I moved it somewhere else. I would like it
>> most if it would be above all the available memory, but I was getting
>> errors when i tried to do so:
>>
>> [  154.161182] pci-host-generic 200000000.pci: host bridge /pci@0 ranges:
>> [  154.161231] pci-host-generic 200000000.pci:   MEM
>> 0x200100000..0x200103fff -> 0x200100000
>> [  154.161354] pci-host-generic 200000000.pci: ECAM at [mem
>> 0x200000000-0x2000fffff] for [bus 00]
>> [  154.161525] pci-host-generic 200000000.pci: PCI host bridge to bus
>> 0001:00
>> [  154.161540] pci_bus 0001:00: root bus resource [bus 00]
>> [  154.161553] pci_bus 0001:00: root bus resource [mem
>> 0x200100000-0x200103fff]
>> [  154.161620] pci 0001:00:00.0: [110a:4106] type 00 class 0xff0000
>> [  154.161718] pci 0001:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff]
>> [  154.162420] pci 0001:00:01.0: [110a:4106] type 00 class 0xff0001
>> [  154.162523] pci 0001:00:01.0: reg 0x10: [mem 0x00000000-0x00000fff]
>> [  154.166228] pci 0001:00:00.0: BAR 0: no space for [mem size 0x00001000]
>> [  154.166246] pci 0001:00:00.0: BAR 0: failed to assign [mem size
>> 0x00001000]
>> [  154.166259] pci 0001:00:01.0: BAR 0: no space for [mem size 0x00001000]
>> [  154.166270] pci 0001:00:01.0: BAR 0: failed to assign [mem size
>> 0x00001000]
>>
>> So it seems that only 32-bit addresses are supported. When I tried to
>> move it somewhere to the reserved space (e.g. to 0x20000000), I was
>> getting crashes when enabling Jailhouse. So I stuck to the original address.
> That PCI MMIO config space is for a virtual host controller that
> Jailhouse provides. If has to be placed into a free range in the
> physical address space of that target. If you relocate that range in the
> system config, also update the non-root cell device tree. The root cell
> will get that information automatically.
> 
> Could you share /proc/iomem (without reservations) from your larger RPi?

During our work on autojail we also had the assumption that
.pci_mmconfig_base needed to be below 2^32, but we could not find a
reason for that in jailhouse. I was think, that this restriction was
either caused by the linux driver or a misconfigured device tree. But I
will revisit the problem in the next days.

Kind Regards, Christoph

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/32baa43a-4e84-7f22-230c-bdc5fba33c76%40uni-tuebingen.de.

Reply via email to