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

Re: [PATCH 7/8] x86/mm: adjust type check around _get_page_type()'s TLB flush


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 12 Aug 2022 10:51:35 +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=XetQQuZpxIoA6grAPLL3ySsHRelQ/A6IloUfXvDNr9o=; b=Q3ZLFdC40aTb/sQqU1Ewiu+fRcJP4AHSSYDtxqJc9juI/pC1k90hXILPgCIq7m8/jljthUdwoZmLpDEVM2aHGMHCEfdXbnKkjOgQbLNw+GQZh0w1/QUj5yk4gE6bQIQf+SKta/+spxcG6+KCjuNiZ4uIJs4WLdgK3coQrTTwK692q4EJKsnD7w8nk68gmn9aKSWU6YmEawk51cxlcEeuv3L00BVdoeFPyH4Ss/EHF4nFzEBo89vf/ma+G9wNDjvAW6iI8MJ+7AZNBx2cy9DzCM3e0EPh5Nyt8P9XD2Ik2Iq2qKNlbgqAzlXQapoDYKMZboWkM9QfOWK0zRzLryrx3A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EplrB5G4M2uS/YLeAduG2sWAxQConYxbG7CLSMywfg7JW9vrDSLOJw1CHfDPDKceU3AMgot3OL/hnvFCgGRL40GihrKaYcSwB7sBKX/gXRezRkoScNdf03efe16g0j0bb91n1AUBn/Bg96u5WtskNEV35RxlbQNtiQ4vpmDUyGfBkJkKgd9fGg9ejMjmxrNwf4yxgi73lyIsM7dCFvEVB8b/+WSqXYwilAe+xW2P7c4Zm91/Ok30WYCrz8U0aa76VEEXa+MBs3nDQu06JbsEdc19N1C5KHq6/FYdEyi3JzssdTEYRgkEL93Cpmq2fpu3GATgvKt16z+Cij5Fn8sWUw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, "Tim (Xen.org)" <tim@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 12 Aug 2022 08:51:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27.07.2022 20:25, Andrew Cooper wrote:
> On 26/07/2022 17:06, Jan Beulich wrote:
>> While "type" can include PGT_pae_xen_l2, "x" can't, as the bit is
>> cleared upon de-validation (see also the respective assertion earlier in
>> the function).
> 
> While this statement is true, it doesn't really explain why this is
> relevant (or not) to TLB flushing.
> 
> As far as the change goes, it's safe on 64bit builds of Xen (I think),
> but would not be on 32bit builds when this logic was first written.

Actually no, I don't think it's safe, and I therefore withdraw the
patch. (I'll re-base the subsequent one accordingly, which you did
give R-b for already.) Whatever content may have been in an L2 table
which is to become a PGT_pae_xen_l2 one may still be in TLBs / paging
structure caches, yet we'll replace those entries without further
flushing.

The opposite direction (previously PGT_pae_xen_l2 trying to become an
ordinary L2) is "fine": Due to the Xen entries still there, its
validation will simply fail.

Jan



 


Rackspace

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