[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v3] iommu/vtd: fix address translation for leaf entries
- To: Pau Monné, Roger <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
- Date: Fri, 16 Jun 2023 01:09:29 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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=LxGP2GWzJRVmTxcnM6mofTmNwNDqLU+VDC0evC6/D94=; b=oQgn+p4XwwdXnOYlKtqHTKvxTRJ+PAmxfgEx69in5gS0JA6kUXrNrg0nfMToeU3cOTXOsSpJ7tEuwuYAS0x4VDJGBx8ou7wSLo7vWV8cstInQglrTnfaptsXTvoC+cda20Xc0ez2d5Cj32SZ9Yf6KhRVO67BITOc+oAa9rX4ctlSICEI6y4Q0UEKOFDK1ADMDdK6Fn8nBZwyFxJ+45xmBj706nL9Mz3x04M7K2xxbkt+0/syjtAPWCXYBx+fExKOo5RVcuobxijK9rJ0PStAw5emIGRTwOzF5GK/TpSls7+ZD+sJPjqM3eWIrpYvkeZMAOy9Pfqn95yKx5X76/MUkw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mmF5uMiR1di6V7Kwobf96dw0/7VNo1jNi3W8Y72UWDHoFw9N822tse4WScUfJ942g/Rmj5VjN28AndSzwxLLZ0FWIVF0gKLVELG1sAYnxEwdg8+IXJRWhaQyTtqNFPNIAYkVdwO0mXWwQac/2Ip4SEbf9obnrMBRHV6gziMk/DXzDdKPlIq41RHVyrT92xRXpmFJUKSz2hGlRQveL4WM2bu/IJA4gIsFbYTdZw0MC6M+y+acDzAY1Wll48HH98kIKEI8Fm8M+0Uxbm50i9zb4xMnQPSdDha8wFkh8yhEXLdh5bPkDU+OtWT5HVLhUvi1SJVtxMRgP0a1zsMsppvQEg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
- Cc: Pau Monné, Roger <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 16 Jun 2023 01:09:57 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZjuA2oVnv7WacykC43mswHahgOK+MwIiw
- Thread-topic: [PATCH v3] iommu/vtd: fix address translation for leaf entries
> From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> Sent: Thursday, May 25, 2023 4:09 PM
>
> 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: Kevin Tian <kevin.tian@xxxxxxxxx>
|