Commit 7d1cb7c
committed
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>1 parent c9c9acf commit 7d1cb7c
3 files changed
+14
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
2580 | | - | |
| 2580 | + | |
2581 | 2581 | | |
2582 | 2582 | | |
2583 | 2583 | | |
| |||
2628 | 2628 | | |
2629 | 2629 | | |
2630 | 2630 | | |
2631 | | - | |
| 2631 | + | |
2632 | 2632 | | |
2633 | 2633 | | |
2634 | 2634 | | |
| |||
2644 | 2644 | | |
2645 | 2645 | | |
2646 | 2646 | | |
2647 | | - | |
| 2647 | + | |
2648 | 2648 | | |
2649 | 2649 | | |
2650 | 2650 | | |
| |||
2752 | 2752 | | |
2753 | 2753 | | |
2754 | 2754 | | |
2755 | | - | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
2756 | 2763 | | |
2757 | 2764 | | |
2758 | 2765 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3863 | 3863 | | |
3864 | 3864 | | |
3865 | 3865 | | |
3866 | | - | |
| 3866 | + | |
3867 | 3867 | | |
3868 | 3868 | | |
3869 | 3869 | | |
| |||
11879 | 11879 | | |
11880 | 11880 | | |
11881 | 11881 | | |
11882 | | - | |
| 11882 | + | |
11883 | 11883 | | |
11884 | 11884 | | |
11885 | 11885 | | |
| |||
0 commit comments