diff options
author | Jordan Niethe <jniethe5@gmail.com> | 2023-12-01 14:26:17 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-12-07 13:33:08 +0100 |
commit | 180c6b072bf360b686e53d893d8dcf7dbbaec6bb (patch) | |
tree | ecce125985613ce2b5265d0c63572ff171cbd502 /arch/powerpc/kvm/book3s_hv.c | |
parent | KVM: PPC: Reduce reliance on analyse_instr() in mmio emulation (diff) | |
download | linux-180c6b072bf360b686e53d893d8dcf7dbbaec6bb.tar.xz linux-180c6b072bf360b686e53d893d8dcf7dbbaec6bb.zip |
KVM: PPC: Book3S HV nestedv2: Do not cancel pending decrementer exception
In the nestedv2 case, if there is a pending decrementer exception, the
L1 must get the L2's timebase from the L0 to see if the exception should
be cancelled. This adds the overhead of a H_GUEST_GET_STATE call to the
likely case in which the decrementer should not be cancelled.
Avoid this logic for the nestedv2 case.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231201132618.555031-13-vaibhav@linux.ibm.com
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 2ee3f2478570..e48126a59ba7 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -4834,7 +4834,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit, * entering a nested guest in which case the decrementer is now owned * by L2 and the L1 decrementer is provided in hdec_expires */ - if (kvmppc_core_pending_dec(vcpu) && + if (!kvmhv_is_nestedv2() && kvmppc_core_pending_dec(vcpu) && ((tb < kvmppc_dec_expires_host_tb(vcpu)) || (trap == BOOK3S_INTERRUPT_SYSCALL && kvmppc_get_gpr(vcpu, 3) == H_ENTER_NESTED))) |