linux-stable/arch/s390
Sean Christopherson 4eeef24241 KVM: x86: Query vcpu->vcpu_idx directly and drop its accessor
Read vcpu->vcpu_idx directly instead of bouncing through the one-line
wrapper, kvm_vcpu_get_idx(), and drop the wrapper.  The wrapper is a
remnant of the original implementation and serves no purpose; remove it
before it gains more users.

Back when kvm_vcpu_get_idx() was added by commit 497d72d80a ("KVM: Add
kvm_vcpu_get_idx to get vcpu index in kvm->vcpus"), the implementation
was more than just a simple wrapper as vcpu->vcpu_idx did not exist and
retrieving the index meant walking over the vCPU array to find the given
vCPU.

When vcpu_idx was introduced by commit 8750e72a79 ("KVM: remember
position in kvm->vcpus array"), the helper was left behind, likely to
avoid extra thrash (but even then there were only two users, the original
arm usage having been removed at some point in the past).

No functional change intended.

Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210910183220.2397812-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-09-22 10:33:11 -04:00
..
appldata
boot Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
configs s390: update defconfigs 2021-09-15 14:29:21 +02:00
crypto s390/archrandom: add parameter check for s390_arch_random_generate 2021-04-21 12:32:12 +02:00
hypfs s390: rename dma section to amode31 2021-08-05 14:10:53 +02:00
include 2nd batch of s390 updates for 5.15 merge window 2021-09-09 12:55:12 -07:00
kernel 2nd batch of s390 updates for 5.15 merge window 2021-09-09 12:55:12 -07:00
kvm KVM: x86: Query vcpu->vcpu_idx directly and drop its accessor 2021-09-22 10:33:11 -04:00
lib arch: remove compat_alloc_user_space 2021-09-08 15:32:35 -07:00
mm 2nd batch of s390 updates for 5.15 merge window 2021-09-09 12:55:12 -07:00
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-07-29 00:20:56 +02:00
pci s390/pci_mmio: fully validate the VMA before calling follow_pte() 2021-09-15 14:29:21 +02:00
purgatory s390: enable KCSAN 2021-07-30 17:09:23 +02:00
tools s390/disassembler: add instructions 2021-07-27 09:39:19 +02:00
Kbuild s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
Kconfig s390: remove WARN_DYNAMIC_STACK 2021-09-15 14:29:21 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile s390: remove WARN_DYNAMIC_STACK 2021-09-15 14:29:21 +02:00