Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp756106pxb; Wed, 27 Jan 2021 22:08:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMq9237MNLTfO0hBW98hy8NmM58mpiGazoLHPrsdOQ9o/14Og4CHxUQRoGhkW6hkDk3ory X-Received: by 2002:a17:907:7289:: with SMTP id dt9mr9680146ejc.446.1611814079848; Wed, 27 Jan 2021 22:07:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611814079; cv=none; d=google.com; s=arc-20160816; b=flQectujm2cvw1PikgGFcZ3sZnJa0SNmJvCjaPDVagL0GlzLaS0Z5V4AGZ2Nb9rrr5 TGJXAob96vkVlYgM8RfDHnYKwn+9E7ORTx4rWDq54SH9htx6M+SJXhUy4utt2Og3vTx8 97V2vdE2py/ivV/GFQaPPWGyZ5O7zez1XOiFEiUhuCs1sNrJdWR+xPYYNLMezoeopVa3 gdE+tcjvVdFMkU7L1qVmQB+JoQODt+tUuXCKlrR+yWicsOiwrurwF0m5e962GrSopq9I N+1MI9tOnzhGdnpPgiybaeBnUO9clEVtitinTv1/jKMVRaTlEjaO7v4OnqpIZ8tAzUg2 oWVQ== 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=Il8qZNLJiUnVs1yENR7U+/PHj95Y8fthqxWVAqkzlPM=; b=jMtx5d9b65hr+wVlFCAOE5Lj/Ez90lOfzICn+lOrq+mu9VmNIw6jeONH0RmDFjkloW vnc9TIv4oqfjOS+CliL+4/Dg4Xo6Iday5WBUGHXoDaUslpGkiYReAlP8gYJK/PDPM6kv KNBSA9uOM7LKIVrIupXrJufPuSQ4CEaknCy0B/920+MPRir5rWCn3f/M94gmMwLPjaBf A7vgC6F555gRMIOdpqW8w2Y/66rtjkwlXBDYTO2noX/WTyFIxhRDpnYCGUwSeqAYOj6A atuaFVZaKhbaQg6bAnzWXlsUz00qm1uXWQr7J+Vz/fS+kPV5kavzlPD2PfTchgKrYyPd Tq1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FOBAuUwt; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y62si2638588ede.330.2021.01.27.22.07.36; Wed, 27 Jan 2021 22:07:59 -0800 (PST) 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=@chromium.org header.s=google header.b=FOBAuUwt; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231329AbhA1GG0 (ORCPT + 99 others); Thu, 28 Jan 2021 01:06:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231191AbhA1GGI (ORCPT ); Thu, 28 Jan 2021 01:06:08 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51B86C061574 for ; Wed, 27 Jan 2021 22:05:28 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id c132so3603590pga.3 for ; Wed, 27 Jan 2021 22:05:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Il8qZNLJiUnVs1yENR7U+/PHj95Y8fthqxWVAqkzlPM=; b=FOBAuUwtS7jVTeXxIChL9bNsz+Er77qc8WeJTUw3A9nq5VmzNwUAKBriJKft/2FquC lZ1AHyh5KOkJj9MCdwK+uRaOkDxeiWtZsQ5uhyci9WKjrgU878iPVblmqSfMotl3qqsZ AadDpgG2cJ01V8kMSBtXZ7XoVEWtzV5RpOGlc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Il8qZNLJiUnVs1yENR7U+/PHj95Y8fthqxWVAqkzlPM=; b=hVI9JUbMC+xRXI8g/XXC0SmdRvjcHeQxOvza0k4QlkqOPVnbdcb4ycAdXX+R1501eN T9Wjf2yX18rE0xm60hmYEQ8c38jFm+q9PnB/OmW/Roe7CElb4qkEE9kfTi+1LExX4J9o 9dqlKFnaxeOrBl6/bmxgPunAsvT6LDL/QXDwk4l3NXyaZcBzVdSll2JCLunLU86cS4QM WcIxSeCKdPFwYabsnCEcGPY1BDDZmABhgUHq8N+0bIHXTDmhx4QTaYF7XIP5rk/ITwg/ k+DbvANfwxHR6glslIjhsxUixLGCwwpQf2ZZePjOvH/lBGvaZrSs93W68ZkTYf0pGoiH KHnQ== X-Gm-Message-State: AOAM531wHxS2KKIiXGbf08Q0jZpZFeFwCrUYd2w7qACuG5bDT9xnPjo8 fLsktMm+ElwrxH4oQbDKVE170g== X-Received: by 2002:a62:1690:0:b029:1c6:fdac:3438 with SMTP id 138-20020a6216900000b02901c6fdac3438mr6879262pfw.43.1611813927818; Wed, 27 Jan 2021 22:05:27 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:919f:d6:7815:52bc]) by smtp.gmail.com with ESMTPSA id z6sm4345903pfr.133.2021.01.27.22.05.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Jan 2021 22:05:27 -0800 (PST) From: David Stevens X-Google-Original-From: David Stevens To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Huacai Chen , Aleksandar Markovic , linux-mips@vger.kernel.org, Paul Mackerras , kvm-ppc@vger.kernel.org, Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , David Stevens Subject: [PATCH v3 0/2] KVM: x86/mmu: Skip mmu_notifier changes when possible Date: Thu, 28 Jan 2021 15:05:13 +0900 Message-Id: <20210128060515.1732758-1-stevensd@google.com> X-Mailer: git-send-email 2.30.0.280.ga3ce27912f-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches reduce how often mmu_notifier updates block guest page faults. The primary benefit of this is the reduction in the likelihood of extreme latency when handling a page fault due to another thread having been preempted while modifying host virtual addresses. v2 -> v3: - Added patch to skip check for MMIO page faults - Style changes David Stevens (1): KVM: x86/mmu: Consider the hva in mmu_notifier retry Sean Christopherson (1): KVM: x86/mmu: Skip mmu_notifier check when handling MMIO page fault arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +- arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +- arch/x86/kvm/mmu/mmu.c | 16 ++++++++------ arch/x86/kvm/mmu/paging_tmpl.h | 7 ++++--- include/linux/kvm_host.h | 25 +++++++++++++++++++++- virt/kvm/kvm_main.c | 29 ++++++++++++++++++++++---- 6 files changed, 65 insertions(+), 16 deletions(-) -- 2.30.0.280.ga3ce27912f-goog