[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


  • To: Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 11 Nov 2020 15:39:24 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yO7TGZgN90SZW5hMpbC3lULCYSmiKnhPVqr/y3SukLA=; b=DNRvG7LJgBfkXgV5/ajlOByrRKjMIeySGBe1IUDxtirjsQ+r80e+V1xm7d8epa9ZVOjjsAFhuPnVOp5eLXCfQ2IQJ9zMn9+4/ZYmJpd9kHk3bp/YDAPnCweyFX5zkkGxTfpz6J91pjL3K7oBha1APfvJZEqZTuAIlmLJyH64dvquDm7LSc9bE7t/eCRF9Mm0mpj8D4ctcK1RYSTMWxXHzPr73Fek1P3IBH5yqZdM/JxzmOCqGjwLFVFbEXgj/Noa3pfQ0gIUqBShDRYS0pVkOegZ/9kgQrOojux1hax0kfKvCSFcjKY5enw3kO/I98WHsFhyOaSglZwPQoXaBkyV1A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U2MKtt8WpHn2LRCqCIZQAi9sdRoz4hmKdQ9awo1zhcDo1aErovbb0WMzzgFNRLJXriZMz867fUzNIONsfqlNGNyshVs+3PsZZbvsxsoLW8OMv03OPbL0bvnZPUU0cjze+aEOtPbon93vbZuqaTSwqX+VV/lCOs/5L14kbMqRIlU8HnA0U2d43j3XIDUn9hVOiiB1hDCKAPWSVBvAKgDL5dzYspl3D7ZZi8SMDuqRMePPZXfHrV6Knbjizgjs8dK/480T8kN0b1EMW/DxOpIgoN84OM396nXOgyLXezyExXDWzUoZulc4vhLHkQW4QwzU9KLkOkkUVHQ8AurMFwbNOA==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <Rahul.Singh@xxxxxxx>, <Bertrand.Marquis@xxxxxxx>, <julien.grall@xxxxxxx>, <jbeulich@xxxxxxxx>, <sstabellini@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <iwj@xxxxxxxxxxxxxx>, <wl@xxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
  • Delivery-date: Wed, 11 Nov 2020 14:39:37 +0000
  • Ironport-sdr: KKogBYjuG5u/BkfdO+U4huYaSDyclunV2tfJ1ZnVlLU7v2YxJFuM9bM06lH2wyBgfKjynfzej4 nXmBuMfVWwv93hw5ODSR9VOC7pOhh0mDfxUoP4T9paSmjz9Mq0BnpKoO3EzGgte/uYt7taNoqB pLGokVEW8CFSEAb3PV1S8xAYXb3ydmJ+GS2H0l5NL2wfCKDYKj07iAXFN24o+PFTZ75FV23okG y+ycNF69k2uiYhGoJmOzanvrcZQeywXgi38cKLIf1joYf9wf1SqJyhSmX9pusSoiTDL7rD73X5 TbA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

>  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.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.