Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp338534pxb; Tue, 19 Oct 2021 04:05:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYteFIU+xHcbPutIpkhcxc4v+GhtibOCJNn/OLmX9DzqTyhU/GGFxphf4NnjHd1rDqGqgg X-Received: by 2002:a05:6402:94c:: with SMTP id h12mr46420741edz.21.1634641501239; Tue, 19 Oct 2021 04:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634641501; cv=none; d=google.com; s=arc-20160816; b=B8zWrK/Op4nGHnVjeEM1z5tQw259wEIcOxhlrHdDRq7MA3YjeA30yrPtP6E/61m4tA d1FMr493bZGX9OFW5gmMV84hROHHriGpZ+bFVj0sXvPJDI/7MI2HNysIpe30vXx2U8Sx aVy716caEGOWMtQAy6v7f8GFYwipiHLr2quKXeDhZOTdz0xlDrPYGTplLRYLAkqr1KQU GW3U/h2ChEpSDW9dQcYNjxcT5k1Yv12TeaqkFWwATuyxFcx0Shj/Xor9OWwxUfLgdxj+ 4yCwyZhp3pn1pyI5ciBCzH8tDycYb6Au2dfGvznQSTRBQCCULY7jyY7E8Zw+Hf6z5pBc FDnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cgY66n6bzkNSfBJEVaCeCJZfl0VGEk0DYQ8DubWzqUE=; b=BLLCrJWnXFCJZJ8kYFkiUoPxC1kOcrurEu8EJJdt4QJM0vdaKP9xYUI/Urp+BGDA7Z G09IXNUlRnIMc+nxKFHa8aohAknzf9uvBblv6VMXoNUlfWwTTQFJDfYLx2KH9CXb3ZDO cICmd1ALiooHPak5X1qfct6tJ8uKjgy7w7q8H6Ta5ToHZKLMuI4Sn9kpRJRcolXzovvr eyitpVXluLqX6f4m1rCf7dM0OjWoRTN3dxaOFuBvtJNG9s4xBFNzggnMUQWLLZe0z4DM Y1tlyKjx7Z6qNUEiW2wh9C3LCJ8NpKUoxtyAWn4Oz1Kt+cDBDtMtLPKzsSeoXSPntYZv 03aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=agQ1Bs84; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si22153808edw.448.2021.10.19.04.04.35; Tue, 19 Oct 2021 04:05:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=agQ1Bs84; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235282AbhJSLED (ORCPT + 99 others); Tue, 19 Oct 2021 07:04:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbhJSLEC (ORCPT ); Tue, 19 Oct 2021 07:04:02 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73D4AC06161C; Tue, 19 Oct 2021 04:01:50 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id 75so19013853pga.3; Tue, 19 Oct 2021 04:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cgY66n6bzkNSfBJEVaCeCJZfl0VGEk0DYQ8DubWzqUE=; b=agQ1Bs84IFWTBslOLrsdlItzELZOM4PpTi6mZK1O2icypbLdGiWPqgcL8WuHF0g7F4 zGJbANtLV915W+ZIAg/8BT6URnVHvQ/elN9NCe6ZQF3g4BmVrKSh3yNRmspFkMF6WEXb fa9MICevxlSJj7w1Wv0pCKWHBbLNt4eMxxHPYqdDn1/VQNOEG3xgLfsC+4gSyuIlUR6z EZFYx05Mxtj2iHRmeqpDTXCdFKrTXKmc9rPZauozBp6aJ0Qf4OpP9NQ5hDxC4OVzL9tg BfIyH4GKAWnBG+DsDnjnyz95IKh4aeQwbC7IczLzjHXEY5pVv4aHNiHbppDRRUE0QFKE etDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cgY66n6bzkNSfBJEVaCeCJZfl0VGEk0DYQ8DubWzqUE=; b=JiiKYX0cvv2O0I/KFaWi9s5srVOIQSJtsXLPSz4m48ewbqbrRqZwUefwDGANQ4TYYU MIEaW6r+MhweuX6eac8JSnhPYXGFLE3VoAeQxmdfTAt+H9qT92UZdOgVh/SbV3juCfu7 mewQbG1Ls5WHgRto1gkRkhXxDQ/qo9r0znbjffkbw4nEc9p3tvDPuSwlU3083w1R4Qrs SA1wzXRWG0irUzZ4VGpwXLTVL1Ps4fmS/2m/kJK7yuSJlHBMBdz0GSfnIIekIoXn6ltJ 0bVqp7INvKU4ezFi6ubkRW9Hws6RnALdZjtrgYD7ue59e9GKuvIr88m2fnP2D8j5+IZi vAuA== X-Gm-Message-State: AOAM533tTugANsv5KJeFFlsA+PZ3k/isADbSr0fkVf87LMbefOd9UbjT B6xVZ5sQMcfwZ9exodt7gOzV4gj1zWQ= X-Received: by 2002:a63:7355:: with SMTP id d21mr16444975pgn.179.1634641309819; Tue, 19 Oct 2021 04:01:49 -0700 (PDT) Received: from localhost ([47.88.60.64]) by smtp.gmail.com with ESMTPSA id bb12sm2529306pjb.0.2021.10.19.04.01.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Oct 2021 04:01:49 -0700 (PDT) From: Lai Jiangshan To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini Cc: Lai Jiangshan Subject: [PATCH 0/4] KVM: X86: Improve guest TLB flushing Date: Tue, 19 Oct 2021 19:01:50 +0800 Message-Id: <20211019110154.4091-1-jiangshanlai@gmail.com> X-Mailer: git-send-email 2.19.1.6.gb485710b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lai Jiangshan The patchset focuses on the guest TLB flushing related to prev_roots. It tries to keep CR3s in prev_roots and improves some comments. Lai Jiangshan (4): KVM: X86: Fix tlb flush for tdp in kvm_invalidate_pcid() KVM: X86: Cache CR3 in prev_roots when PCID is disabled KVM: X86: Use smp_rmb() to pair with smp_wmb() in mmu_try_to_unsync_pages() KVM: X86: Don't unload MMU in kvm_vcpu_flush_tlb_guest() arch/x86/kvm/mmu.h | 1 + arch/x86/kvm/mmu/mmu.c | 63 ++++++++++++++++++++++++++++++++---------- arch/x86/kvm/x86.c | 53 +++++++++++++++++++++++++++++------ 3 files changed, 95 insertions(+), 22 deletions(-) -- 2.19.1.6.gb485710b