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

Re: [PATCH v3] iommu/vtd: fix address translation for leaf entries


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 25 May 2023 10:56:17 +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=C6fLJWvGDfGn+BhrKUr7jiiyU/8I0tYuAGp9pCjZmKw=; b=dSe6hK+6r+d6I5RXTF27IE+Cv9ghhDbsmysgLjnI+netHVxze7Hmj7pA2TSQVS6zRGanKNF7aqXPPlvDhG56iIy4j1jw6o9oIknagcCPiTry9nmuliTJKbyVyNioKfyfuIeMERFrHr9dnG+/7iia/FIKqj7zesMAmFYmNCahOiutSIMH9T3llOWznxzVYhpZPwGgEIkP7Z7M+1HjZ08SyZI3PD3qrK2gbIK8RtF5m+vp4yLAZmds1rKLHxDDRSz1DtBTZUmtue29DaIqCAIN1L1PJmqsc8zYNS1qxl9ECpGWM5NlL9bKtaOj50rzsKCQU3oYcj8qyjT8hkDz6sHIBg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PER1QlZsZ59YvVeSJgHMkWjWaGlBqIU0JctjpeWojm9edanvG/CJkiV4U4iCCh1c+Ps/jOedzdqlOjzXdnjsuk6QYhb8mxo/YGD9GIXJ3BxdIxyxoni9mZCiNyg9Axp2UdHo5UR5W+kuWTcDXy7lb8D5OONNzevlXkTgf2MSHfGWsv0tWMQ3CwMqpEbSd4VZOOPiuT17UKQX/Hqi+ZteZ93bGZnM67e4evzTdlYIE1tjYnB52w7mrJvT3oMRiryaK/SkSoM9oPgRmu4Y2zcz6ealXyRgYy/SWlUOfF2QITR+G2etSxRqlS+Qn2k1+bUWnkuAIkcgqTSctmkhDBS57w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 25 May 2023 08:56:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.05.2023 10:08, Roger Pau Monne wrote:
> Fix two issues related to leaf address lookups in VT-d:
> 
> * When translating an address that falls inside of a superpage in the
>   IOMMU page tables the fetching of the PTE value wasn't masking of the
>   contiguous related data, which caused the returned data to be
>   corrupt as it would contain bits that the caller would interpret as
>   part of the address.
> 
> * When the requested leaf address wasn't mapped by a superpage the
>   returned value wouldn't have any of the low 12 bits set, thus missing
>   the permission bits expected by the caller.
> 
> Take the opportunity to also adjust the function comment to note that
> when returning the full PTE the bits above PADDR_BITS are removed.
> 
> Fixes: c71e55501a61 ('VT-d: have callers specify the target level for page 
> table walks')
> 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®.