mbox series

[0/2] vPMU code refines

Message ID 20240430005239.13527-1-dapeng1.mi@linux.intel.com (mailing list archive)
Headers show
Series vPMU code refines | expand

Message

Mi, Dapeng April 30, 2024, 12:52 a.m. UTC
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

Comments

Mingwei Zhang April 30, 2024, 6:15 p.m. UTC | #1
On Mon, Apr 29, 2024 at 5:45 PM Dapeng Mi <dapeng1.mi@linux.intel.com> wrote:
>
> 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

So, it looks like the 1st patch is also in the upcoming RFCv2 for
mediated passthrough vPMU. I will remove that from my list then.

Thanks. Regards
-Mingwei

>   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
>
Mi, Dapeng May 6, 2024, 1:37 a.m. UTC | #2
On 5/1/2024 2:15 AM, Mingwei Zhang wrote:
> On Mon, Apr 29, 2024 at 5:45 PM Dapeng Mi <dapeng1.mi@linux.intel.com> wrote:
>> 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
> So, it looks like the 1st patch is also in the upcoming RFCv2 for
> mediated passthrough vPMU. I will remove that from my list then.

Mingwei, we'd better keep this patch in RFCv2 until the this patchset is
merged, then we don't rebase it again when this patch is merged. Thanks.


> Thanks. Regards
> -Mingwei
>
>>   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
>>
Mingwei Zhang May 6, 2024, 5:35 a.m. UTC | #3
On Sun, May 5, 2024 at 6:37 PM Mi, Dapeng <dapeng1.mi@linux.intel.com> wrote:
>
>
> On 5/1/2024 2:15 AM, Mingwei Zhang wrote:
> > On Mon, Apr 29, 2024 at 5:45 PM Dapeng Mi <dapeng1.mi@linux.intel.com> wrote:
> >> 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
> > So, it looks like the 1st patch is also in the upcoming RFCv2 for
> > mediated passthrough vPMU. I will remove that from my list then.
>
> Mingwei, we'd better keep this patch in RFCv2 until the this patchset is
> merged, then we don't rebase it again when this patch is merged. Thanks.
>

yeah. too late. I don't want to have a duplicate patch in LKML. On the
other hand, you could have waited a little bit before sending this
one. Next time, coordinate with us before sending.

Thanks.
-Mingwei
>
> > Thanks. Regards
> > -Mingwei
> >
> >>   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
> >>
Mi, Dapeng May 6, 2024, 8:01 a.m. UTC | #4
On 5/6/2024 1:35 PM, Mingwei Zhang wrote:
> On Sun, May 5, 2024 at 6:37 PM Mi, Dapeng <dapeng1.mi@linux.intel.com> wrote:
>>
>> On 5/1/2024 2:15 AM, Mingwei Zhang wrote:
>>> On Mon, Apr 29, 2024 at 5:45 PM Dapeng Mi <dapeng1.mi@linux.intel.com> wrote:
>>>> 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
>>> So, it looks like the 1st patch is also in the upcoming RFCv2 for
>>> mediated passthrough vPMU. I will remove that from my list then.
>> Mingwei, we'd better keep this patch in RFCv2 until the this patchset is
>> merged, then we don't rebase it again when this patch is merged. Thanks.
>>
> yeah. too late. I don't want to have a duplicate patch in LKML. On the
> other hand, you could have waited a little bit before sending this
> one. Next time, coordinate with us before sending.

This patch has nothing to do with the mediated vPMU patchset in theory and
can be merged earlier than the mediated vPMU patcheset which may need a
long time to review and discuss. I hope this patch can be merged ASAP and
so readers won't be mislead by the ambiguous suffix.


>
> Thanks.
> -Mingwei
>>> Thanks. Regards
>>> -Mingwei
>>>
>>>>   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
>>>>
Sean Christopherson June 4, 2024, 11:29 p.m. UTC | #5
On Tue, 30 Apr 2024 08:52:37 +0800, Dapeng Mi wrote:
> 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
> 
> [...]

Applied to kvm-x86 pmu, thanks!

[1/2] KVM: x86/pmu: Change ambiguous _mask suffix to _rsvd in kvm_pmu
      https://github.com/kvm-x86/linux/commit/0e102ce3d413
[2/2] KVM: x86/pmu: Manipulate FIXED_CTR_CTRL MSR with macros
      https://github.com/kvm-x86/linux/commit/75430c412a31

--
https://github.com/kvm-x86/linux/tree/next