On Wed, 19 Aug 2020 at 13:03, Christoph Gerum <
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?

[1]
https://github.com/torvalds/linux/blob/919ba6e739eb76d7a99284795b72c45e096c9aa0/Documentation/devicetree/bindings/pci/host-generic-pci.txt
[2] https://github.com/siemens/jailhouse/blob/master/driver/pci.c#L408

Jakub

-- 
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/CAGdCPwuAGqYaeUik%2Bc1oFX%3DZo3JmDmm1JdyMiYPPVyi4ovGvQg%40mail.gmail.com.

Reply via email to