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

[PATCH] x86/EPT: squash meaningless TLB flush


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 30 Nov 2021 17:10:53 +0100
  • 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=wX2v+CXmZtuqLTLe/ypVZSOZdElCTK6pbhJs32Pc9K8=; b=kzeqwOot+TT18VljJv5Mz86LJX0zCfrkPgx7xXr7XsuqTBLKyO09fRm6G8EXTbBivmShlQNeF4t46qVCOg75/m3zyT1Bs56PzKlknmPcb/hff426YHLG/nUv4KejabyhYhMzqHBPGnfGmtGFVIQBbJZHB3rxk+Vb+UuWkxAT0GVTvujUCebZ7LFTsHdU2dj605EgNiA9jThd3aC2onKHGyuoWEK0UjXFeYDilhI/XcoI7X25lXsgmOFM2VQmePCoh2/ROMpSmIM3++fc24U8t0mcSHma0e+0RtzKYiuQP2pLlvAxJitqdi9dE3P6dcQ9KEM835qw+QUEwSZN6UXhIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RssAVVZ4Zq6/fv68nZe4LU0qehjGdk1CR33nnpNWYPpsJSfKUC9feZGuMLigqqn5BGV7F3aXjVe4xT+IIlpdWiJtIwyquW8PyPDa4XuiKYrDpNoisjjCuTLQFWlDaMpMWKOlZDQ1AAROXysaYuaB7/dITNuB2gT9EwkKLGeSN9KuUV6UYeZU6efAAp1dxaO2IOxkSbaCVK/aownNDjegf/LS2/cFZCDFWA2SxRmuVPV5W5nByGAl8rGgrT28W28yEjQ/0/q8qg2HLJLQARCx437FK9FLjzcR3QYlY6yZGutHOY4wu8KA50rPmc96vdiksnzchZ4FFWWMbcoz8SviQw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Tue, 30 Nov 2021 16:11:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

ept_free_entry() gets called after a flush - if one is necessary in the
first place - was already issued. That behavior is similar to NPT, which
also doesn't have any further flush in p2m_free_entry(). (Furthermore,
the function being recursive, in case of recursiveness way too many
flushes would have been issued.)

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -246,8 +246,7 @@ static void ept_free_entry(struct p2m_do
             ept_free_entry(p2m, epte + i, level - 1);
         unmap_domain_page(epte);
     }
-    
-    p2m_tlb_flush_sync(p2m);
+
     p2m_free_ptp(p2m, mfn_to_page(_mfn(ept_entry->mfn)));
 }
 




 


Rackspace

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