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

Re: PCI pass-through vs PoD


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 17 Nov 2021 09:39:17 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=c1NbKMx+BVB28B1tLkPrIUq7uBVGcrCysKxVsq2OPr4=; b=kdQWLILk6Gkh3g44NUjqwDhpVZzjL4jleoPWxaKdWP+xInS4evj+WfImi8f/KBEXbh4/1y8vxrc6rQhlBZYexkhx60j+3vqTwI+YSGVgWeU1eTrgpkGuywC223Oj+xw5sYVMiQocLdvfo7q2IGMBVrFW75ypu6uveZGCzsGQe3jKGAAxG8ZFoDPYHoEuUXa5DxeHQkyThRvoG6DCHBDT3nSeC6Ik+kKU6sw3aSVfkF0pig+bBbbJqgUIBRQcPTB9cb6dsoR4VNd1evkWAcwthfVnKpw2bOtewm6EvFKS8cVfh6XZJbWiBBvddX9gtCRng5+Pb2wLuBfABGDLZ3pMlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GIzAStwSOHbEGCZe+Lixy7tbrB9ZW3nL5pWkkf78LTcE0eJDhVTMJeer/ofLAbwGAe1OVMlkDCfzir5ewEbK0+yArbTMtz73xwLm0JwOmCzcOVxYGJ/CtV0qCeEERhb/6HXJBFWO1FkT8wZys4OOpCLNjVdliO2KF0nsHorPY9Mfj4vl6/mE2CzByuLADtVQUtx19Bz9hs7hNFdipt4NsdKFyrgM05L5qv4d9JPiHurMlDBmMs04QIDXzl+NpQX2xweCC3S8yLO1yqbujf03Fzpa6hhpQWs6gEjiLaR1czB0jMfv/OXHRWVlFXkNmGmrxSptgEm8ZtxcIZjUyr2ldg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 17 Nov 2021 08:39:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.09.2021 11:02, Jan Beulich wrote:
> libxl__domain_config_setdefault() checks whether PoD is going to be
> enabled and fails domain creation if at the same time devices would get
> assigned. Nevertheless setting up of IOMMU page tables is allowed.
> However, when later assigning a device to a domain which has IOMMU page
> tables, libxl__device_pci_add() does not appear to be concerned of PoD:
> - xc_test_assign_device() / XEN_DOMCTL_test_assign_device only check the
>   device for being available to assign,
> - libxl__device_pci_setdefault() is only concerned about the RDM policy,
> - other functions called look to not be related to such checking at all.

I've now verified this to be the case. In fact creating the guest and
assigning it a device while the guest still sits in the boot loader
allowed the (oldish) Linux guest I've been using to recognize the device
(and hence load its driver) even without any hotplug driver. Obviously
while still in the boot loader ...

> IMO assignment should fail if pod.count != pod.entry_count,

... this holds, and hence assignment should have failed.

IOW this approach currently is a simple "workaround" to avoid the "PCI
device assignment for HVM guest failed due to PoD enabled" error upon
domain creation.

I'll see if I can find a reasonable place to add the missing check; I'm
less certain about ...

> and all PoD
> entries should be resolved otherwise (whether explicitly by the
> hypervisor or through some suitable existing hypercalls - didn't check
> yet whether there are any reasonable candidates - by the tool stack is
> secondary).

... the approach to take here.

Jan




 


Rackspace

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