Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp141457lqh; Wed, 27 Mar 2024 18:22:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQKVUw3ajiJ6WLMmOE95ntAV+dEd0VRreKj7JcccaCGVGsMrdFeJwamTTdjwES+iIoPF/YmyuNw6fD96V/hkCNu/ORzHPo4ExZUBwViA== X-Google-Smtp-Source: AGHT+IG8booW9d+fVJnrowUTLP/qRM27XQkDhFsCDOaEtRUBx6H/tOc0quHsn4mMzULZKAKmwqi9 X-Received: by 2002:a9d:4e82:0:b0:6e6:97e5:7949 with SMTP id v2-20020a9d4e82000000b006e697e57949mr1745860otk.6.1711588921825; Wed, 27 Mar 2024 18:22:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711588921; cv=pass; d=google.com; s=arc-20160816; b=fThrVRSKTSm4vkCPB7zdawrBGDc1zychZJjfjWJjurJn5LEFXbphSynWf2v/02x0MT j8Hddl6qTUiwIgZrmVucxKqYPqAfqQtlE7QvGEib1PWMI2P8YQhdEezJ5ApZYUJa1h+/ 2jQgSKd0/XJMBRU2fS0Bn6Yhw4IPIVSsCDI8ZJl1wo/RzMvkkF7WN6dE8/ugCrtnYbmo b8/8C1mV1VshyLoK+jiqNIQE+EOEs0lMVr3HE4rkeEensRL1SZWcy9zGLNkw7+xjLDxc nch7UfQgZpGAM2jlrjLGl7yzHHFwj68sSSwIPlqljawjujo8fdIGVWZCr4EO1o4ry/aA Qavw== 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:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=P1ANYkv4/eSdWDeayIuhcvpAVvlwgWmzRcbjn9LrGUQ=; fh=hY6DSyZzuuSNsx03b0wKjVp3ygkrOF91hWgH0Yi/JLc=; b=aw+ICidbh9fCFrqILCoqcE+9HwoOk4pcl4tA48fuSe9MkVDc8I8lFBqxHa9p+irx/+ oacOhcUM9nqrrE4tsmnMSdJIW5IKBBOfhDizL1qpnptv96D36HdsOh3LXDMBIxGAqDeH PjCgvOch9qS84x0dPbjijl2btlKXcowp/XTO8/qknCLlX5CFgQcu/DlmDIhuYv5QfnOk s83hjR80BrOu+5zA5rA7gZkSDswqK6crQxlG2l/xu1BwoqNvCn7hiA5BC9Ce1kA41NeL XprehsrM4/R8zZ2TKh1LVn6/AjOof4MWHE85H0naLHqUP/JGoR3GzCQq6rUKXnJVG7J4 qhqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cuFJ6C9o; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-122267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122267-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b3-20020a637143000000b005dc788f3750si307382pgn.465.2024.03.27.18.22.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 18:22:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cuFJ6C9o; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-122267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122267-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 6D0782A5BB6 for ; Thu, 28 Mar 2024 01:22:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 051D6200D5; Thu, 28 Mar 2024 01:21:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cuFJ6C9o" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 37A8B3C0B; Thu, 28 Mar 2024 01:21:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711588913; cv=none; b=oKJBo2IBHSqSOdm1pdQDwVfPdudwNpuGCS7f/zRpwS0cSg7A3RC7zgnNgwj6Mnjb19X18BqaA2dYuVg60hjHLYQkR4/AqHZEWoDFNfp8hDw0vj6QKUXdyghwecY19vNXzCAJxMb55yTl44/Q++0Zzaft+dymdX/QJnJ/taIWtKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711588913; c=relaxed/simple; bh=P1ANYkv4/eSdWDeayIuhcvpAVvlwgWmzRcbjn9LrGUQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dWQxZO3CZDl74V7ii9NkDPQeLM2mew2n4JeaChA1Z/Kd96JagQjTJVLYMTwXPE1nj8FA4kCAbclZorkJQOwo0COZPM6Pb5RZjBdCBAENw/aBb1PTC/+CAAN33g74jK8GUDMj0FaLdeJRwuBvRMldTTII+ltDGqyNSD8ExVQG7Rw= 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=cuFJ6C9o; arc=none smtp.client-ip=192.198.163.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=1711588911; x=1743124911; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=P1ANYkv4/eSdWDeayIuhcvpAVvlwgWmzRcbjn9LrGUQ=; b=cuFJ6C9o+HETCa0y3ZZnQeYKuRbZrK9tlW2DpbKeiHirTBOOJpwb6bl0 FPkLHhIhSCFC3wkcjiXHRnC953vmPuPDFuAAqAcpJLve6RD730i/O2Hi8 GMdXFrIV754fVkdCeVZ3j480XIWOf9iOISezmQQWk2kfeN3NffHYaPxWv gDoVLo4IzN7lntdHOIGH7zFvzy7KwWafyO620GOoj6Lo9NUKgVSamyMQO CF2IbGn3u6Ec9CcGigQPSYHQJwg2/8mWWKaIa5oPl6HhE34iDgjlsXubE 8cwr41MDeLuHbGRajxR+tDP0bdf5LdwGHw217oMLpZcVYKLWdlbFaLbec w==; X-CSE-ConnectionGUID: xBQhAKsPQGm3McfGTNXosw== X-CSE-MsgGUID: xbjBWN9MSfyRLUeJyCMKJw== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="6585521" X-IronPort-AV: E=Sophos;i="6.07,160,1708416000"; d="scan'208";a="6585521" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 18:21:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,160,1708416000"; d="scan'208";a="16880943" Received: from dapengmi-mobl1.ccr.corp.intel.com (HELO [10.125.242.198]) ([10.125.242.198]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 18:21:46 -0700 Message-ID: <54c4cf46-3c65-4ef7-86c3-09da39470017@linux.intel.com> Date: Thu, 28 Mar 2024 09:21:44 +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: [kvm-unit-tests Patch v3 01/11] x86: pmu: Remove duplicate code in pmu_init() Content-Language: en-US To: "Yang, Weijiang" Cc: Jim Mattson , Paolo Bonzini , Sean Christopherson , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Zhenyu Wang , "Zhang, Xiong Y" , Mingwei Zhang , Like Xu , Jinrong Liang , "Mi, Dapeng1" References: <20240103031409.2504051-1-dapeng1.mi@linux.intel.com> <20240103031409.2504051-2-dapeng1.mi@linux.intel.com> From: "Mi, Dapeng" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 3/28/2024 9:19 AM, Yang, Weijiang wrote: > On 1/3/2024 11:13 AM, Dapeng Mi wrote: >> From: Xiong Zhang >> >> There are totally same code in pmu_init() helper, remove the duplicate >> code. >> >> Signed-off-by: Xiong Zhang >> Signed-off-by: Dapeng Mi > > Jim has already added RB tag for this patch in v2, you may add it here. Oh, missed it. Thanks for reminding. > >> --- >>   lib/x86/pmu.c | 5 ----- >>   1 file changed, 5 deletions(-) >> >> diff --git a/lib/x86/pmu.c b/lib/x86/pmu.c >> index 0f2afd650bc9..d06e94553024 100644 >> --- a/lib/x86/pmu.c >> +++ b/lib/x86/pmu.c >> @@ -16,11 +16,6 @@ void pmu_init(void) >>               pmu.fixed_counter_width = (cpuid_10.d >> 5) & 0xff; >>           } >>   -        if (pmu.version > 1) { >> -            pmu.nr_fixed_counters = cpuid_10.d & 0x1f; >> -            pmu.fixed_counter_width = (cpuid_10.d >> 5) & 0xff; >> -        } >> - >>           pmu.nr_gp_counters = (cpuid_10.a >> 8) & 0xff; >>           pmu.gp_counter_width = (cpuid_10.a >> 16) & 0xff; >>           pmu.gp_counter_mask_length = (cpuid_10.a >> 24) & 0xff; >