Add translated embedder syscall hook
Translated x86_64 guests cannot issue the AArch64 HVC instruction used by the existing embedder extension ABI. This prevents those guests from using embedder-provided services such as the graphics bridge.
Add a private elfuse pseudo-syscall as the translated guest counterpart to HVC 6. The syscall keeps the existing hvc6_handler ABI instead of adding a second embedder callback path, so native and translated guests can share the same dispatch logic.
Use syscall number 999 as an internal ABI value between the translated guest shim and elfuse. This is not a Linux syscall number. It is chosen outside the current generic Linux syscall range to avoid colliding with normal guest syscalls, but it is not reserved by Linux and must remain private to elfuse.
If no embedder handler is registered, dispatch falls back to normal syscall handling.
Summary by cubic
Adds a private elfuse pseudo-syscall for translated x86_64 guests to reach the embedder HVC 6 handler, sharing the same dispatch path as native AArch64. This enables embedder services from translated guests without colliding with Linux syscalls.
- New Features
- Defines
ELFUSE_NR_EMBEDDER_HVC6(default 999) via CFLAGS; compile-time asserts it is outside the Linuxsyscall_tableor fails the build. - Gated to translated guests only (
g->is_rosetta) and requires a registeredg->hvc6_handler; native AArch64 cannot reach it via SVC. - On match: read X0 (call id) and X1 (GVA of uint64_t args[8]); return -EFAULT on read failure; else invoke the handler; otherwise fall through to normal syscall handling.
- Defines