All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Remove IA32_PERF_GLOBAL_OVF_CTRL from KVM_GET_MSR_INDEX_LIST
@ 2023-11-13 18:48 Jim Mattson
  2023-11-30 20:58 ` Sean Christopherson
  2024-06-04 23:29 ` Sean Christopherson
  0 siblings, 2 replies; 3+ messages in thread
From: Jim Mattson @ 2023-11-13 18:48 UTC (permalink / raw)
  To: kvm, 'Paolo Bonzini ', 'Sean Christopherson '; +Cc: Jim Mattson

This MSR reads as 0, and any host-initiated writes are ignored, so
there's no reason to enumerate it in KVM_GET_MSR_INDEX_LIST.

Signed-off-by: Jim Mattson <jmattson@google.com>
---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 2c924075f6f1..54bcc197b314 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1470,7 +1470,7 @@ static const u32 msrs_to_save_pmu[] = {
 	MSR_ARCH_PERFMON_FIXED_CTR0, MSR_ARCH_PERFMON_FIXED_CTR1,
 	MSR_ARCH_PERFMON_FIXED_CTR0 + 2,
 	MSR_CORE_PERF_FIXED_CTR_CTRL, MSR_CORE_PERF_GLOBAL_STATUS,
-	MSR_CORE_PERF_GLOBAL_CTRL, MSR_CORE_PERF_GLOBAL_OVF_CTRL,
+	MSR_CORE_PERF_GLOBAL_CTRL,
 	MSR_IA32_PEBS_ENABLE, MSR_IA32_DS_AREA, MSR_PEBS_DATA_CFG,
 
 	/* This part of MSRs should match KVM_INTEL_PMC_MAX_GENERIC. */
-- 
2.43.0.rc0.421.g78406f8d94-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: x86: Remove IA32_PERF_GLOBAL_OVF_CTRL from KVM_GET_MSR_INDEX_LIST
  2023-11-13 18:48 [PATCH] KVM: x86: Remove IA32_PERF_GLOBAL_OVF_CTRL from KVM_GET_MSR_INDEX_LIST Jim Mattson
@ 2023-11-30 20:58 ` Sean Christopherson
  2024-06-04 23:29 ` Sean Christopherson
  1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2023-11-30 20:58 UTC (permalink / raw)
  To: Jim Mattson; +Cc: kvm, 'Paolo Bonzini '

On Mon, Nov 13, 2023, Jim Mattson wrote:
> This MSR reads as 0, and any host-initiated writes are ignored, so
> there's no reason to enumerate it in KVM_GET_MSR_INDEX_LIST.

This looks sane to me, but I'd like to get a thumbs up from Paolo before applying.
AFAICT, this won't cause problems for QEMU, but a sanity check from someone that
runs a different VMM than us would be nice to have.

> Signed-off-by: Jim Mattson <jmattson@google.com>
> ---
>  arch/x86/kvm/x86.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 2c924075f6f1..54bcc197b314 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -1470,7 +1470,7 @@ static const u32 msrs_to_save_pmu[] = {
>  	MSR_ARCH_PERFMON_FIXED_CTR0, MSR_ARCH_PERFMON_FIXED_CTR1,
>  	MSR_ARCH_PERFMON_FIXED_CTR0 + 2,
>  	MSR_CORE_PERF_FIXED_CTR_CTRL, MSR_CORE_PERF_GLOBAL_STATUS,
> -	MSR_CORE_PERF_GLOBAL_CTRL, MSR_CORE_PERF_GLOBAL_OVF_CTRL,
> +	MSR_CORE_PERF_GLOBAL_CTRL,
>  	MSR_IA32_PEBS_ENABLE, MSR_IA32_DS_AREA, MSR_PEBS_DATA_CFG,
>  
>  	/* This part of MSRs should match KVM_INTEL_PMC_MAX_GENERIC. */
> -- 
> 2.43.0.rc0.421.g78406f8d94-goog
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: x86: Remove IA32_PERF_GLOBAL_OVF_CTRL from KVM_GET_MSR_INDEX_LIST
  2023-11-13 18:48 [PATCH] KVM: x86: Remove IA32_PERF_GLOBAL_OVF_CTRL from KVM_GET_MSR_INDEX_LIST Jim Mattson
  2023-11-30 20:58 ` Sean Christopherson
@ 2024-06-04 23:29 ` Sean Christopherson
  1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2024-06-04 23:29 UTC (permalink / raw)
  To: Sean Christopherson, kvm, 'Paolo Bonzini ', Jim Mattson

On Mon, 13 Nov 2023 10:48:54 -0800, Jim Mattson wrote:
> This MSR reads as 0, and any host-initiated writes are ignored, so
> there's no reason to enumerate it in KVM_GET_MSR_INDEX_LIST.

Applied to kvm-x86 pmu, time to find out the hard way if this makes QEMU
unhappy.  Thanks!

[1/1] KVM: x86: Remove IA32_PERF_GLOBAL_OVF_CTRL from KVM_GET_MSR_INDEX_LIST
      https://github.com/kvm-x86/linux/commit/ea19f7d0bf46

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-04 23:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13 18:48 [PATCH] KVM: x86: Remove IA32_PERF_GLOBAL_OVF_CTRL from KVM_GET_MSR_INDEX_LIST Jim Mattson
2023-11-30 20:58 ` Sean Christopherson
2024-06-04 23:29 ` Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.