Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2307733rbb; Tue, 27 Feb 2024 18:58:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVmeZxhBO4f0wpAVxdOTCjF9Ab4r5RvMKLV7qr+819+DNYaIkQCLATZGwRsSyvZ25NGCmjs7i2Ze0tQXjWdtpfQQbUAFGm/XOyx3MobSA== X-Google-Smtp-Source: AGHT+IHT+QBjAOqn6JsUfNR4HuJadiYWXXgeVg8C5qwGN9iEf17A8YcL9GH1ks4GU+YzdZcPdxeE X-Received: by 2002:a17:902:ef48:b0:1dc:8eba:42c3 with SMTP id e8-20020a170902ef4800b001dc8eba42c3mr14354579plx.23.1709089117543; Tue, 27 Feb 2024 18:58:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709089117; cv=pass; d=google.com; s=arc-20160816; b=UaJ4DH/zl1xO6/UaSfAZXS23SR9+AbHE0tQRR7GKG0tk4F1uFH+aCiDD3n4phNOAXg JwzZ4LzjO4QzQXt181OZNTczaLHp4p7HmOnBIKfQzUJ9ititlFanGKbJ+8ZUCpcrwTEA q3hvZ78Sk5aSkCXHHiebrAlHEd/6ip4Kt9TjsAxVTG6bD57dB+Im5LazbLI3YhsgqPZZ Ejjb3KOBAy9SA9L/ETlmPTzI3BpyRjz+qrhPVorYYlv/DfAoVkyhoOlVRKpaMYSkMvI3 5Iwz23BD4bM6k8HlrO1pOi9mMD+kGlWKSUIv7tBz7o459a2jdOhWvHQoSVsGn7HfbuOL xDBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=jeCC6KE/1gLoC/htpbUIfDvAea4Bli9bKxeKjDTz1ac=; fh=uWu9MeyGkywR165s6yDWPgkXRNiae1Qrt207vzeAVio=; b=0rZm8zxAqUGQwJOl2qdASaLwU/GJHe4dhzLf4nexIoq3AxF3mmDBPQZawec2mBZmEd R38C7CmTaUFxEyvt53hNv9ZLzKlTPRb1vt2ReNh3M1ga7MayqvtKBCM7QWTeHraLmXdX gW3ai/CGFiiFxDu1ZnEopJgT1qQLJ70BRqE2fvSpG5mTi2DHVaaTtZUYmYRW79XqaagN Ko3iiOxfMqE/WvASlMGlYIeAAHRdFs5236VLfhOtxQdXSyaZlhUJezdv/ZNw13lXWYFi 76436smOBLwIY5fCtGniX94RNBpElbt7GPTh/oom9HBBCaTwyK2B+7lvfiCeaBI15Fmc EKHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Kq80yqOB; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-84455-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v14-20020a1709028d8e00b001dcb3b6e55asi2367394plo.123.2024.02.27.18.58.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 18:58:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84455-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Kq80yqOB; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-84455-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4122F28A3B9 for ; Wed, 28 Feb 2024 02:58:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2DA61CFAB; Wed, 28 Feb 2024 02:58:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Kq80yqOB" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ECCB6AC2; Wed, 28 Feb 2024 02:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709089110; cv=none; b=QWS1XdFBBOJX9dSNiaePjl4rX0fhiAH/hpDnq19OuJZwMUdzYE5Xqm0thjdT5QsirzeuAtl2TNKIKv+jeegu3MycNVWtF6dcjeIGpZY7QMBPEC8C83iARHJmJ3UUozy1R32P+EidF3EDlyHY5yVk+jGohBvvKhOGPHAJLaI9LjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709089110; c=relaxed/simple; bh=YVRITWNTfH8R/bTxmgns7GdmWfPmUJT2M1Q16oDqS4w=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=o1r6jWR2YzY9ko6XhvfbMMuM+8R5krYIjzg0+NBfRB/3/3UQlJ5OHGOAlyX+UbLHatBei1CC6Lrju71Zsa/TGpVmp3bXZTY6Rs54R2V2JRgQbWu2fsbD1KoPZKw7zB/718yRy6hUnjHy1XxS2zUnqppEng8G4emZF38K1DmxQb4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Kq80yqOB; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709089109; x=1740625109; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=YVRITWNTfH8R/bTxmgns7GdmWfPmUJT2M1Q16oDqS4w=; b=Kq80yqOB1V78/sFY0eENcqMJxq2lVeYadH+IUVG8yu69aJUgPjUoyfMI TSeDLdjzgi2hNCYHgLnpYfEb5skQHOgvJihlUF/slFj2wrINABffngcdO hI9r4VxYK/OXAjaILv9++hBb86dTdTqvTgZzkFUgx2KnkQSbadNmyutew dllait8yniK9UQsK9LALGDAGUeVIDSImVkZtq8jZ36i8qzRd4Cv3JXZUC mRMKHThW+GR2s2rXO9cafyLFn0EyX4wGIArQI15zjAlOrvYjhRHAq55Qr CJodbPZB4oc1d18n+hnuywv9IgndmMCT3zNSR5ps4xDG9pwRU4VGFPrHp w==; X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="3329129" X-IronPort-AV: E=Sophos;i="6.06,189,1705392000"; d="scan'208";a="3329129" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2024 18:58:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,189,1705392000"; d="scan'208";a="11837062" Received: from dschro4x-mobl.amr.corp.intel.com (HELO [10.212.137.190]) ([10.212.137.190]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2024 18:58:28 -0800 Message-ID: Date: Tue, 27 Feb 2024 18:58:27 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2 7/9] tools/arch/x86/intel_sdsi: Fix meter_certificate decoding Content-Language: en-US To: "David E. Box" , rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com References: <20240228000016.1685518-1-david.e.box@linux.intel.com> <20240228000016.1685518-8-david.e.box@linux.intel.com> From: Kuppuswamy Sathyanarayanan In-Reply-To: <20240228000016.1685518-8-david.e.box@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/27/24 4:00 PM, David E. Box wrote: > Fix errors in the calculation of the start position of the counters and in > the display loop. > > Fixes: aad129780bae ("platform/x86/intel/sdsi: Add support for reading the current meter state") > Signed-off-by: David E. Box > --- Looks good to me. Reviewed-by: Kuppuswamy Sathyanarayanan > > V2 - Split of V1 patch 7 > > tools/arch/x86/intel_sdsi/intel_sdsi.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tools/arch/x86/intel_sdsi/intel_sdsi.c b/tools/arch/x86/intel_sdsi/intel_sdsi.c > index def1b9a01738..2acc6be5f5d6 100644 > --- a/tools/arch/x86/intel_sdsi/intel_sdsi.c > +++ b/tools/arch/x86/intel_sdsi/intel_sdsi.c > @@ -403,15 +403,16 @@ static int sdsi_meter_cert_show(struct sdsi_dev *s) > return -1; > } > > - bec = (void *)(mc) + sizeof(mc); > + bec = (void *)(mc) + sizeof(*mc); > > printf("Number of Feature Counters: %d\n", mc->bundle_length / 8); > - while (count++ < mc->bundle_length / 8) { > + while (count < mc->bundle_length / 8) { > char feature[5]; > > feature[4] = '\0'; > get_feature(bec[count].encoding, feature); > printf(" %s: %d\n", feature, bec[count].counter); > + ++count; > } > > return 0; -- Sathyanarayanan Kuppuswamy Linux Kernel Developer