From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D082CC433F5 for ; Thu, 10 Feb 2022 22:50:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345263AbiBJWuE (ORCPT ); Thu, 10 Feb 2022 17:50:04 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238083AbiBJWuD (ORCPT ); Thu, 10 Feb 2022 17:50:03 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09CEAB77 for ; Thu, 10 Feb 2022 14:50:02 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id q11-20020a17090a304b00b001b94d25eaecso2538623pjl.4 for ; Thu, 10 Feb 2022 14:50:02 -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=Difssx0kMtGZom+YIlVctwoNmPgy1VVgELWmeqdUynmy900kB3QRZflGEYUxOx2rhL lc67tGrwmkDrEQw3lfA8yr7IyxFUVpPtXzcJHrDPhj81sDw5n0hC7W46jHlv5DuUkxVB Lln87CD9PmEYETd5ylIUqmCj2Xr1XwoHwzgy3putVSY5O7+KuZyil95BOS7HMHaEIkcx 2jJrP2Kw5x63PH+BN1N4s4vcAji576Sfy/ZpEucq+mXt3T5MLb3Xh+ax7oeld8zTy12e FLjFopQ2MZGajHNxwzzWtF466QH10fjRy0FA5ysz3Ag3Ga5UE0kFD7C17KxI4Nm5nF1H q1ZA== X-Gm-Message-State: AOAM530xznEaUFri8C4n2eaqMn8tW+5ijV7tNgdkJleY59G+8RMfLl8E 1ESxTJ2X8QikL+A3pxp9hLUm2g== X-Google-Smtp-Source: ABdhPJzzbNPsKwKl0OnLYb9dCa4vgV+051VSPWXGr9kQVp9PSnpPfGQeV097gomnmYuBH4/z/wfuDA== 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> Precedence: bulk List-ID: X-Mailing-List: kvm@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