Files
unkernel/vk
Pooya Parsa 74e1ecf806 Run x86-64 programs beside arm64 ones on one kernel
The kernel runs x86-64 ELF programs as their own tasks on kwemu's x86
front end (CONFIG_WASM_X86, on in kw_defconfig): exec picks the ISA from
e_machine, and an x86 task gets x86-64's syscall table (through the same
pt_regs wrappers, with translations where its ABI differs from arm64's:
open flags, struct stat, clone's argument order, packed epoll events,
uname, arch_prctl, MAP_32BIT, strict seccomp), signal frames, ptrace
regsets and core notes, a vDSO, the vsyscall page, AT_PLATFORM, AT_HWCAP
and /proc/cpuinfo in x86's format; kw.x86isa= masks its features. arm64
tasks are unchanged. The kernel patches are "wasm: run x86-64 user space
beside arm64" after the arch patch and three generic ones (erofs without
vmap on a flat vmalloc, eventpoll's packed events, seccomp's strict
syscalls per task); the separate x86-only series (kernel/patches/linux-x64,
KW_ARCH=x64) is gone, and so is the build switch.

base-test.cpio has x86-64 builds of kwtest and abitest beside arm64's
(kwtest-x86_64, abitest-x86_64; abitest_x64 finds itself under that name
and checks the i386 cross exec only where there is an i386 build), and
test/x64-kernel-audit.mjs runs them on the one kernel. i386 tasks are not
there yet (no CONFIG_COMPAT). The distro images still register x86_64
with binfmt_misc (box64, qemu-x86_64), which comes before the kernel's
ELF loader.

Co-authored-by: JeremySu0818 <xinghong.su0818@gmail.com>
2026-11-29 23:35:28 +00:00
..
vk: fill the gaps games, mpv and Vulkan 1.2 callers hit (#32, #33) and add texel buffers: timeline semaphores are offered (values reached at the submit as fences are, a queue wait for a value nothing has signalled holds that submit and the later ones in the ICD until it is given), with imageless framebuffers, separate depth/stencil layouts, multiDrawIndirect, HOST_CACHED on the host-visible memory type, image_format_list and swapchain_mutable_format, and one more inter-stage location for wgpu-hal; the translator marks storage buffers a module never writes read-only, reflects only the resources an entry point reaches, drops OpLine, folds OpSpecConstantOp on integers, booleans and composites, lowers isinf/isnan and int[1] sample masks; the host sizes uniform bindings in 16-byte steps, copies block-compressed images in whole blocks and between size-compatible formats, binds placeholders for unwritten textures and samplers, takes storage bindings at unaligned offsets in dispatches through a scratch copy, rewrites indexed triangle fans as lists and no longer truncates sizes of 2 GiB and more; texel buffers (VkBufferView, both descriptor types) run as a storage buffer of words plus a per-view parameter block, decoded by the view's format in WGSL; the base profile exports LIBGL_KOPPER_DISABLE=1 so Mesa's zink stays off kwvk; mpv's gpu-next (yuv420p and rgb24), DDNet with its own SPIR-V and vkd3d's texel-buffer pipelines run; checks in test/vk (vk-timeline, vk-texel, host cases, translator shaders) and a games stage for the test disk
2026-11-28 13:05:33 +00:00