Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2352720pxt; Sun, 8 Aug 2021 20:59:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVLYGEVXHgmSxCARpgGR9NxVRN6UgKJKWABU/8VlWrNtqz/zrb7ijqS9ff8SRu9CQPBjxJ X-Received: by 2002:a17:906:af86:: with SMTP id mj6mr20866477ejb.144.1628481574002; Sun, 08 Aug 2021 20:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628481573; cv=none; d=google.com; s=arc-20160816; b=Lg0WJKD26tTMAnV3BCG1pIG1ZDcSLDZZd6/p20OKgAfr1J9jKCzeoc4OQL4ZvraagV fIUmX1QlOndbm347r5P5JffyMAOolPbrezan0SQ3/TToBQljk9uTWV3yPnelL857OsZH VhjJz6O8Lv85o8Zav2ThfobjF8wNrwsqX+mWzjUqThH2c4HBjfkU2wlPe+DIYYzq4C4Y UteU6MkKCEvUieY/ugdko/X8h8zYSRqmqQH8qWC+8U1Avj8cigP5TlioTbVRJGHvOyCk vOTCktAXaXux54E/ssZwfOu8S599jE9XF9GdwXPJDsc8rsN6zZeO0iJqTRVHVr8gt/2L /UPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=J4MrkLWDO9pAN/z7mxPTHxh9MKQER36aEfpHsZVHaa4=; b=m2qzBeAfIwExX6nBmc1Hh12nfE55YGnXVPbfGfQaAlbKkLyR+xcnJqbDrGiorQs1Mx 50tIeMtEMDAD2Y5rPy9rolYpMU7TehepMP7XHQXcOvFQRvNov9JVHKTYz+k2InY/+i4x O3iO088rNKcu8sbyC50jtybUUaCCjqiJfVYoCEGgfY7i4NGkz9Eup5Sz61Jd2b0icht7 k1fUA2ty5pTgLtBYS2mfdkc035XodMW8FlHs6qzFhOb7f724j95yTc4zaJyN/xxKDI+e fKmKGlsYS1NLWwFB32lg1gTybPPkNuz74rbMfCF+4xBGtWmst5Zp3Xt+3u2pQAwVNG73 mIDQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 6si7207846eje.339.2021.08.08.20.59.10; Sun, 08 Aug 2021 20:59:33 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232894AbhHIDzK (ORCPT + 99 others); Sun, 8 Aug 2021 23:55:10 -0400 Received: from mga05.intel.com ([192.55.52.43]:23274 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232942AbhHIDzJ (ORCPT ); Sun, 8 Aug 2021 23:55:09 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10070"; a="300206602" X-IronPort-AV: E=Sophos;i="5.84,305,1620716400"; d="scan'208";a="300206602" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2021 20:54:49 -0700 X-IronPort-AV: E=Sophos;i="5.84,305,1620716400"; d="scan'208";a="483124564" Received: from arthur-vostro-3668.sh.intel.com ([10.239.13.1]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2021 20:54:44 -0700 From: Zeng Guang To: Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, Dave Hansen , Tony Luck , Kan Liang , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Kim Phillips , Jarkko Sakkinen , Jethro Beekman , Kai Huang Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Robert Hu , Gao Chao , Zeng Guang , Robert Hoo Subject: [PATCH v4 4/6] KVM: VMX: dump_vmcs() reports tertiary_exec_control field as well Date: Mon, 9 Aug 2021 11:29:23 +0800 Message-Id: <20210809032925.3548-5-guang.zeng@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210809032925.3548-1-guang.zeng@intel.com> References: <20210809032925.3548-1-guang.zeng@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Hoo Add tertiary_exec_control field report in dump_vmcs() Signed-off-by: Robert Hoo Signed-off-by: Zeng Guang --- arch/x86/kvm/vmx/vmx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index ee8c5664dc95..9eb351c351ce 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -5745,6 +5745,7 @@ void dump_vmcs(struct kvm_vcpu *vcpu) struct vcpu_vmx *vmx = to_vmx(vcpu); u32 vmentry_ctl, vmexit_ctl; u32 cpu_based_exec_ctrl, pin_based_exec_ctrl, secondary_exec_control; + u64 tertiary_exec_control = 0; unsigned long cr4; int efer_slot; @@ -5762,6 +5763,9 @@ void dump_vmcs(struct kvm_vcpu *vcpu) if (cpu_has_secondary_exec_ctrls()) secondary_exec_control = vmcs_read32(SECONDARY_VM_EXEC_CONTROL); + if (cpu_has_tertiary_exec_ctrls()) + tertiary_exec_control = vmcs_read64(TERTIARY_VM_EXEC_CONTROL); + pr_err("VMCS %p, last attempted VM-entry on CPU %d\n", vmx->loaded_vmcs->vmcs, vcpu->arch.last_vmentry_cpu); pr_err("*** Guest State ***\n"); @@ -5860,8 +5864,9 @@ void dump_vmcs(struct kvm_vcpu *vcpu) vmx_dump_msrs("host autoload", &vmx->msr_autoload.host); pr_err("*** Control State ***\n"); - pr_err("PinBased=%08x CPUBased=%08x SecondaryExec=%08x\n", - pin_based_exec_ctrl, cpu_based_exec_ctrl, secondary_exec_control); + pr_err("PinBased=0x%08x CPUBased=0x%08x SecondaryExec=0x%08x TertiaryExec=0x%016llx\n", + pin_based_exec_ctrl, cpu_based_exec_ctrl, secondary_exec_control, + tertiary_exec_control); 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.25.1