On 09/09/2023 08:04, bot crack wrote:
Hi, everybody

I encountered some problems when using ivshmem-demo. How should I set the value of pci_mmconfig_base?

Set it to a region where it does physically not collide with any other IO/Memory.


my rootcell:
/.platform_info = {
.pci_mmconfig_base = 0x7BC00000,
.pci_mmconfig_end_bus = 0,
.pci_is_virtual = 1,
.pci_domain = 1,
.arm = {
.gic_version = 3,/

.......


my linux dts:
/&reserved_memory {

jailhouse: jailhouse@0x70000000{
reg = <0x0 0x70000000 0x0 0xBC00000>;
alignment = <0x1000>;
no-map;
status = "okay";
};

pci_reserved: pci@0x7BC00000{
reg = <0x0 0x7BC00000 0x0 0x00200000>;
alignment = <0x1000>;
no-map;
status = "okay";
};

There's no need to reserve it via device tree, because it isn't backed with anything in any case.


};
/
Kernel output after inserting jailhouse.ko
/[  264.612191] jailhouse: loading out-of-tree module taints kernel.
[  264.624958] pci-host-generic 7bc00000.pci: host bridge /pci@0 ranges:
[  264.625007] pci-host-generic 7bc00000.pci:      MEM 0x007bd00000..0x007bd01fff -> 0x007bd00000 [  264.625028] pci-host-generic 7bc00000.pci: *resource collision: [mem 0x7bd00000-0x7bd01fff] conflicts with reserved [mem 0x70000000-0x7bdfffff]*

This happens due to your device tree reservation. If there's nothing behind 0x7bc..., then simply go without reservation.

[  264.625051] pci-host-generic: probe of 7bc00000.pci failed with error -12
[  264.625475] The Jailhouse is opening.
[  264.792429] psci: CPU3 killed (polled 0 ms)
[  264.794210] Created Jailhouse cell "inmate-demo"
/
The operating environment is arm64, linux5.10.160

*How should I set the value of pci_mmconfig_base?*

See above, a free (ideally aligned) memory region in your physical address space.

  Ralf


--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/3ffc8cc2-0592-463f-ab65-bd51c2d0ed83n%40googlegroups.com <https://groups.google.com/d/msgid/jailhouse-dev/3ffc8cc2-0592-463f-ab65-bd51c2d0ed83n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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/e1577ac3-ab02-4fe4-9641-b56a923d6fb2%40oth-regensburg.de.

Reply via email to