On 8/19/20 1:31 PM, Jakub Lužný wrote:
> On Wed, 19 Aug 2020 at 13:03, Christoph Gerum
> <christoph.ge...@uni-tuebingen.de
> <mailto:christoph.ge...@uni-tuebingen.de>> wrote:
>
>
>     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.
>
>
> I have been looking into that and the device tree generated by
> Jailhouse might be the issue. When I move the .pci_mmconfig_base to
> 0x200000000, the generated device tree looked like this:
>
>    pci@0 {
>        dma-coherent;
>        #interrupt-cells = <0x01>;
>        interrupt-map-mask = <0x00 0x00 0x00 0x07>;
>        ranges = <0x2000000 0x02 0x100000 0x02 0x100000 0x00 0x4000>;
>        compatible = "pci-host-ecam-generic";
>        device_type = "pci";
>        status = "ok";
>        #size-cells = <0x02>;
>        bus-range = <0x00 0x00>;
>        #address-cells = <0x03>;
>        reg = <0x02 0x00 0x100000>;
>        linux,pci-domain = <0x01>;
>        interrupt-map = <0x00 0x00 0x00 0x01 0x01 0x00 0x96 0x01 0x00
> 0x00 0x00 0x02 0x01 0x00 0x97 0x01 0x00 0x00 0x00 0x03 0x01 0x00 0x98
> 0x01 0x00 0x00 0x00 0x04 0x01 0x00 0x99 0x01>;
>    };
>
> At first, according to [1], the #address-cells must be 3 and
> #size-cells must be 2. In Jailhouse, this is taken from the parent
> node. I don't know if that might be an issue.
>
> But it's weird that the reg property is just 3x 32bits. According to
> the Jailhouse code at [2], I would expect it to be 5x 32bits long.
> Doesn't the kernel think that the size is 0x10000000000000 or
> something similar?

That is correct, reg property is defined by the #address and #size-cells
of the parent node which are 2 and 1 in this case.

But one needs to change the reg and ranges properties in the inmate .dts
as well. At least i think, I forgot the ranges last time I tried.

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 jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/07e0e959-4d93-58aa-4720-356d3bd7066e%40uni-tuebingen.de.

Reply via email to