diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-11-23 19:52:27 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-11-24 21:09:02 +1100 |
commit | 434398ab5eed03dbc0075af9436e871712bfb45a (patch) | |
tree | e671f853504096d3aeee40c0244bcc42f1af9329 /arch/powerpc/include/asm/kvm_host.h | |
parent | KVM: PPC: Book3S HV P9: Add unlikely annotation for !mmu_ready (diff) | |
download | linux-dev-434398ab5eed03dbc0075af9436e871712bfb45a.tar.xz linux-dev-434398ab5eed03dbc0075af9436e871712bfb45a.zip |
KVM: PPC: Book3S HV P9: Avoid cpu_in_guest atomics on entry and exit
cpu_in_guest is set to determine if a CPU needs to be IPI'ed to exit
the guest and notice the need_tlb_flush bit.
This can be implemented as a global per-CPU pointer to the currently
running guest instead of per-guest cpumasks, saving 2 atomics per
entry/exit. P7/8 doesn't require cpu_in_guest, nor does a nested HV
(only the L0 does), so move it to the P9 HV path.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211123095231.1036501-50-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/include/asm/kvm_host.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index d7004412b859..17263276189e 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -287,7 +287,6 @@ struct kvm_arch { u32 online_vcores; atomic_t hpte_mod_interest; cpumask_t need_tlb_flush; - cpumask_t cpu_in_guest; u8 radix; u8 fwnmi_enabled; u8 secure_guest; |