Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3821555pxb; Fri, 11 Feb 2022 08:27:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkBM/5bbZQ1sHxW4Ohcb1JAX06yN9IYU4DyV+BbxUmkH5IiLJDgDuhIxec/r/6HKtgzEpA X-Received: by 2002:a63:86:: with SMTP id 128mr1958848pga.13.1644596868937; Fri, 11 Feb 2022 08:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644596868; cv=none; d=google.com; s=arc-20160816; b=A0rV5GqpWgFPu+pXID1aUG4KGxt8s88R1lQQBr9r2oEXx9ooPBitBjgLXe+j/QTeOa YUmIwTvoEkT3VEuy6+BOMGtwR1G+i5qpM1zbqRfgr7Au9uV5pCwEziwcKNRonUef0oga 0h3ZPoFSNvMbyi72Metcn5BSJ6TD2zbfCXvyUQarDX1y6mo7TrLUkoR5qpoUDG92mwkJ islBLo4JVzK3AV18S3LnsU16Z0uxGANpay3R7EGE+AclB6HAMKMgY/ZYV3kcT31V08uA UhuZWmS74pabvHENlyGfo+BlUnrx9OM6RfJYznpcqRJZPzrof957usaBaZwfoRztFaWV gTRg== 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=XkU5iLNArD+gSSsbOviCay34l6txBbFA8zH6dv+uNvw=; b=JLixMiIIOFYDc/+aEntiLFP049r7ds2i3NmutgkbCGDa7EyLgiZiXQy0ATMCTwl8lf oeHEg0AUKfxZdl7ulNRM9IVyH1rScsc5DSplWwk0KXnEvA3BC1rzIi3DJSWbJXYm3AQW rsHQBcydSWb53ap0cAa+VmhSUE0+/UZP1ijM78ZC5v6AKNzPRMh3PpaL6BzXxnDRC6+9 /PNuVXDZmkSfMAUXZDdrf731SmTbPDe5QdybmUTMRwjTICG/mvpVWCSk7ZSsAGnB5i+z sPoDh0tyXnfIqqt09Ew86XoJDCp6QOiZxpDt4uuqJfs3oRwahNTAlKJeTA2qISB/eiqr kKnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YPaiEstU; 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 k6si24188574pfu.242.2022.02.11.08.27.34; Fri, 11 Feb 2022 08:27:48 -0800 (PST) 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=YPaiEstU; 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 S1345261AbiBJWuE (ORCPT + 99 others); Thu, 10 Feb 2022 17:50:04 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345255AbiBJWuB (ORCPT ); Thu, 10 Feb 2022 17:50:01 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03C24B76 for ; Thu, 10 Feb 2022 14:50:02 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id v5-20020a17090a4ec500b001b8b702df57so10130515pjl.2 for ; Thu, 10 Feb 2022 14:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XkU5iLNArD+gSSsbOviCay34l6txBbFA8zH6dv+uNvw=; b=YPaiEstUGXzuhD/Cg6vlfCuNXdeHpFm5v+9Bb7yfrNTAVUueaL3Tx0iJiwnN3f5t90 o54COLLM2Omp0pdH/gBHFkfd2Mc3EU1SHKIPFJR8OQM/a+J/4IOvEPtg68VdYYanZd/E HoFuqxbKGMrXWg8uqSlH6em70kiQzKWC4mNDKcaRQB0sSx2cSYJn4Md2Yg2fsn0ZA2G2 jZXr2rO9MHu4kh+BTRzxBTalggjBRX6d74MEJciRH+/RlMbErgpUXYHFgaE8wVC4hWkj Gf84g3ojYFR89mjYV3P/YSoymiT1DZ7/7B65zgR5y/niEpDcrTD+7Jqux9mkNkncTrzi 6Wjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=XkU5iLNArD+gSSsbOviCay34l6txBbFA8zH6dv+uNvw=; b=AFvz2+u7PYHrdxqF1dgiMmwb7n6urJprli9CKpX3akDwuWoOpQ8qaXXsUBsazi01PC akv+9QkrOhdsRwZYBZS/1AhRsos54S7x1T7YIhx0RXWHQWFPdEiWMYdnbeQ3A13fvixB xg22YVXZaD4WS3ipTG6rRZopZm1GpmwuMVnZ2WwgbRGrpAPOPXvx0uFgAhIwObEfLcxq ZyAOfcfGagJY4AZw1xUvB73zlKa/Z4BuOAz7WCdCDDnR++IYxzmBE4VEQUhHAnHr1sBJ e+w7rigElgTqz7wZjiXXrwCixL+cdnxv9ahnRExtMN6tazdzXkz//0h0vw3o3ESRepLD dxlw== X-Gm-Message-State: AOAM530K6jCEYfyJRqdDTlLjkGjJuRTcSt3u7qKar4HdMc+BgjZeW9Tn DvGXbBuIwBwNQuRdo6Rlw58wDA== X-Received: by 2002:a17:90b:1c0f:: with SMTP id oc15mr5128547pjb.70.1644533401368; Thu, 10 Feb 2022 14:50:01 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id pi9sm3850809pjb.46.2022.02.10.14.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 14:50:00 -0800 (PST) Date: Thu, 10 Feb 2022 22:49:57 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, vkuznets@redhat.com, mlevitsk@redhat.com, dmatlack@google.com, stable@vger.kernel.org Subject: Re: [PATCH 01/12] KVM: x86: host-initiated EFER.LME write affects the MMU Message-ID: References: <20220209170020.1775368-1-pbonzini@redhat.com> <20220209170020.1775368-2-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209170020.1775368-2-pbonzini@redhat.com> 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, T_SCC_BODY_TEXT_LINE,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 Wed, Feb 09, 2022, Paolo Bonzini wrote: > While the guest runs, EFER.LME cannot change unless CR0.PG is clear, and therefore > EFER.NX is the only bit that can affect the MMU role. However, set_efer accepts > a host-initiated change to EFER.LME even with CR0.PG=1. In that case, the > MMU has to be reset. > > Fixes: 11988499e62b ("KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes") > Cc: stable@vger.kernel.org > Signed-off-by: Paolo Bonzini > --- Ugh, but KVM_SET_SREGS handles this... It's basically KVM's equivalent of VMX putting EFER in the VMCS, but then also allowing EFER in the load/store lists. Reviewed-by: Sean Christopherson