qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv


From: Warner Losh
Subject: Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv
Date: Sun, 19 Sep 2021 12:53:11 -0600


> On Sep 19, 2021, at 12:43 PM, Philippe Mathieu-Daudé <f4bug@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 <imp@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~
>> 
> 
> 




reply via email to

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