[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: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Wed, 26 Jul 2023 15:40:55 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=HiPVImh54WcPda150a82xUPDrANFLQnSjE/Im/HPrG0=; b=DdglyCVn4DAuEd5TXszERbHFwqr9QiR7q/U7Uy9FijnQpYghTTb4gRmA+qWlW5Yzb3b2/8xYfDs2j1vG/dULgS6Z/cIlMyBBYQh3DgMXCEh/z4nUPifZDs+hIYpK8WQskb/yrG/JneiJCms/e9e59VVW00qMUVWUjpA/jLVeT8d3QIquuXPLG2CeNW+tiYyMZdQu8z/yNM7iBZxKWfHlEA/nng44DPhEteEo5VfmvybrdJuzNJPlBZb6xw0X4O/nM44kiAeOAZgxqkBtttBqiNCualyaXABUzOyk9IibVHGclbUdDIsPy4lRaeqXrAx+cFQqCb8N3LLC5/cLv4Jh2Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QF/9jetbFdYsieSnTr1edlWQ3egXewbEtoIem1C2o3JELysK3UZjb15K22ukVretBqY4yEBNpiDd0a/w6R10pyHCMJXJfFs36Tp0lBxNX/7MEc1sx64lCTYmyrTpIFDnLT2Z3yH6DxEdMJhVA7JN5CO8sqknSXjAfhJLW0b0lzaP4qLdl5FiX+/pqpwtQ3aowmajvXBOAL6YV3Rb0PIGX8hkLpAH3rcpBbwtpkvmdVFbqAkH2NJLWuZNWTBq8nlVNPuJ5WoaBVy3BU+nJpbARQhFNB4+E/UfmwZiKQbaruzlsPce/YiAIG+7Ycr8kAmWQYbbbOmEqWGMhBesMPMQIg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 26 Jul 2023 15:41:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZv8pFQRXFGkDWd0GJKKtbGNV896/ML4QA
  • Thread-topic: [PATCH v2] vpci: add permission checks to map_range()

Hi Roger,

> On 26 Jul 2023, at 3:01 pm, Roger Pau Monne <roger.pau@xxxxxxxxxx> 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>

I tested the patch on ARM board with vPCI enabled everything works.

Reviewed-by: Rahul Singh <rahul.singh@xxxxxxx>
Tested-by: Rahul Singh <rahul.singh@xxxxxxx>

Regards,
Rahul


 


Rackspace

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