All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Julien Grall <julien@xen.org>
Cc: Stewart Hildebrand <stewart.hildebrand@amd.com>,
	xen-devel@lists.xenproject.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	Artem Mygaiev <artem_mygaiev@epam.com>
Subject: Re: [PATCH v2 3/3] [FUTURE] xen/arm: enable vPCI for domUs
Date: Fri, 7 Jul 2023 12:06:25 +0200	[thread overview]
Message-ID: <ZKfjoXqb6Kgav-vL@MacBook-Air-de-Roger.local> (raw)
In-Reply-To: <e5a0ed8a-d85b-fb60-609a-f46884433c60@xen.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.


  reply	other threads:[~2023-07-07 10:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  1:47 [PATCH v2 0/3] Kconfig for PCI passthrough on ARM Stewart Hildebrand
2023-07-07  1:47 ` [PATCH v2 1/3] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option Stewart Hildebrand
2023-07-07  6:55   ` Jan Beulich
2023-07-07  8:10     ` Julien Grall
2023-07-07  8:38   ` Julien Grall
2023-07-13 18:40   ` Julien Grall
2023-07-18 17:35     ` Stewart Hildebrand
2023-07-20  9:20       ` Julien Grall
2023-10-04 18:07         ` Stewart Hildebrand
2023-07-07  1:47 ` [PATCH v2 2/3] xen/arm: make has_vpci depend on CONFIG_HAS_VPCI Stewart Hildebrand
2023-07-07  6:59   ` Jan Beulich
2023-07-18 17:01     ` Stewart Hildebrand
2023-07-19  7:42       ` Jan Beulich
2023-07-07  8:55   ` Julien Grall
2023-10-09 19:11     ` Stewart Hildebrand
2023-07-07  1:47 ` [PATCH v2 3/3] [FUTURE] xen/arm: enable vPCI for domUs Stewart Hildebrand
2023-07-07  9:00   ` Julien Grall
2023-07-07 10:06     ` Roger Pau Monné [this message]
2023-07-07 10:33       ` Julien Grall
2023-07-07 10:47         ` Roger Pau Monné
2023-07-07 11:16           ` Julien Grall
2023-07-07 11:34             ` Roger Pau Monné
2023-07-07 12:09               ` Julien Grall
2023-07-07 13:13                 ` Roger Pau Monné
2023-07-07 13:27                   ` Julien Grall
2023-07-07 13:40                     ` Roger Pau Monné
2023-10-09 19:12     ` Stewart Hildebrand
2023-07-07 11:04   ` Rahul Singh
2023-07-21  4:54     ` Stewart Hildebrand
2023-07-21  8:41       ` Rahul Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZKfjoXqb6Kgav-vL@MacBook-Air-de-Roger.local \
    --to=roger.pau@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=artem_mygaiev@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=stewart.hildebrand@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.