diff options
| author | Alexander Potapenko <glider@google.com> | 2026-01-23 16:22:42 +0100 |
|---|---|---|
| committer | Alexander Potapenko <glider@google.com> | 2026-01-26 09:30:24 +0000 |
| commit | 6e0dfea112951c25292cd8f108b840d55caf69a7 (patch) | |
| tree | a47961f1b269c440787d28ed018aa17a2d074d71 /executor/kvm.h | |
| parent | ef19d9861dee87bb537df2d765b8b132ab4ec420 (diff) | |
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.
Diffstat (limited to 'executor/kvm.h')
| -rw-r--r-- | executor/kvm.h | 2 |
1 files changed, 2 insertions, 0 deletions
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. |
