Skip to content

Conversation

@ramosian-glider
Copy link
Member


Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md


@ramosian-glider ramosian-glider force-pushed the syzos-nv-series-land branch 2 times, most recently from 2985d41 to a67138a Compare November 18, 2025 11:27
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
Set up the L1 guest's 64-bit Task State Segment (TSS), a prerequisite for VMX/SVM.
Add vendor-specific code to turn on nested virtualization on Intel
and AMD. Also provide get_cpu_vendor() to pick the correct
implementation.
Provide basic setup for registers, page tables, and segments to create
Intel/AMD-based nested virtual machines.
Note that the machines do not get started yet.
Now that we are using volatiles in guest_main(), there is no
particular need to base the numbers on primes (this didn't work well
with Clang anyway).
Instead, group the commands logically and leave some space between the
groups for future updates.
The new command loads an instruction blob into the specified L2 VM.
@ramosian-glider ramosian-glider force-pushed the syzos-nv-series-land branch 2 times, most recently from cc09e1b to b2eda5c Compare November 18, 2025 13:16
Provide a SYZOS API command to launch the L2 VM using the
VMLAUNCH (Intel) or VMRUN (AMD) instruction.

For testing purposes, each L2->L1 exit is followed by a guest_uexit_l2()
returning the exit code to L0. Common exit reasons (like HLT) will be
mapped into a common exit code space (0xe2e20000 | reason), so that
a single test can be used for both Intel and AMD.
Vendor-specific exit codes will be returned using the 0xe2110000 mask
for Intel and 0xe2aa0000 for AMD.
Copy link
Collaborator

@dvyukov dvyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some test seeds would be useful to ensure it's working and keeps working.

@ramosian-glider
Copy link
Member Author

Some test seeds would be useful to ensure it's working and keeps working.

Thanks! I do have some, will send them separately.
We've briefly discussed this with Aleksandr that we probably need syzbot to continuously run certain seeds in the -runtest mode.

@ramosian-glider ramosian-glider added this pull request to the merge queue Nov 19, 2025
Merged via the queue into google:master with commit 26ee523 Nov 19, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants