diff options
| author | Alexander Potapenko <glider@google.com> | 2025-11-14 17:36:07 +0100 |
|---|---|---|
| committer | Alexander Potapenko <glider@google.com> | 2025-11-19 08:59:40 +0000 |
| commit | 6157b0280f1054052c9a36acb4fbae22288dc966 (patch) | |
| tree | 887bc8b02eba0a6b9603da6dc5a8f7b1ffdd6291 /executor/common_kvm_amd64.h | |
| parent | 82d7b89499c17d61b77fab6a1de8cb90d4c4741c (diff) | |
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
Diffstat (limited to 'executor/common_kvm_amd64.h')
| -rw-r--r-- | executor/common_kvm_amd64.h | 2 |
1 files changed, 2 insertions, 0 deletions
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}, }; |
