[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 03/10] xen/arm: Setup MMIO range trap handlers for hardware domain
On 11/11/20 4:39 PM, Roger Pau Monné wrote: > On Mon, Nov 09, 2020 at 02:50:24PM +0200, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx> >> >> In order vPCI to work it needs all access to PCI configuration space >> access to be synchronized among all entities, e.g. hardware domain and >> guests. For that implement PCI host bridge specific callbacks to >> propelry setup those ranges depending on host bridge implementation. >> >> This callback is optional and may not be used by non-ECAM host bridges. >> >> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx> >> --- >> xen/arch/arm/pci/pci-host-common.c | 16 ++++++++++++++++ >> xen/arch/arm/pci/pci-host-generic.c | 15 +++++++++++++-- >> xen/arch/arm/vpci.c | 16 +++++++++++++++- > So this is based on top of another series, maybe it would make sense > to post those together, or else it's hard to get the right context. This is based on ARM's PCI passthrough RFC series [1] You can also see the whole picture at [2] > >> xen/include/asm-arm/pci.h | 7 +++++++ >> 4 files changed, 51 insertions(+), 3 deletions(-) >> >> diff --git a/xen/arch/arm/pci/pci-host-common.c >> b/xen/arch/arm/pci/pci-host-common.c >> index b011c7eff3c8..b81184d34980 100644 >> --- a/xen/arch/arm/pci/pci-host-common.c >> +++ b/xen/arch/arm/pci/pci-host-common.c >> @@ -219,6 +219,22 @@ struct device *pci_find_host_bridge_device(struct >> device *dev) >> } >> return dt_to_dev(bridge->dt_node); >> } >> + >> +int pci_host_iterate_bridges(struct domain *d, >> + int (*clb)(struct domain *d, >> + struct pci_host_bridge *bridge)) >> +{ >> + struct pci_host_bridge *bridge; >> + int err; >> + >> + list_for_each_entry( bridge, &pci_host_bridges, node ) >> + { >> + err = clb(d, bridge); >> + if ( err ) >> + return err; >> + } >> + return 0; >> +} >> /* >> * Local variables: >> * mode: C >> diff --git a/xen/arch/arm/pci/pci-host-generic.c >> b/xen/arch/arm/pci/pci-host-generic.c >> index 54dd123e95c7..469df3da0116 100644 >> --- a/xen/arch/arm/pci/pci-host-generic.c >> +++ b/xen/arch/arm/pci/pci-host-generic.c >> @@ -85,12 +85,23 @@ int pci_ecam_config_read(struct pci_host_bridge *bridge, >> uint32_t sbdf, >> return 0; >> } >> >> +static int pci_ecam_register_mmio_handler(struct domain *d, >> + struct pci_host_bridge *bridge, > I think you can also constify bridge here. Makes sense > > Thanks, Roger. Thank you, Oleksandr [1] https://www.mail-archive.com/xen-devel@xxxxxxxxxxxxxxxxxxxx/msg84452.html [2] https://github.com/andr2000/xen/tree/vpci_rfc
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |