[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write
From: |
Peter Maydell |
Subject: |
Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write |
Date: |
Tue, 22 Mar 2022 15:56:13 +0000 |
On Tue, 22 Mar 2022 at 15:43, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> When accessing the per-CPU register bank of some devices (e.g.: GIC)
> from the GDB stub context, a segfault occurs. This is due to current_cpu
> is not set, as the contect is not a guest CPU.
>
> Let's set current_cpu before doing the acutal memory read write.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/124
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
This works, but I worry a bit that it might have unexpected
side effects, and setting globals (even if thread-local) to
cause side-effects elsewhere isn't ideal...
-- PMM
- [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Bin Meng, 2022/03/22
- [PATCH 2/2] monitor/misc: Set current_cpu for memory dump, Bin Meng, 2022/03/22
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write,
Peter Maydell <=
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Philippe Mathieu-Daudé, 2022/03/22
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Bin Meng, 2022/03/23
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Alex Bennée, 2022/03/24
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Peter Maydell, 2022/03/24
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Bin Meng, 2022/03/27
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Peter Maydell, 2022/03/28
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Bin Meng, 2022/03/29