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

Re: [PATCH v3 5/5] [FUTURE] xen/arm: enable vPCI for domUs


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Sat, 28 Oct 2023 10:54:04 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=ZC3B/ZD83xXgRJuYAFVx9TYHCGNdgcnn/fu4C3+kc3o=; b=SEtuIJf5iIG3McSSwNdKSNTAWBiPpHBaeZKk7ITu0cE8WETYBkAsNvbYIbUABxPD3UlWCOVkShoNXJQDDnOCUXaFfhf36yIonCgd7Fv880abpSXGfPTQn5mo58YDZXsA+DMV1EvJ79M/AFKBCDga49c/xg3FyqCMcG7HKBfBnQC3gdJcO2F8l/HtouAGNCzWnwx9o53tfiUNq8P+pzy4FyYX+rygXIMV9kxchOtCi46OhCResDkS3aFxXA/Rq5BhsQCmaKAy3yTH5r/E7YqZuec+TV0mODy6HqULsAxStFVf7C8DMtpqKmcd9DvWLgzcNpQ180FvzpDUYfhvZsRKrw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m3dwHQLkhzxTqM6Pn3CM1dshSUkZeeLm2MmLaxuaWKUAem3vgfFZbOI+THfKayAuRnGIxQy3wyQERXllu29wHnN3yBzSd6fovlZe27PLScAayf9/FWWLSHvMg33dtaIGpTpmVT5+N1JC/6XBteTJjVLCwGJ6/tXZ2jbSVOcGDC1mIgUxhlCzUws0Z8IrJq202WYHwoggKzxpmuMsPjdVpfwa9zlVV00aJOvDG1z8m0X+aSZrQ5PCBrjjq76o8FIdzo6iUIfASUJlTGo0MjM3/Kchof4gTgVVPu2MoSExtfynaO3y2J9Km5qlM4go85uKJWyzQ/ItVAfrjNQj385Ucw==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Sat, 28 Oct 2023 14:54:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/23/23 06:27, Anthony PERARD wrote:
> On Mon, Oct 09, 2023 at 03:57:44PM -0400, Stewart Hildebrand wrote:
>> Select HAS_VPCI_GUEST_SUPPORT in Kconfig for enabling vPCI in domUs.
>>
>> Set the pci flags in xen_arch_domainconfig to enable vPCI if a pci device has
>> been specified in the xl domain config file.
>>
>> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
>> ---
>> As the tag implies, this patch is not intended to be merged (yet).
>>
>> 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. I'll coordinate with Volodymyr to include
>> this in the vPCI series or resend afterwards. Meanwhile, I'll include it here
>> until the Kconfig and xen_arch_domainconfig prerequisites have been 
>> committed.
>>
>> v2->v3:
>> * set pci flags in toolstack
>>
>> v1->v2:
>> * new patch
>>
>> [1] 
>> https://lists.xenproject.org/archives/html/xen-devel/2023-08/msg02361.html
>> ---
>>  tools/libs/light/libxl_arm.c | 3 +++
>>  xen/arch/arm/Kconfig         | 1 +
> 
> Can we have two different patch? One for the hypervisor, one for the
> tools.

Yes.

> Or does the both depends on each other, somehow?

They will both be needed for enabling vPCI in a domU on ARM with assigned PCI 
device(s).

> 
> Is guest creation going to fails if we set XEN_DOMCTL_CONFIG_PCI_VPCI
> without HAS_VPCI_GUEST_SUPPORT ?

No, currently the guest will still run, it just won't be able to probe any 
assigned PCI devices.

> 
> Is the guest is going to fail to run, or fail at creation if the
> hypervisor HAS_VPCI_GUEST_SUPPORT, but we didn't set
> XEN_DOMCTL_CONFIG_PCI_VPCI?

Assuming num_pcidevs > 0, the guest will be created but fail to boot as it will 
try to access the vPCI configuration space, but it will trap and panic.

In both cases, I think I can do more on the hypervisor side to check for an 
invalid configuration and refuse the domain creation with a helpful error 
message.

In either case, if a user does not try to assign a PCI device (i.e. num_pcidevs 
== 0), then the guest will run fine.

> 
> Thanks,
> 
> --
> Anthony PERARD



 


Rackspace

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