Skip to content

Commit e0183a4

Browse files
FirstLoveLifesean-jc
authored andcommitted
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 <chenl311@chinatelecom.cn> Link: https://lore.kernel.org/r/87zfp96ojk.wl-me@linux.beauty Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 1c450ff commit e0183a4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/x86/kvm/x86.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,7 @@ EXPORT_SYMBOL_GPL(kvm_find_user_return_msr);
413413

414414
static void kvm_user_return_msr_cpu_online(void)
415415
{
416-
unsigned int cpu = smp_processor_id();
417-
struct kvm_user_return_msrs *msrs = per_cpu_ptr(user_return_msrs, cpu);
416+
struct kvm_user_return_msrs *msrs = this_cpu_ptr(user_return_msrs);
418417
u64 value;
419418
int i;
420419

0 commit comments

Comments
 (0)