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