From 6157b0280f1054052c9a36acb4fbae22288dc966 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Fri, 14 Nov 2025 17:36:07 +0100 Subject: executor: x86: Prepare memory layout and hardware constants for NV This patch lays the groundwork for nested virtualization by rearranging the KVM guest's memory map. Key changes include: - Introducing a dedicated per-VCPU memory region for L2 VMs. - Updating `executor/kvm.h` with: - Adjusted stack addresses for the L1 guest. - Detailed memory layout macros for L2 VM structures --- executor/common_kvm_amd64.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'executor/common_kvm_amd64.h') diff --git a/executor/common_kvm_amd64.h b/executor/common_kvm_amd64.h index e4c961962..818dc8125 100644 --- a/executor/common_kvm_amd64.h +++ b/executor/common_kvm_amd64.h @@ -238,6 +238,8 @@ static const struct mem_region syzos_mem_regions[] = { {X86_SYZOS_ADDR_SCRATCH_CODE, 1, 0}, // CPU stack. {X86_SYZOS_ADDR_STACK_BOTTOM, 1, 0}, + // Per-VCPU regions for L2 VMs. + {X86_SYZOS_PER_VCPU_REGIONS_BASE, (KVM_MAX_VCPU * X86_SYZOS_L1_VCPU_REGION_SIZE) / KVM_PAGE_SIZE, 0}, // IOAPIC memory. {X86_SYZOS_ADDR_IOAPIC, 1, 0}, }; -- cgit mrf-deployment