Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp18246imn; Wed, 3 Aug 2022 17:40:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR6JA75f7prgEn1mDfkplonZXB65guEzgwcM75Rydkl/D9NlXnBPmRT/19ieD61Yxlt4SDUw X-Received: by 2002:aa7:d8c6:0:b0:43d:b0a1:5266 with SMTP id k6-20020aa7d8c6000000b0043db0a15266mr15389508eds.164.1659573637596; Wed, 03 Aug 2022 17:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659573637; cv=none; d=google.com; s=arc-20160816; b=u52x4XXExCpcXStKuAI0X78mUJ43LMqZcP5T/zdXGuIFFk9aEL5M7ySbVwjlYaUuOB /M94DjnrWJP+tvSpqRtTsfZb/wXWgweyaJUcqt5fmy18e6n70HjTfTF2FgpqTU4NSB+C E0ZyGuie+tWO9zYhLpjGK9UVoX4EP2gaPcAE5iJQm9g02Wd6qJOVJ4lNlFyjnuJgCpyM MxUV7IJYZ/TR/j6OZrfH1UyQt7ydkxJAzjchsUVjglFeTi2a/nleL7ta8YMv/ibaTQ/S QtXfWFLvD2dysy/AZ5+mJ347yi6LPee8wsUsPJXbTwD+GMH+U/2hNIeE8QVXA7ZitKJi gL1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OwwKALsnNZGHXS5uAQdLbs0BkUXfWVuRe9TMpcy12j0=; b=o3zJfuX61jGQ5KeD/sKyAUUOrnHa6Ph/FXrIja+Fy3w8BA8lfrZcPa8vH1EoTY5VRS eYpeeqd+WC7EvaritaLu+jtTzkuyecUJbVnzItr0c2Xe8yXo4obt8R9ISAh8amnKa9Vk 3X1GAS4uZmPm1N/ayCwziqYNv5KGaedE41uMaTQeWbcGIzAby6/UzVve+5AkeedYRP+9 MlD7raIsLKnu2fq6G6DoiavUFRpf+eaxZ/9PTzQJEKh3pGpOHHLoCWIW/aBLeVxeqbQT gftRKX5WViH26E9n2LXBXEVsP718Hzspr6QYXpa/CGaKEJyfY/dDpt935jlbDYVM/ERu 89qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=AB9uM0DJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk20-20020a1709077f9400b00730412ff1efsi13939834ejc.843.2022.08.03.17.40.11; Wed, 03 Aug 2022 17:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=AB9uM0DJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238561AbiHDARh (ORCPT + 99 others); Wed, 3 Aug 2022 20:17:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240979AbiHDAQy (ORCPT ); Wed, 3 Aug 2022 20:16:54 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD10B1A82B for ; Wed, 3 Aug 2022 17:16:52 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id q19so8555877pfg.8 for ; Wed, 03 Aug 2022 17:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=OwwKALsnNZGHXS5uAQdLbs0BkUXfWVuRe9TMpcy12j0=; b=AB9uM0DJMUFK/SdbngnGLeR1FojbEFIefdFjsjpNolnva+3Kc9zYNPMr7x+TFRyXEN r9mZzpaNPUdeIgUimUWES3DSN55fGypwbBbzMr02CEwvKHwMa5K4kxb7n/qImZ/ss9cH faF+2cgQYB7MppMABsJeYkIFsVBbITwd7adosX1oyHPJK3H9ShtTuu34GYfLfT4YD8gs qNPlxdlfYgWhSDdJ+Kj7NJk1HfirRSPVLKIxfGLDBdBv6vsxvbWWN2omF6Dgr5vdUwVP 22G8DX1AZnuastiAyZVYjVdcoBMH07dM/t4EEssFgHswWKXUPG/xrB4htKdRSMfvyGvH Oftw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=OwwKALsnNZGHXS5uAQdLbs0BkUXfWVuRe9TMpcy12j0=; b=BZiEzfOCAz8QFU7tmzMs3pT9byShQPbvI2m1yORQ8W/sjKZj50JfNN8b2WlzbXgZw9 lUvRk4vf/pA8xDFVgIhgrpP2Z5qlzedMqC2sdYgHxKdY6TGxUl+7KzIhq15SIsvBqWE0 L+XHpidCKrwVsdNuaR7Ft6lwlFpaSuyUGvQbh1Nern2SivL5zszh8ltWa1ae0BhGlv83 oImMq70OTIx7Ll3NNkW6GBmxnSr366hYPtVGKinPU1pW2woud+TzAeA2pC89eI2prT/i uUf02T7a9QwvRFsN7Au1x56VUHjEYCumfLMGSQMcOtPeaLlxo04Tisc/ClfCW47CpUPE OtgQ== X-Gm-Message-State: AJIora9qd/qUzqvyl92DcNERqeK9h0DyTAHSWoPOhIj7mvzL+58ZQUWI n9PShkQaIcSqLeBvir0l5QheWocd9ckDzw== X-Received: by 2002:a63:f143:0:b0:41a:3744:8639 with SMTP id o3-20020a63f143000000b0041a37448639mr22940854pgk.254.1659572212150; Wed, 03 Aug 2022 17:16:52 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id 139-20020a621991000000b0050dc76281e0sm13612933pfz.186.2022.08.03.17.16.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 17:16:51 -0700 (PDT) Date: Thu, 4 Aug 2022 00:16:48 +0000 From: Sean Christopherson To: Kai Huang Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Roth , Tom Lendacky Subject: Re: [PATCH v2 2/3] KVM: x86/mmu: Fully re-evaluate MMIO caching when SPTE masks change Message-ID: References: <20220803224957.1285926-1-seanjc@google.com> <20220803224957.1285926-3-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 04, 2022, Kai Huang wrote: > On Wed, 2022-08-03 at 22:49 +0000, Sean Christopherson wrote: > > +void __init kvm_mmu_spte_module_init(void) > > +{ > > + /* > > + * Snapshot userspace's desire to allow MMIO caching. Whether or not > > + * KVM can actually enable MMIO caching depends on vendor-specific > > + * hardware capabilities and other module params that can't be resolved > > + * until the vendor module is loaded, i.e. enable_mmio_caching can and > > + * will change when the vendor module is (re)loaded. > > + */ > > + allow_mmio_caching = enable_mmio_caching; > > ... Perhaps 'use_mmio_caching' or 'want_mmio_caching' is better as it reflects > userspace's desire? Anyway let you decide. Part of me likes "want_mmio_caching", but the module param really is only for testing, i.e. any sane configuration always wants MMIO caching, but sometimes it's explicitly disallowed purely so that KVM can mimic hardware that doesn't support MMIO caching.