diff options
author | Sean Christopherson <seanjc@google.com> | 2024-11-01 21:35:52 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-11-05 07:57:46 +0300 |
commit | 7d1cb7cee94ffd913cb3b70aa1c3538f195c1f23 (patch) | |
tree | 45ca88b358a9f418626344afbcdef73862b2b1e6 /rust/helpers/helpers.c | |
parent | c9c9acfcd5738fb292e670a582e4333a1187004c (diff) | |
download | linux-7d1cb7cee94ffd913cb3b70aa1c3538f195c1f23.tar.xz |
KVM: x86: Rename APIC base setters to better capture their relationship
Rename kvm_set_apic_base() and kvm_lapic_set_base() to kvm_apic_set_base()
and __kvm_apic_set_base() respectively to capture that the underscores
version is a "special" variant (it exists purely to avoid recalculating
the optimized map multiple times when stuffing the RESET value).
Opportunistically add a comment explaining why kvm_lapic_reset() uses the
inner helper. Note, KVM deliberately invokes kvm_arch_vcpu_create() while
kvm->lock is NOT held so that vCPU setup isn't serialized if userspace is
creating multiple/all vCPUs in parallel. I.e. triggering an extra
recalculation is not limited to theoretical/rare edge cases, and so is
worth avoiding.
No functional change intended.
Reviewed-by: Kai Huang <kai.huang@intel.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20241009181742.1128779-7-seanjc@google.com
Link: https://lore.kernel.org/r/20241101183555.1794700-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions