Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1739267lqa; Mon, 29 Apr 2024 19:02:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9QH7bvMBM1j0HWej2KWltWF0aH2Txqq4CgZBB+hig0VtS1D5NToCSg06GXO7EGntc+SsavWw/EPkyArVsU5YlhaecnQoTGMGALvjy7w== X-Google-Smtp-Source: AGHT+IFrGGM5yx34AN3AgkYuZYw/7aiF1lzlPhl0esNaX7XPRHOLUvueyTTGQZIDiaFeWhv9YGIW X-Received: by 2002:a05:6214:b6e:b0:69c:8709:1f6a with SMTP id ey14-20020a0562140b6e00b0069c87091f6amr1373170qvb.50.1714442521739; Mon, 29 Apr 2024 19:02:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714442521; cv=pass; d=google.com; s=arc-20160816; b=Zkik9wsGOjmMXCYCHN1+MRpxM4Sozbiu1tjVxF+MHUk1YJyy/dd0EML6p1KkszKGb0 JuRpnn06Dz2UubnQW7xsUgxJ7GwV84/h/dX4ya78SFe1NapO3re2Xk63YIw3mb3vYi3P 3djsw3CZ3LhsjMvZ58IOtM0CTOen19297ysNh2yC2TnLXvTs2arZ/kxDsOs8k/wofSiv 0F6y3USkZpHBd9EDNFXkVQkVtbc0PTcHw1lxY/Q3UESMZPclxQSfrGOI5oadBHmUWLg6 j0NnMIZQzKGTbmXSMgp7q0ecli7YGm6L3KiRmd4M2J6gB77al0SaUnhVTix3IdR1jfu2 I5hQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=59GuWjoYagF/w5uel5V9BiijUr6yr8WebjtnifHucW8=; fh=zW7FuuJ0Yq8jpCadt4SFBn+Ps3obhV4RHcsgS1pc9gw=; b=ScheyySM4pIErMktLk2AHRw5/tltdKTbVruM82u00zySalgV4ETWDFz/uv5+gR8qHx x29KMVQIfA8+aS7j3tEQEc1VB9KRvfubIxgY1h/zG7aD2CUnzYFiOHZkbex1ekEHHmNh V+/8393x12blEahb+ogehqGI2L04Mbnk4JAxMJQnVUxJ5/Y86Z9Tu/L4kXrxCaKC4qP2 SFKN7QJ1Wk8exFdbb3sJ0STD4P16XI+5R9ONgT4QCNUGxT7CWYHfa5BwqK4f3RHFJGc3 KMXaPXfmJB5n38DIXhw9vNPPTjuX4XDB/TX9ku2/5dpbd7M72M4zw97ahFWqY73WDkUN QT+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PNQcTRA5; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-163190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163190-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c9-20020ad45ae9000000b006a0cc143366si4254112qvh.35.2024.04.29.19.02.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 19:02:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PNQcTRA5; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-163190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163190-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A43811C22559 for ; Tue, 30 Apr 2024 00:45:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DE7220EB; Tue, 30 Apr 2024 00:45:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PNQcTRA5" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 23639161; Tue, 30 Apr 2024 00:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714437950; cv=none; b=IF9PCNoYQfv3VzuAkhRnTdrdkI6y87UfHwQJ02UMo/qYEYljUSGmTjDDmSjH0E+XDm7Z6EIiT+rMjv9raNBdF9oNqtAHvVC6xzeXXoj70uC7/cyDnkONGWio7eUoZHaBl9E2JEFweqXJMyvzkbRCLJtzHnN0cmMfbQTeEF+s1dA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714437950; c=relaxed/simple; bh=IETNoJ731yGtO8YaT0vZ74KAZZVPCO5X4Qoc3W+b/do=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UuoDSonr0YTcl4f3UjTmdwBi5Mn6MMT+nYJ924skz6KJlqEjA94p/dIrmcbmdyt7z5NMUv+SaT74O/CMqi9ABneieo2b220Fu9S0V8fdq2OBIvCtGO2zc7uX9n4gFuPGuMjt8mTpNnC/dMXKa89DqtKKA7/SxV85QsT6TDoh3VA= 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=PNQcTRA5; arc=none smtp.client-ip=192.198.163.16 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=1714437949; x=1745973949; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IETNoJ731yGtO8YaT0vZ74KAZZVPCO5X4Qoc3W+b/do=; b=PNQcTRA5rGbu6dBIyslDfNPLqHtMw1Z9n8I9HTo8jBxqdWCV0WmgXnAA 14c0QmrqCy9Zv6X4gG1PYBqTCHcsam8kAxN7XbXmbWDNrkHMeSPgSY8D+ dV97Z3F5AyvFJJ/o9TLTcRaJafRUhdYVID8bARmpnNkBXlYWNf+kF2Dc1 2oWMwyVZ7nQm0Rc7msv7aRlBe79iuxI9b5RZpeS92OHEJGsAv01f4CqX6 T8OmIPo1jaqC52my0B1N6UJNOiYQZiWfeI5nHPNh5QIjY70qU5to4iLyS jjACeNExv8h9KovjOKlMO202B0WEL/izFYjqkkiGbwAWH5qzvfJrnAkCG g==; X-CSE-ConnectionGUID: 2xtlqSBpQYO6k9gwk6Je4A== X-CSE-MsgGUID: 9gh2D53oTT2YlyXMFWM34Q== X-IronPort-AV: E=McAfee;i="6600,9927,11059"; a="10658579" X-IronPort-AV: E=Sophos;i="6.07,241,1708416000"; d="scan'208";a="10658579" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2024 17:45:48 -0700 X-CSE-ConnectionGUID: MKyKWB56SYGsWdNZKZHgDw== X-CSE-MsgGUID: XzWcFw9oSlSGxP+NQA+HAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,241,1708416000"; d="scan'208";a="31079781" Received: from unknown (HELO dmi-pnp-i7.sh.intel.com) ([10.239.159.155]) by orviesa005.jf.intel.com with ESMTP; 29 Apr 2024 17:45:46 -0700 From: Dapeng Mi To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Jim Mattson , Mingwei Zhang , Xiong Zhang , Zhenyu Wang , Like Xu , Jinrong Liang , Dapeng Mi , Dapeng Mi Subject: [PATCH 0/2] vPMU code refines Date: Tue, 30 Apr 2024 08:52:37 +0800 Message-Id: <20240430005239.13527-1-dapeng1.mi@linux.intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This small patchset refines the ambiguous naming in kvm_pmu structure and use macros instead of magic numbers to manipulate FIXED_CTR_CTRL MSR to increase readability. No logic change is introduced in this patchset. Dapeng Mi (2): KVM: x86/pmu: Change ambiguous _mask suffix to _rsvd in kvm_pmu KVM: x86/pmu: Manipulate FIXED_CTR_CTRL MSR with macros arch/x86/include/asm/kvm_host.h | 10 ++++----- arch/x86/kvm/pmu.c | 26 ++++++++++++------------ arch/x86/kvm/pmu.h | 8 +++++--- arch/x86/kvm/svm/pmu.c | 4 ++-- arch/x86/kvm/vmx/pmu_intel.c | 36 +++++++++++++++++++-------------- 5 files changed, 46 insertions(+), 38 deletions(-) base-commit: 7b076c6a308ec5bce9fc96e2935443ed228b9148 -- 2.40.1