qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] accel/tcg: test CPUJumpCache in tb_jmp_cache_clear_page()


From: Richard Henderson
Subject: Re: [PATCH] accel/tcg: test CPUJumpCache in tb_jmp_cache_clear_page()
Date: Fri, 3 Feb 2023 11:29:24 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 2/3/23 07:15, Eric Auger wrote:
After commit 4e4fa6c12d ("accel/tcg: Complete cpu initialization
before registration"), it looks the CPUJumpCache handle can be NULL.
This causes a SIGSEV when running debug-wp-migration kvm unit test.

At the first place it should be clarified why this TCG code is called
with KVM acceleration. This may hide another bug.

Fixes: 4e4fa6c12d ("accel/tcg: Complete cpu initialization before registration")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
  accel/tcg/cputlb.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 4e040a1cb9..ac0245ee6c 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -103,6 +103,10 @@ static void tb_jmp_cache_clear_page(CPUState *cpu, 
target_ulong page_addr)
      int i, i0 = tb_jmp_cache_hash_page(page_addr);
      CPUJumpCache *jc = cpu->tb_jmp_cache;
+ if (!jc) {
+        return;
+    }

While I think we shouldn't arrive here for KVM, it was previously not an error to do so. I'm going to go ahead and queue this while the correct cpregs change gets worked out.


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]