[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/41] target/ppc: fix 'skip KVM' cond in cpu_interrupt_exittb()
From: |
Cédric Le Goater |
Subject: |
[PULL 08/41] target/ppc: fix 'skip KVM' cond in cpu_interrupt_exittb() |
Date: |
Mon, 31 Jan 2022 12:07:38 +0100 |
From: Daniel Henrique Barboza <danielhb413@gmail.com>
cpu_interrupt_exittb() was introduced by commit 044897ef4a22
("target/ppc: Fix system lockups caused by interrupt_request state
corruption") as a way to wrap cpu_interrupt() helper in BQL.
After that, commit 6d38666a8931 ("ppc: Ignore the CPU_INTERRUPT_EXITTB
interrupt with KVM") added a condition to skip this interrupt if we're
running with KVM.
Problem is that the change made by the above commit, testing for
!kvm_enabled() at the start of cpu_interrupt_exittb():
static inline void cpu_interrupt_exittb(CPUState *cs)
{
if (!kvm_enabled()) {
return;
}
(... do cpu_interrupt(cs, CPU_INTERRUPT_EXITTB) ...)
is doing the opposite of what it intended to do. This will return
immediately if not kvm_enabled(), i.e. it's a emulated CPU, and if
kvm_enabled() it will proceed to fire CPU_INTERRUPT_EXITTB.
Fix the 'skip KVM' condition so the function is a no-op when
kvm_enabled().
CC: Greg Kurz <groug@kaod.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/809
Fixes: 6d38666a8931 ("ppc: Ignore the CPU_INTERRUPT_EXITTB interrupt with KVM")
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <20220121160841.9102-1-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
target/ppc/helper_regs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
index 8671b7bb691f..7dca585dddeb 100644
--- a/target/ppc/helper_regs.c
+++ b/target/ppc/helper_regs.c
@@ -201,7 +201,11 @@ void cpu_get_tb_cpu_state(CPUPPCState *env, target_ulong
*pc,
void cpu_interrupt_exittb(CPUState *cs)
{
- if (!kvm_enabled()) {
+ /*
+ * We don't need to worry about translation blocks
+ * when running with KVM.
+ */
+ if (kvm_enabled()) {
return;
}
--
2.34.1
- [PULL 39/41] target/ppc: 74xx: System Reset interrupt cleanup, (continued)
- [PULL 39/41] target/ppc: 74xx: System Reset interrupt cleanup, Cédric Le Goater, 2022/01/31
- [PULL 15/41] target/ppc: 405: Add missing MSR_ME bit, Cédric Le Goater, 2022/01/31
- [PULL 37/41] target/ppc: 74xx: Program exception cleanup, Cédric Le Goater, 2022/01/31
- [PULL 17/41] target/ppc: Simplify powerpc_excp_40x, Cédric Le Goater, 2022/01/31
- [PULL 22/41] target/ppc: 405: Alignment exception cleanup, Cédric Le Goater, 2022/01/31
- [PULL 21/41] target/ppc: 405: System call exception cleanup, Cédric Le Goater, 2022/01/31
- [PULL 34/41] target/ppc: Simplify powerpc_excp_74xx, Cédric Le Goater, 2022/01/31
- [PULL 09/41] spapr.c: check bus != NULL in spapr_get_fw_dev_path(), Cédric Le Goater, 2022/01/31
- [PULL 04/41] ppc/pnv: Fail DMA access if page permissions are not correct, Cédric Le Goater, 2022/01/31
- [PULL 03/41] target/ppc/mmu_common: Fix SRR1/MSR error code on Book-E, Cédric Le Goater, 2022/01/31
- [PULL 08/41] target/ppc: fix 'skip KVM' cond in cpu_interrupt_exittb(),
Cédric Le Goater <=
- [PULL 20/41] target/ppc: 405: External exception cleanup, Cédric Le Goater, 2022/01/31
- [PULL 13/41] ppc/ppc405: Fix TLB flushing, Cédric Le Goater, 2022/01/31
- Re: [PULL 00/41] ppc queue, Peter Maydell, 2022/01/31