Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2632596ybf; Mon, 2 Mar 2020 12:35:29 -0800 (PST) X-Google-Smtp-Source: ADFU+vvvPn7Y6/yqvNt2bKvK1r/jFmwZBsUu54A5vko6faQ2HHJrfLPoc74/O+Mp1MfBXSZ9Xifm X-Received: by 2002:aca:4306:: with SMTP id q6mr186624oia.54.1583181329132; Mon, 02 Mar 2020 12:35:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583181329; cv=none; d=google.com; s=arc-20160816; b=PRAfkwfRlJAuMnoIW9XVy10csoBJBuYmSe/JQQ5eJ8sf8+QcK1ELq7Gzasyp1r2I7T rGTukowmDYFx1+I8ywBz5jjr6+UX7KgT7e2R/v7Vl9MLQbvclP731SkdJK/w2h8N1Dj/ zCeMoPVgbz1klM2BR7tMU7GX9/r0hjZCgxj8PpzKD/G/tXk7bEvjEl8K0Ry+HxYdqZMY xfXjXugC1M4xJdOyBlIuwbE1Jdv+RxO6Kg/BFGbu8ScHKRwDNmiB4DDQVdl8EdI9YvOR x52rSUO8GvC0GE/diOcrTv5hxrW5K8y6RR7VWEd1NVefJ/06JNZ/VpTpuH3khqQnTKPn IZVw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=k3knNiOhRRF8+eFplylM7ex5xBRt1K1IiFjzKfLbis8=; b=goCUO8ZfWfX3ZqvCDxn556FVoBd7mqA3BJDTY/YWCq22dpOz6xTBEJ5SRGi0LycUAq knTcjUSCqok08B+j2ehgPQrRjxnNQmhnPO/zRKDCWlCfQfkbCKD0wDnAC/Lb5sVPl3Ff qMjfd11P399sG4LUOFn6351AwiTQfUMw5xQ06GpvAswgz5+6qUPthMOR/X/sl3DX9vf7 4X7ic77YYj4md9r5c5OQmzv5FCrRHs9DoTKlSqYnmI/7Gqkm202EyMUzw50rqVXelOwp xYlDaYEwcF/M93lUlcG+1kte5um1lVzrg8dz5AY/EnjwKsYjx6Ia+kqL5vRjYoGfn3N8 buKQ== 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 r13si1770652otq.279.2020.03.02.12.35.16; Mon, 02 Mar 2020 12:35:29 -0800 (PST) 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 S1726700AbgCBUfM (ORCPT + 99 others); Mon, 2 Mar 2020 15:35:12 -0500 Received: from mga02.intel.com ([134.134.136.20]:12716 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgCBUfM (ORCPT ); Mon, 2 Mar 2020 15:35:12 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2020 12:35:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,508,1574150400"; d="scan'208";a="233495414" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by fmsmga008.fm.intel.com with ESMTP; 02 Mar 2020 12:35:10 -0800 Date: Mon, 2 Mar 2020 12:35:10 -0800 From: Sean Christopherson To: Jan Kiszka Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Xiaoyao Li Subject: Re: [PATCH 5/6] KVM: x86: Rename "found" variable in kvm_cpuid() to "exact_entry_exists" Message-ID: <20200302203510.GF6244@linux.intel.com> References: <20200302195736.24777-1-sean.j.christopherson@intel.com> <20200302195736.24777-6-sean.j.christopherson@intel.com> <680d85ee-948c-6968-2d1a-d563d4863140@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <680d85ee-948c-6968-2d1a-d563d4863140@siemens.com> 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 Mon, Mar 02, 2020 at 09:20:52PM +0100, Jan Kiszka wrote: > On 02.03.20 20:57, Sean Christopherson wrote: > >Rename "found" in kvm_cpuid() to "exact_entry_exists" to better convey > >that the intent of the tracepoint's "found/not found" output is to trace > >whether the output values are for the actual requested leaf or for some > >other (likely unrelated) leaf that was found while processing entries to > >emulate funky CPU behavior, e.g. the max basic leaf on Intel CPUs when > >the requested CPUID leaf is out of range. > > > >Suggested-by: Jan Kiszka > >Signed-off-by: Sean Christopherson > >--- > > arch/x86/kvm/cpuid.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > >diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c > >index 869526930cf7..b0a4f3c17932 100644 > >--- a/arch/x86/kvm/cpuid.c > >+++ b/arch/x86/kvm/cpuid.c > >@@ -1002,10 +1002,10 @@ void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, > > { > > const u32 function = *eax, index = *ecx; > > struct kvm_cpuid_entry2 *entry; > >- bool found; > >+ bool exact_entry_exists; > > entry = kvm_find_cpuid_entry(vcpu, function, index); > >- found = entry; > >+ exact_entry_exists = !!entry; > > /* > > * Intel CPUID semantics treats any query for an out-of-range > > * leaf as if the highest basic leaf (i.e. CPUID.0H:EAX) were > >@@ -1047,7 +1047,7 @@ void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, > > } > > } > > } > >- trace_kvm_cpuid(function, *eax, *ebx, *ecx, *edx, found); > >+ trace_kvm_cpuid(function, *eax, *ebx, *ecx, *edx, exact_entry_exists); > > Actually, I think we also what to change output in the tracepoint. Oh, I definitely want to change it, but AIUI it's ABI and shouldn't be changed. Paolo?