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: Richard Henderson
Subject: Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv
Date: Sun, 19 Sep 2021 11:35:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

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?

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]