[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:47:06 +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=YS4YKMMBa4P7oygcmdaFuVE2nUEbBul3XPI341IHlmg=; b=PPGF9bh/3B7VcJNXRvFEjYgBmZuyI0z1hXVxbM9f9WwWxFGukS0PX56PZbpA4s/MAGZSV/r+N4pLKzzylnghSnRRCJmYscbZ16YS54fi8rPt1hREL2AsCdkUQ92XpaZLxw1ZGayGS9tsg9KJrgbyk1crq1kNa1p3dlZjHHWJhfJnOIC6wBal+SiHiJvKlbj8Sd/8QrDQGsTptTP4OFiClasc9QtAzHzavaiuusskL0WNxYKz0T0AbMbSDYtz11i/h+tpez4ZNX7ho10su7q9b6nAKN4XcEdTZHU1vXPsNlweYRiTUrT2dcVX7ic75+2RRBZ8x3WjjATuPtYQ2w71Cw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vsp540F7bPzO1mq+4jcPkbjodLsgbBmOx7jsdhy7Jxi8oaYQJCB5xN+1xcV0IGZCgpTntVTgf0locAxmcRb1vr9ri6JR9g6SNYOr4uqrqWsXPv15nNIWWVJ23L21KVfRfLZsGwKhaUq7gzvQeQlP/Ehbhhk0bgZ0Os1J+LtUt8fRzGX+v8j4s296giWmv6t6iH0rz1cBRhxlEx61mUkcMMESPujYxxe+Wq20ug2mAy9dfLs+ULXD+aZytnA/SVKZcOFpRP+abwYClxSkp4kDs6uHETX14oImw5P2laTpv3Z0221hiIA6JiAwRBBX8yfhql7HWAi3Eum5QeOtSVBUxQ==
  • 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:47:34 +0000
  • Ironport-data: A9a23:zQ/26q9dohbTtHo0xR/8DrUDMH+TJUtcMsCJ2f8bNWPcYEJGY0x3y 2cdXm3Ua/uPZGCkLowlbN618h9XvZPQyYdjHgtlrSA8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ird7ks21BjOkGlA5AdmOqgU5Aa2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklpx No2EAtKVimiuMPtnrTkRcZ1gfgseZyD0IM34hmMzBn/JNN/GNXvZvuP4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWMilUuidABM/KMEjCObd9SkUuC4 HrP4kzyAw0ANczZwj2Amp6prraWwXykANtPTtVU8NZHvwzNmEdDASQmdhzmk9r6lxHhdstmf hl8Fi0G6PJaGFaQZtvgWxy1plaUsxhaXMBfe8Uh9AySw7DIpQaYAmQJRCRIbtAOvco6Azct0 zehj97vQDBirrCRYXac7auP6yO/PzAPKm0PbjNCShEKi/H4u506hB/LStdlEYa2g8fzFDW2x CqFxAA0iq8Pl8cN2+O+9ErenjO3jpHTS0g+4QC/dlyi6gR1dYu0fbuC4FLQ7etDBIuBR1zHt 38B8+CZ6O0NFpiLmDa6XPQWHLqp6vCGNxXRmVdqWZIm8lyF8mS/cIVn5SBxLUZkLO4JYTbsJ kTUvGtsCIR7OXKraep7Zty3AsFzlKz4T426D7bTc8ZEZYV3eEmf5iZyaEWM3mfr1k8xjaU4P pTdesGpZZoHNZlaIPONb791+dcWKuoWnAs/mbiTI8yb7Iej
  • Ironport-hdrordr: A9a23:N/sUnKEVvXZbM4dRpLqE5seALOsnbusQ8zAXPiFKOHlomq7xra qTdZEguCMc5wx8ZJhNo7+90cq7MBHhHPxOgbX57Y3SOzUO0VHAROpfBO3ZrQEIcBeOldK1u5 0AT0EEMqyVMWRH
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Jul 07, 2023 at 11:33:14AM +0100, Julien Grall wrote:
> Hi,
> 
> On 07/07/2023 11:06, Roger Pau Monné wrote:
> > 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.
> 
> I am a bit confused with this paragraph. If the device is not using vPCI,
> how will it be exposed to the domain? Are you planning to support both vPCI
> and PV PCI passthrough for a same domain?

You could have an external device model handling it using the ioreq
interface, like we currently do passthrough for HVM guests.

Thanks, Roger.



 


Rackspace

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