Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1230513pxb; Fri, 21 Jan 2022 12:53:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAFA//ROEsQBSO3Rw06PoeeN7eWM3Dne+9v9/8p+YCHKNNXzb5D6OgDUrvvlOZ/9t9TEta X-Received: by 2002:a17:903:249:b0:149:b806:cd8e with SMTP id j9-20020a170903024900b00149b806cd8emr5260326plh.107.1642798388252; Fri, 21 Jan 2022 12:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642798388; cv=none; d=google.com; s=arc-20160816; b=TZ75bfUsWL8kzy7QCBSffsKAlb6f4GBkt9C1ZiUBOVJNelkDLFMw7tewNdHAqth5ly JXH+hDP0mskGIkkCO9I1KD7SyXHmndc5BnWW5DJkL3MqFqJvJ6Px6tSAiTKjqTiffsYL IqqbX2uR73IXcsP58cOxzxMu84OTc4BmruaZzCcRaJXpKoUbugpFOSeUr9FnOpZNIWEO 31mkOR0iDGGYokEwIm94wb7/iMTywMYj+VHdmtQsLoL0tcZXhuWi7vR0bHihrUcUVnnl xPmIbyr7Ke5Vst+MO0ElR3/Cybrsg7zzsFtI8KATPebw0yPcEcPgRNJr/ezYKv/fkspe Sg3A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Cn8y2MduSfxpaUqgG70M6OfS7ciqUGnpG7newRRVGPo=; b=KuLIfRQU/QDLUrbMcnPxHIX+zuZdlvy9gP7D/3AHsU0qkeKdmrsv+bURWKfgXytaR6 C4Sl+dCr13v9GiP8EG7spgHIAtdjlOAPkwvxPHmCHrt2lDsZQj4PP9ccX+mbVqTFp3D2 7m7rONPjcj/XsBngiPunBWy98VJzFykWB/rYX+VjhwQAGjfdQTcJKgrogL6Z3j2pj3vX 5HIE8b/q//eHJopJqpYc/PKcDs8pVnGz+wfWX5k3iyHig+hZx4KSH+uVBX5QuqRlYLBP virI0KU10a3D3/iPtTGa3TvUAoeoZruv/pXq0WtRIxFbnseTa82d1rwoLcUTa9eUpDSc NFGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="l9//kvAq"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si6542186pju.166.2022.01.21.12.52.56; Fri, 21 Jan 2022 12:53:08 -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=@google.com header.s=20210112 header.b="l9//kvAq"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240699AbiATBGe (ORCPT + 99 others); Wed, 19 Jan 2022 20:06:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345578AbiATBGd (ORCPT ); Wed, 19 Jan 2022 20:06:33 -0500 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77543C06161C for ; Wed, 19 Jan 2022 17:06:33 -0800 (PST) Received: by mail-pg1-x535.google.com with SMTP id e9so664847pgn.4 for ; Wed, 19 Jan 2022 17:06:33 -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:content-transfer-encoding:in-reply-to; bh=Cn8y2MduSfxpaUqgG70M6OfS7ciqUGnpG7newRRVGPo=; b=l9//kvAqzr4TuZQOO5YZKMU5K+Nz/XqA2W8mABc4KeB0yGrfqBBq4kx2YfXYRGnmr6 U27+GMDDLWM+9p1myl0pCQNxtGLVjmwRvs7Q58qRhTHaNtAbqWG7kF3z1/TXbFni3YQx BKZXCgPFF54pw4BZTc8lZvGrjxCHFz3eRBg5IjXWkiZ7qSdDgjBKujwCswcM7n+ftqli qzk/694Fo7qKRGCoEb5H+i0aMcf8iDbIjutDmDpYDN11368ebUpJUC8oMadzTD0s766P MluaYOSWQlvvG/YRm0yfhQK1z/go8/OpbmPHDk7XKforxsXh6aM2m/YPHRnEkd4BBbae 1a9Q== 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:content-transfer-encoding :in-reply-to; bh=Cn8y2MduSfxpaUqgG70M6OfS7ciqUGnpG7newRRVGPo=; b=ijLGtHm6Nk4XC3roaF+CZTBGLeK8qQ1/0YLvX5C9ngUd3FuyX/nSwJGiJemQsSAm7X 8+LydUMyTxu0QYP8IKnJN3u9xaxo7AckmJgluC5wMhDb/f3J1r9xpbsWWr7oliWoHUh1 WLCirpzpgnqAiIlsrOyEyeoiZyigTmoSvqAQFIP3Z1ZfRJpyBkmX/aOQVq2Uqpoxf5bg DSR2DC9akd8uF1P/mqN53F5kslK8ORyT/pxgi8KVq/YhnqjcT+Hwtfd3a72350lW+cCI 99z6ybn7S0eupfe1Nh1j4aCKDnykEuphxJhlCiVUcfKeXa8EIhqJXzhqCiaUIrjKuj7B YIxg== X-Gm-Message-State: AOAM5318jWhBPfUYBXaJ94Af2yCmpxGqk9Iht+nhWtjEM8w6qh52icV+ Pa+3kLF5Nz10kk9QRoCAYlX+rg== X-Received: by 2002:a63:fe10:: with SMTP id p16mr29143931pgh.546.1642640792646; Wed, 19 Jan 2022 17:06:32 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id m17sm843462pfk.62.2022.01.19.17.06.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 17:06:31 -0800 (PST) Date: Thu, 20 Jan 2022 01:06:28 +0000 From: Sean Christopherson To: Zeng Guang Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , "kvm@vger.kernel.org" , Dave Hansen , "Luck, Tony" , Kan Liang , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Kim Phillips , Jarkko Sakkinen , Jethro Beekman , "Huang, Kai" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "Hu, Robert" , "Gao, Chao" , Robert Hoo Subject: Re: [PATCH v5 4/8] KVM: VMX: dump_vmcs() reports tertiary_exec_control field as well Message-ID: References: <20211231142849.611-1-guang.zeng@intel.com> <20211231142849.611-5-guang.zeng@intel.com> <7fd4cb11-9920-6432-747e-633b96db0598@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7fd4cb11-9920-6432-747e-633b96db0598@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 14, 2022, Zeng Guang wrote: > On 1/14/2022 5:03 AM, Sean Christopherson wrote: > > Can you provide a sample dump? It's hard to visualize the output, e.g. I'm worried > > this will be overly log and harder to read than putting tertiary controls on their > > own line. > > Sample dump here. > *** Control State *** > > ?PinBased=0x000000ff CPUBased=0xb5a26dfa SecondaryExec=0x061037eb > TertiaryExec=0x0000000000000010 That's quite the line. What if we reorganize the code to generate output like: CPUBased=0xb5a26dfa SecondaryExec=0x061037eb TertiaryExec=0x0000000000000010 PinBased=0x000000ff EntryControls=0000d1ff ExitControls=002befff That keeps the lines reasonable and IMO is better organization too, e.g. it captures the relationship between primary, secondary, and tertiary controls. > ?EntryControls=0000d1ff ExitControls=002befff > ?ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 > ?VMEntry: intr_info=00000000 errcode=00000000 ilen=00000000 > ?VMExit: intr_info=00000000 errcode=00000000 ilen=00000003 > ???????? reason=00000030 qualification=0000000000000784 > > > pr_err("EntryControls=%08x ExitControls=%08x\n", vmentry_ctl, vmexit_ctl); > > > pr_err("ExceptionBitmap=%08x PFECmask=%08x PFECmatch=%08x\n", > > > vmcs_read32(EXCEPTION_BITMAP), > > > -- > > > 2.27.0 > > >