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

Re: [PATCH v2] vpci: add permission checks to map_range()


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 26 Jul 2023 16:54:15 +0200
  • 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=bqAYqWtayfuq+5rHXVM/D4d7b6c8HBXRhH9aHqA1pwk=; b=Qp42XLSIOzxC3Yw6T6U1Kgv+maS3Ro0vwFVKori5WFbKfd2uk7vC9Rk493fH7GWeFTBbcMl0TQ8bayxXfdbS0DoZmwkCMkkD1RREj+zfD0x4VQhz8WFT2d8uXgdn/ydJOkh8EGUgmlbGyJvthfH0Z1DhXkTuFUOj9IG6epJUwjrx2DuAnV1pImrJ/NNr2fToQcWrElaI+0QmHXrYCEkSsMKeZ2Nfyp0TQlAZGQOiVjJRrJvN1BERimoMGtM/F5GDntAwAraVNgfoA5ksm5bZUlDdyki0DP04ItKFdkgmU2E/kAIyYtHL+UHq90XcWnvsru3pQZS63g9CvLs0CeLVDw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NeXBo3hfv9kAUVSDoph9MWQC8X2cfQyniLkBOv2usn0EiBw5aXKgW6te/t32si4TywBQwrT8udYMx2kDzeAR2U1uI4NtYsO/kH9lvv/ANsUFnASi36B+CDxQ6jViE0lUhF1c+mNQQDO5LWytYjdxqDGZGl9WnfbbowDBO5t4uVqCFH1zjbtOW+behGRuxMeXWvQh/VzaWaKQEM1F12JCnU0QwzyMFScDAF/EP4devOhuvUAmfjtNm9U/ucvQipAxAq80PFl0PMn9n6T1ASzUNLBvQfVAmrBTcpHbt+9NZ5baiFinJx16OWJYDyCgZNcuqgvFDTSzPH/wH6gJcpuuhw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 26 Jul 2023 14:54:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.07.2023 16:01, Roger Pau Monne wrote:
> Just like it's done for the XEN_DOMCTL_memory_mapping hypercall, add
> the permissions checks to vPCI map_range(), which is used to map the
> BARs into the domain p2m.
> 
> Adding those checks requires that for x86 PVH hardware domain builder
> the permissions are set before initializing the IOMMU, or else
> attempts to initialize vPCI done as part of IOMMU device setup will
> fail due to missing permissions to create the BAR mappings.
> 
> While moving the call to dom0_setup_permissions() convert the panic()
> used for error handling to a printk, the caller will already panic if
> required.
> 
> Fixes: 9c244fdef7e7 ('vpci: add header handlers')
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>





 


Rackspace

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