Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3555472ybn; Fri, 27 Sep 2019 08:03:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwfDn1g7OyfeAhtr8/k/C5Ts0vPsZBuAUbxk7LXIEpv2xuZK3dSQ0TGZPlg9vEcz3TStHC X-Received: by 2002:a17:906:d8a2:: with SMTP id qc2mr8298855ejb.10.1569596615797; Fri, 27 Sep 2019 08:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569596615; cv=none; d=google.com; s=arc-20160816; b=ehALAl2EhthAZ92V22JW1sQQiiSDzVQPsl85NDfo4Yvt8Ixo2RYeEBLIGm+DZ8en8v rzRFPtkP148U8iq5E5XwNg8EMUQ5/ZStNqnk8m3Lnj563wB9Cq3oPsKdSxV28YfviBql jjeLyFxCXVfP76BZC5BRYdCQMxChbBEu1ButXc8r9wxZf14DAvqqQN2R+4bPqeLJ+sD4 7IY3hGpRmIPQy0WNVgjxMpk/uNKcMcxOjODFIV/kM9GoOI83kZ5u2Q29do5ZrfI2vsCg 2LgErUpDDS6xIE9bhmsUqzSZfEo8JRMn7RFKXq8eCOyO+F/Z9B6OLc0osuXWY+oDTSmc Nt3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=WHPqLMqj6fr0ouVBUyNM6ElUFjk2dUsYadtT4v/3ekc=; b=UjbB6UWJ0W6EG1jDdcBiFBUSPzG69K7Q0mYBjIkQy0ca3AmSXMHhv23bmuJF4EsvcY Jgrm4POthlp64k0U14UhnY7y90I7XibhS7M500iYqVJrmfWFlzbI9UBlz4PxrzUEwkDb Pvviovi0j7pF5sHNavEcSFhrUZyF9WOuwmkbBFFtHslN58SX1a+mszrIbHJDembjMS2B 7nApIRuvExp/T+Zzwge7WiyLi8Q3qOkTnpCYiqS4/Ewn5m1Vcbq9Vq8//ha/fWOY3imk yAGZW5eh9t7aNzaNTDKCkf0mHESTj6fMAgHeIjzFmu/cu3M1Hyop9P5QQ1rrE1i0RPE5 2sKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si2568800eje.176.2019.09.27.08.03.06; Fri, 27 Sep 2019 08:03:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727963AbfI0PCU (ORCPT + 99 others); Fri, 27 Sep 2019 11:02:20 -0400 Received: from mga04.intel.com ([192.55.52.120]:61826 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727159AbfI0PCU (ORCPT ); Fri, 27 Sep 2019 11:02:20 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 08:02:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,555,1559545200"; d="scan'208";a="196740404" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by FMSMGA003.fm.intel.com with ESMTP; 27 Sep 2019 08:02:19 -0700 Date: Fri, 27 Sep 2019 08:02:19 -0700 From: Sean Christopherson To: Liran Alon Cc: Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Reto Buerki Subject: Re: [PATCH 1/2] KVM: nVMX: Always write vmcs02.GUEST_CR3 during nested VM-Enter Message-ID: <20190927150219.GB25513@linux.intel.com> References: <20190926214302.21990-1-sean.j.christopherson@intel.com> <20190926214302.21990-2-sean.j.christopherson@intel.com> <68340081-0094-4A74-9B33-3431F39659AA@oracle.com> <20190927142725.GC24889@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 27, 2019 at 05:44:53PM +0300, Liran Alon wrote: > > > On 27 Sep 2019, at 17:27, Sean Christopherson wrote: > > > > On Fri, Sep 27, 2019 at 03:06:02AM +0300, Liran Alon wrote: > >> > >>> On 27 Sep 2019, at 0:43, Sean Christopherson wrote: > >>> > >>> + /* > >>> + * Immediately write vmcs02.GUEST_CR3. It will be propagated to vmcs12 > >>> + * on nested VM-Exit, which can occur without actually running L2, e.g. > >>> + * if L2 is entering HLT state, and thus without hitting vmx_set_cr3(). > >>> + */ > >> > >> If I understand correctly, it’s not exactly if L2 is entering HLT state in > >> general. (E.g. issue doesn’t occur if L2 runs HLT directly which is not > >> configured to be intercepted by vmcs12). It’s specifically when L1 enters L2 > >> with a HLT guest-activity-state. I suggest rephrasing comment. > > > > I deliberately worded the comment so that it remains valid if there are > > more conditions in the future that cause KVM to skip running L2. What if > > I split the difference and make the changelog more explicit, but leave the > > comment as is? > > I think what is confusing in comment is that it seems to also refer to the case > where L2 directly enters HLT state without L1 intercept. Which isn’t related. > So I would explicitly mention it’s when L1 enters L2 but don’t physically enter guest > with vmcs02 because L2 is in HLT state. Ah, gotcha, I'll tweak the wording.