Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp19052pxb; Wed, 24 Feb 2021 16:55:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNCYDFlKOvz7s/jJRbgUvQydp+QRwbsat425mjxuZzFX9oq2K6FW8M+Z74v6QumvBX16d6 X-Received: by 2002:a17:906:1754:: with SMTP id d20mr268771eje.221.1614214505161; Wed, 24 Feb 2021 16:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614214505; cv=none; d=google.com; s=arc-20160816; b=fIAnyLjI1E8xdkExyeNOb04ZZF6HPCmroGDSkYVJIhQQnGVPvLEa2ZrTvcqDD4nkhO 9AkxpwTY0ImhD/cgM5bFt3sGVsl9XtYy+UfPD2XSRRHg0xs0xVks94ce0C7ICV7Gl0uy CgvUp2ScYNDgwFGV2FFgxKctPlSiRoWai9FFGGDZFgvW77qP72CpftFDz+QtRBGiqqti 5I3k6zNbMOKgovGjHvAO64GiXefG9txzJMSLRZ8/FHJZstUIpU1LbWe1SA2wOXh7k890 ugOqEQ+6nPcnEu+U2Cb1wAZQQUAbw6nuIV6JO5fcJIYR2vUCf3HwnxfScy3fQuGjM1Cv Aqjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:from:references :in-reply-to:subject:cc:to:dkim-signature; bh=ES8CxboQIz6AjW5CHFU/CWTM4pBsOa7xcnXnVMVbXkU=; b=qeP7bGGet8pjnjS40MyTZG5ZE2EYoEXe7KV0Bx2ICZdnTzSFCb9/6I54fQ+S7S2CoC ZdIMODYml92lrWho5J3qseZl0aCf75e7coYrLqy6lyT3BZNvmb22hEedQEH6tJjc1LcJ xv0e3OD7E+Jq7I4mFbjvCy8HkPBzhVQX16lgD6F4h9hF1+mb+ZmPaRbDljnpS4T0W2Qm ZtX7m6QuqpgBU/OcBWUEiRSABn/IvnWBW1RaCDvoA8HrjaVf6sCubWyjeoP9QHcEGjtT rhOSq7ytpN9Trzf9fZ/yzucr19FjujSZhNOzpaJBjo6Ab50L++94ejZkEOx89a/EfmLz DC/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dme-org.20150623.gappssmtp.com header.s=20150623 header.b=M9MugLXr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si2343348edv.299.2021.02.24.16.54.42; Wed, 24 Feb 2021 16:55:05 -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=@dme-org.20150623.gappssmtp.com header.s=20150623 header.b=M9MugLXr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238244AbhBXOlf (ORCPT + 99 others); Wed, 24 Feb 2021 09:41:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236998AbhBXNcZ (ORCPT ); Wed, 24 Feb 2021 08:32:25 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71C3BC061797 for ; Wed, 24 Feb 2021 05:30:26 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id v21so1791418wml.4 for ; Wed, 24 Feb 2021 05:30:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:cc:subject:in-reply-to:references:from:date:message-id :mime-version; bh=ES8CxboQIz6AjW5CHFU/CWTM4pBsOa7xcnXnVMVbXkU=; b=M9MugLXrFlb6ovZc+2MkUMDKnZIFGwzVaJMCZC8H15KQhB9QTv07B/4l6aOOaCRGsY jmo8+QwH/mj3P46D6nrpIu4fM/KC6W2DiQL4XyK27Joxs8MJ36ZzrU3rU38hbEGJqq3p my4lrImakbrPn8uVVZyohRZq+G64YLIB4aprKOocEfDS1kI+rXT4UYJZBjN/Y651AUke cjYyW4wE+vt3GLUeR18tECJsqU3WTl8wzUsZDZlOcF5squqZrBkU+evkXGJZxiKO2pjp xdI3KpG21qEz35nOVlONTAHISx0CzCuCCbbDEbR/3jnKhMOu8fLAj2UgLWU3Jpi9ERYs d1LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:references:from:date :message-id:mime-version; bh=ES8CxboQIz6AjW5CHFU/CWTM4pBsOa7xcnXnVMVbXkU=; b=B33lspvLHVrcaobwHzVdpvwIS2SL8gwsuBZD7OluK1uo/AK2i1Upe4uV2ml499Y5Nb eE8659X4nqFe57f8A/M5yYY3aTqJs2PkhFSz2UJ61aWEngmLeUfDrENpQFsqU6X6qFD6 fJS0AluZF8wwX5rFPDYRELc3fwpTY84r2l3g6coMS0m+Z44TPzePLOSViLflZeElMkcr YQcUrft+Q1zJQWyCdsJN7LYqFVeq0Hv4GQf62Xk2Hrwi2QjbdpddDaOtEB6HG53G+f4R W6FS1i9TrAUPMeGyKrpqVmeHI2Ij4eDPqGh5FYyzsnEi+geceLc8ZIPqXcgRNX2LXqeq QaiQ== X-Gm-Message-State: AOAM533gGFtQPE4FeO453Ca7Ca+sa2i3mgGWNGGD8w91Tl2i3PkmhAgA mgNmYiYtWdBi+1lhYyCXXgD/UA== X-Received: by 2002:a7b:c5d0:: with SMTP id n16mr3762898wmk.27.1614173425170; Wed, 24 Feb 2021 05:30:25 -0800 (PST) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [2001:8b0:bb71:7140:64::1]) by smtp.gmail.com with ESMTPSA id h12sm4575853wru.18.2021.02.24.05.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 05:30:24 -0800 (PST) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 8d0efa31; Wed, 24 Feb 2021 13:30:23 +0000 (UTC) To: Jim Mattson , Sean Christopherson Cc: LKML , "H. Peter Anvin" , Joerg Roedel , the arch/x86 maintainers , Thomas Gleixner , kvm list , Paolo Bonzini , Wanpeng Li , Ingo Molnar , Borislav Petkov , Vitaly Kuznetsov Subject: Re: [PATCH v2 1/3] KVM: x86: dump_vmcs should not assume GUEST_IA32_EFER is valid In-Reply-To: References: <20210219144632.2288189-1-david.edmondson@oracle.com> <20210219144632.2288189-2-david.edmondson@oracle.com> X-HGTTG: heart-of-gold From: David Edmondson Date: Wed, 24 Feb 2021 13:30:23 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, 2021-02-23 at 15:13:54 -08, Jim Mattson wrote: > On Tue, Feb 23, 2021 at 2:51 PM Sean Christopherson wrote: >> >> On Fri, Feb 19, 2021, David Edmondson wrote: >> > If the VM entry/exit controls for loading/saving MSR_EFER are either >> > not available (an older processor or explicitly disabled) or not >> > used (host and guest values are the same), reading GUEST_IA32_EFER >> > from the VMCS returns an inaccurate value. >> > >> > Because of this, in dump_vmcs() don't use GUEST_IA32_EFER to decide >> > whether to print the PDPTRs - do so if the EPT is in use and CR4.PAE >> > is set. >> >> This isn't necessarily correct either. In a way, it's less correct as PDPTRs >> are more likely to be printed when they shouldn't, assuming most guests are >> 64-bit guests. It's annoying to calculate the effective guest EFER, but so >> awful that it's worth risking confusion over PDTPRs. > > I still prefer a dump_vmcs that always dumps every VMCS field. v3 now always shows the PDPTRs if they exist. dme. -- I've got a little black book with my poems in.