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

Re: [PATCH v4 18/21] VT-d: replace all-contiguous page tables by superpage mappings


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 18 May 2022 12:44:06 +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=i0h2MhtvAiylbwO7u2LDU9wyG7PVG1ZU+6D2qfjlzzg=; b=jaPVq9tQKsqljVEyNum0h7W4LfSelEkxB6EwKZvOBEjVAJKHDjmdk4DnfLqa9R4T3c40SHyfy94KgZotViV+GLb0shh8EmFlZKrp3rHhzZpIN7M4CvWuBvTRuV1c5Wnf1/88Ik+NLqpkXWuP5nzDoX86wkWYSyntpqmWymOCPo/6u6GH6x7uZbra8e5iGT/Bigd7OoWPZqdZj8fikylLRyA25BNSNon+MABr83/6jMiFUDx8SO8ujLJQddKx+8ciFaCzrE4skdwhUtdRJJmfeB3J3sg2EBv/GN1/+MMKYt8gHl+Hj889zs5JjQ6zMiP7tumUkf0bdx+Ktxzck2zu9Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JgB2heJgsDC8JxX4jHeALn1Ceu554EOeQ8zlNTU+1c0ZaE+78Z7SDuHn/bRAghhaxKDiM4ydN6d/ENK7twEkvf2X1He21EaOqQ+Htgjpc8x6jyzFH/BFS097MUjSvGrG3nZwO4ZTKekX0a3MDMOAjccqBGZQ4rKlQt+d2US6nDv1wOHifvFMztkU8w0BgnDMMBzveePCWriz+tlD+TxGs83BcuoOFP7zFExHHh9RRlNlj4gHGlhHC13TuujLgVgkASq5qGtCmOr5HHTD4nifTptQv2koqLlKWSvc9gEZQq43f8iSXhlBdZxkE98X9sKYUstROMavw1IFzB7C+VSArw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Wed, 18 May 2022 10:44:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.05.2022 13:08, Roger Pau Monné wrote:
> On Mon, Apr 25, 2022 at 10:43:45AM +0200, Jan Beulich wrote:
>> When a page table ends up with all contiguous entries (including all
>> identical attributes), it can be replaced by a superpage entry at the
>> next higher level. The page table itself can then be scheduled for
>> freeing.
>>
>> The adjustment to LEVEL_MASK is merely to avoid leaving a latent trap
>> for whenever we (and obviously hardware) start supporting 512G mappings.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
> 
> Like on the AMD side, I wonder whether you can get away with only

FTAOD I take it you mean "like on the all-empty side", as on AMD we
don't need to do any cache flushing?

> doing a cache flush for the last (highest level) PTE, as the lower
> ones won't be reachable anyway, as the page-table is freed.

But that freeing will happen only later, with a TLB flush in between.
Until then we would better make sure the IOMMU sees what was written,
even if it reading a stale value _should_ be benign.

Jan

> Then the flush could be done outside of the locked region.
> 
> The rest LGTM.
> 
> Thanks, Roger.
> 




 


Rackspace

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