I just see how much I need to understand beyond what I asked...
How should it work from a 10,000ft view if we lived in a perfect world?
PCI controllerS are terminated on the main Linux. Jaihouse hypervisor
take over and reexposes virtual ones to root-cell who then re-probes the
whole space?
As IOMMUs are also attached to the PCI domains, I assume the same
transfer must be done for IOMMUs?
Some PCI devices are "platform" devices (i.e. not really behind a PCI
bridge but controlled through PCI) and pugable devices (those really are
PCI devices) so the IOMMU config may not be exactly the same for those
two types of devices.
shouldn't we have a
struct pci_domain {
__u64 pci_mmconfig_base;
__u32 pci_mmconfig_size;
__u8 pci_mmconfig_start_bus;
__u8 pci_mmconfig_end_bus;
struct jailhouse_iommu* iommu;
} __attribute__((packed));
and
struct jailhouse_system {
char signature[6];
__u16 revision;
struct jailhouse_memory hypervisor_memory;
struct jailhouse_debug_console debug_console;
struct {
struct pci_domain pci_domains[MAX_PCI_DOMAINS];
__u8 pci_is_virtual;
Cheers
FF
On 26.04.2018 18:09, Jan Kiszka wrote:
On 2018-04-26 17:53, [email protected] wrote:
On Cavium ThunderX there are PCI devices and multiple PCI domains,
each
with a set of buses and MMIO areas.
DeviceTree can be used to identify all those.
I see a flag pci_is_virtual is true on Arm.
But I am not sure I fully understand the implications.
In theory, we should add multi-domain support to allow proper device
probing here correct ?
Look at
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-April/573481.html
e.g.
Will likely become
PCI: Enable PCI_DOMAINS along with generic PCI host controller
This controller is often instantiated by hypervisors, and they may add
multiple of them or add them in addition to a physical host controller
like the Jailhouse hypervisor is doing. Therefore allow for multiple
domains so that we can handle them all.
Signed-off-by: Jan Kiszka <[email protected]>
---
drivers/pci/host/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index 0d0177ce436c..3d25b35bb5ab 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -68,6 +68,7 @@ config PCI_HOST_GENERIC
depends on (ARM || ARM64) && OF
select PCI_HOST_COMMON
select IRQ_DOMAIN
+ select PCI_DOMAINS
help
Say Y here if you want to support a simple generic PCI host
controller, such as the one emulated by kvmtool.
We do use interception of a physical host controller as well, but only
on the Seattle.
The whole series
(http://lists.infradead.org/pipermail/linux-arm-kernel/2018-April/573492.html)
might be of interest for you. For studies, or maybe you can even
support
reviews.
Oh, and I'm still looking for someone to help me getting
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-January/555415.html
in. :)
Jan
--
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].
For more options, visit https://groups.google.com/d/optout.