[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv |
Date: |
Sun, 19 Sep 2021 20:43:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
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.
> 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~
>
[PATCH v2 22/41] target/arm: Use raise_sigsegv for mte tag lookup, Richard Henderson, 2021/09/18
[PATCH v2 23/41] target/arm: Implement arm_cpu_record_sigsegv, Richard Henderson, 2021/09/18
[PATCH v2 21/41] target/alpha: Make alpha_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
[PATCH v2 26/41] target/hppa: Make hppa_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
[PATCH v2 29/41] target/microblaze: Make mb_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
[PATCH v2 35/41] target/riscv: Make riscv_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
[PATCH v2 27/41] target/i386: Implement x86_cpu_record_sigsegv, Richard Henderson, 2021/09/18