> On Sep 19, 2021, at 12:43 PM, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > > On 9/19/21 20:35, Richard Henderson wrote: >> On 9/18/21 11:45 AM, Richard Henderson wrote: >>> +/** >>> + * raise_sigsegv: >>> + * @cpu: the cpu context >>> + * @addr: the guest address of the fault >>> + * @access_type: access was read/write/execute >>> + * @maperr: true for invalid page, false for permission fault >>> + * @ra: host pc for unwinding >>> + * >>> + * Use the TCGCPUOps hook to record cpu state, do guest operating system >>> + * specific things to raise SIGSEGV, and jump to the main cpu loop. >>> + */ >>> +void QEMU_NORETURN raise_sigsegv(CPUState *cpu, target_ulong addr, >>> + MMUAccessType access_type, >>> + bool maperr, uintptr_t ra); >> >> FYI, something to bikeshed here is the name of the function. Should it >> in fact be cpu_loop_exit_raise_sigsegv? > > That or cpu_loop_exit_segv() which is explicit enough IMO. That name works for me… Also, and this is a stretch so consider it maybe a bit weak… Reviewed by: Warner Losh <i...@bsdimp.com> > Because it can't be used outside of the running cpu context. (E.g. >> >> there are a couple of instances where it's tempting to use this from >> within cpu_loop itself, processing pseudo-syscalls.) >> >> >> r~ >> > >
- Re: [PATCH v2 05/41] configure: Merge riscv32... Philippe Mathieu-Daudé
- [PATCH v2 13/41] linux-user/host/s390: Populate ho... Richard Henderson
- Re: [PATCH v2 13/41] linux-user/host/s390: Po... Philippe Mathieu-Daudé
- [PATCH v2 10/41] linux-user/host/sparc: Populate h... Richard Henderson
- [PATCH v2 06/41] linux-user: Reorg handling for SI... Richard Henderson
- Re: [PATCH v2 06/41] linux-user: Reorg handli... Philippe Mathieu-Daudé
- [PATCH v2 20/41] linux-user: Add raise_sigsegv Richard Henderson
- Re: [PATCH v2 20/41] linux-user: Add raise_si... Philippe Mathieu-Daudé
- Re: [PATCH v2 20/41] linux-user: Add raise_si... Richard Henderson
- Re: [PATCH v2 20/41] linux-user: Add rais... Philippe Mathieu-Daudé
- Re: [PATCH v2 20/41] linux-user: Add ... Warner Losh
- [PATCH v2 22/41] target/arm: Use raise_sigsegv for... Richard Henderson
- [PATCH v2 23/41] target/arm: Implement arm_cpu_rec... Richard Henderson
- [PATCH v2 07/41] linux-user/host/x86: Populate hos... Richard Henderson
- [PATCH v2 11/41] linux-user/host/arm: Populate hos... Richard Henderson
- [PATCH v2 25/41] target/hexagon: Remove hexagon_cp... Richard Henderson
- [PATCH v2 14/41] linux-user/host/mips: Populate ho... Richard Henderson
- Re: [PATCH v2 14/41] linux-user/host/mips: Po... Philippe Mathieu-Daudé
- [PATCH v2 32/41] linux-user/openrisc: Adjust signa... Richard Henderson
- [PATCH v2 35/41] target/riscv: Make riscv_cpu_tlb_... Richard Henderson
- [PATCH v2 12/41] linux-user/host/aarch64: Populate... Richard Henderson