From 6e0dfea112951c25292cd8f108b840d55caf69a7 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Fri, 23 Jan 2026 16:22:42 +0100 Subject: executor: add boot arguments page to SYZOS layout Introduce a dedicated page at X86_SYZOS_ADDR_BOOT_ARGS to pass configuration data from the executor to the SYZOS guest. This will allow dynamic adjustments to the guest environment, such as specifying memory region sizes. - Added `MEM_REGION_FLAG_REMAINING` to flag the last memory region, which will consume the rest of the available guest memory. - Defined `struct syzos_boot_args` to pass the memory region layout to the guest. - Modified `syzos_mem_regions`: - Reduced X86_SYZOS_ADDR_VAR_IDT size to 10 pages. - Inserted the new X86_SYZOS_ADDR_BOOT_ARGS region. - Added a final region with MEM_REGION_FLAG_REMAINING. - Updated `setup_vm` to: - Calculate the size of the REMAINING region. - Populate the `syzos_boot_args` structure in the boot args page. - Updated `setup_pg_table` to use the REMAINING flag to map the last region. --- executor/kvm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'executor/kvm.h') diff --git a/executor/kvm.h b/executor/kvm.h index ab5178792..f377887a6 100644 --- a/executor/kvm.h +++ b/executor/kvm.h @@ -47,6 +47,8 @@ #define X86_SYZOS_ADDR_PDP 0x3000 #define X86_SYZOS_ADDR_VAR_IDT 0x25000 #define X86_SYZOS_ADDR_VAR_TSS 0x26000 +// Dedicated page for passing configuration (memory map) to L1. +#define X86_SYZOS_ADDR_BOOT_ARGS 0x2F000 #define X86_SYZOS_ADDR_SMRAM 0x30000 // Write to this page to trigger a page fault and stop KVM_RUN. -- cgit mrf-deployment