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


It was useful initially for vendor-agnostic tests, but given that we
have guest_uexit_l2() right before it, we can save an extra L2-L1 exit.
Perhaps this should increase the probability of executing more complex
payloads (fewer KVM_RUN calls to reach the same point in L2 code).
Basic SYZOS test for NV that ensures an L2 VM is correctly created
and executed.
Provide the SYZOS API command to resume L2 execution after a VM exit,
using VMRESUME on Intel and VMRUN on AMD.

For testing purpose, implement basic handling of the INVD instruction:
 - enable INVD interception on AMD (set all bits in VMCB 00Ch);
 - map EXIT_REASON_INVD and VMEXIT_INVD into SYZOS_NESTED_EXIT_REASON_INVD;
 - advance L2 RIP to skip to the next instruction.

While at it, perform minor refactorings of L2 exit reason handling.

sys/linux/test/amd64-syz_kvm_nested_vmresume tests the new command by
executing two instructions, INVD and HLT, in the nested VM.
@ramosian-glider
Copy link
Member Author

PTAL

@ramosian-glider ramosian-glider added this pull request to the merge queue Nov 20, 2025
Merged via the queue into google:master with commit 5c74d2f Nov 20, 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