[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 3/3] [FUTURE] xen/arm: enable vPCI for domUs


  • To: Julien Grall <julien@xxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 7 Jul 2023 12:06:25 +0200
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8134oXwS1+4R3dyIlkk4ALZOUXtg0vpV7F0J7j/S0ds=; b=bfiTl4lXP7dMJR/2rJ73dq3lPn+kb2hyImQujfNSxUeqFV8SG7b9YGTqEVAueJavkmyylV6721LbkdNjNan6ydL4agmflpMDc4K9XOUWUqQcmPsZykXuotiBCnYb78MxmrkHFDbQzhLGn+S6hTt0nVYM4CrK7HByKuQNJxKHK+/iYjyOe5DyuCOibwDBPQ2fI8muwLTberJsOQhNisfbMxcXl0P/aVYFewx3cMm7KCttvEpKi/ClS72R9xgHCng0btDv3OTB83fjSvUXaNN5K8NjA31cyqGexXgdFUd8loeHkc6FWSyQsL3tJy1Px7paklMDmtbOTv9nOSQ3lclTkg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iazWcKJ4r3SxCsJOolEP7ZD4ai4bT1iDo+S0MLK8W2yEKPE8+cKF07U7wTUkASsYVCKAPO8+goyNZbpWo4FuoxtL92lJuMM0snqNBUWyd2S9e8kPZfbumKuCCkp2Fg6Oik7uIMz4K9UgfL6kAkVneEnXWB9UacYPmCTt/mbYClpWYyi5Asv6UaktfR0ECvvpujPHkDuk8hbqU41UCrRg/78zKbQ3L/Py4glax3APBpipmqnvlMlmvgtiQYS0eylnSAcGzSZe7kFIWlQJIwkzxIjm54rVowJrXrZTCk+ReNPjVu5kY3XfcYb11KlUjcaWxDtLXfXgHv256n4rkGKqSA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Artem Mygaiev <artem_mygaiev@xxxxxxxx>
  • Delivery-date: Fri, 07 Jul 2023 10:06:54 +0000
  • Ironport-data: A9a23:rY4xpaAAmm6hphVW/5jiw5YqxClBgxIJ4kV8jS/XYbTApD4m1GNTy mQdX22Ea66INmL1KYhwPN7k8EgE6pOAmIU3QQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nOHuGmYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbCRMsspvlDs15K6p4GxA4QRnDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw+9hzLn9l/ t8jAz0Vdwit3sifw4uyY7w57igjBJGD0II3nFhFlGucKMl8BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTL++xrvQA/zyQouFTpGMDSddGQA91cg26Tp 37c/nS/CRYfXDCa4WPcrynw2rWfwksXXqooPqGm1NFvoWejx0wCDRswUgHjvPO23xvWt9V3b hZ8FjAVhaov8E2mSPHtUhv+p2SL1jYHR9dPGvcmrgGMzqbZ6RyQAGQsRztNLtchsaceVTEsk 1OEgd7tLThuq6GOD2KQ8K+OqjG/MjRTKnUNDQcfVhcM6dTnpIA1jzrMQ8xlHarzicf6cRn6z iqWtiE4i/MWhNQSyqSg1VndhnSnoZ2hZjAy4gLbT2e09DRTbYSuZ5GrwVXD5PMGJ4GcJnGGu HUHgMGY4Po5EYCWlCeNTeMOG5mk//+AdjbbhDZHFoM9+jGa/m+sdIFd/hlzPE5sdM0DfFfUj FT7vApQ4NpWIyGsZKouOYapUZx2k+7nCMjvUe3SYpxWeJ9teQSb/SZoI0mNw2Tql0tqmqY6U XuGTfuR4b8hIfwP5FKLqy01iNfHGghWKbvveK3G
  • Ironport-hdrordr: A9a23:brQ1l6kEDGdDVVlitSlIz8yweYPpDfIT3DAbv31ZSRFFG/FwWf re5cjztCWE8Ar5PUtLpTnuAtjkfZqxz+8W3WBVB8bAYOCEggqVxeNZnO/fKlTbckWUygce78 ddmsNFebrN5DZB/KDHCcqDf+rIAuPrzEllv4jjJr5WIz1XVw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Jul 07, 2023 at 10:00:51AM +0100, Julien Grall wrote:
> On 07/07/2023 02:47, Stewart Hildebrand wrote:
> > Note that CONFIG_HAS_VPCI_GUEST_SUPPORT is not currently used in the 
> > upstream
> > code base. It will be used by the vPCI series [1]. This patch is intended 
> > to be
> > merged as part of the vPCI series.
> > 
> > v1->v2:
> > * new patch
> > ---
> >   xen/arch/arm/Kconfig              | 1 +
> >   xen/arch/arm/include/asm/domain.h | 2 +-
> >   2 files changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> > index 4e0cc421ad48..75dfa2f5a82d 100644
> > --- a/xen/arch/arm/Kconfig
> > +++ b/xen/arch/arm/Kconfig
> > @@ -195,6 +195,7 @@ config PCI_PASSTHROUGH
> >     depends on ARM_64
> >     select HAS_PCI
> >     select HAS_VPCI
> > +   select HAS_VPCI_GUEST_SUPPORT
> >     default n
> >     help
> >       This option enables PCI device passthrough
> > diff --git a/xen/arch/arm/include/asm/domain.h 
> > b/xen/arch/arm/include/asm/domain.h
> > index 1a13965a26b8..6e016b00bae1 100644
> > --- a/xen/arch/arm/include/asm/domain.h
> > +++ b/xen/arch/arm/include/asm/domain.h
> > @@ -298,7 +298,7 @@ static inline void arch_vcpu_block(struct vcpu *v) {}
> >   #define arch_vm_assist_valid_mask(d) (1UL << 
> > VMASST_TYPE_runstate_update_flag)
> > -#define has_vpci(d) ({ IS_ENABLED(CONFIG_HAS_VPCI) && 
> > is_hardware_domain(d); })
> > +#define has_vpci(d)    ({ (void)(d); IS_ENABLED(CONFIG_HAS_VPCI); })
> 
> As I mentioned in the previous patch, wouldn't this enable vPCI
> unconditionally for all the domain? Shouldn't this be instead an optional
> feature which would be selected by the toolstack?

I do think so, at least on x86 we signal whether vPCI should be
enabled for a domain using xen_arch_domainconfig at domain creation.

Ideally we would like to do this on a per-device basis for domUs, so
we should consider adding a new flag to xen_domctl_assign_device in
order to signal whether the assigned device should use vPCI.

Thanks, Roger.



 


Rackspace

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