aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Chen <[email protected]>2024-08-19 13:59:27 +0800
committerSean Christopherson <[email protected]>2024-08-22 11:37:41 -0700
commite0183a42e3bcd4c30eb95bb046c016023fdc01ce (patch)
treef564b15ce50afc9809f251d6199852ae484fb9cb
parent1c450ffef589383f743d798666703687fc2e582b (diff)
KVM: x86: Use this_cpu_ptr() in kvm_user_return_msr_cpu_online
Use this_cpu_ptr() instead of open coding the equivalent in kvm_user_return_msr_cpu_online. Signed-off-by: Li Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 70219e406987..ffdf251bfef5 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -413,8 +413,7 @@ EXPORT_SYMBOL_GPL(kvm_find_user_return_msr);
static void kvm_user_return_msr_cpu_online(void)
{
- unsigned int cpu = smp_processor_id();
- struct kvm_user_return_msrs *msrs = per_cpu_ptr(user_return_msrs, cpu);
+ struct kvm_user_return_msrs *msrs = this_cpu_ptr(user_return_msrs);
u64 value;
int i;