From 26ee5237507419c1fa5dea5b2a84a0b7dcce9307 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Tue, 18 Nov 2025 12:57:42 +0100 Subject: executor: sys/linux: implement SYZOS_API_NESTED_VMLAUNCH 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. --- executor/kvm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'executor/kvm.h') diff --git a/executor/kvm.h b/executor/kvm.h index 85d605efe..53ba00888 100644 --- a/executor/kvm.h +++ b/executor/kvm.h @@ -298,6 +298,8 @@ #define VMCS_VM_ENTRY_INTR_INFO_FIELD 0x00004016 #define VMCS_TPR_THRESHOLD 0x0000401c #define VMCS_SECONDARY_VM_EXEC_CONTROL 0x0000401e +#define VMCS_VM_INSTRUCTION_ERROR 0x00004400 +#define VMCS_VM_EXIT_REASON 0x00004402 #define VMCS_VMX_PREEMPTION_TIMER_VALUE 0x0000482e #define VMCS_CR0_GUEST_HOST_MASK 0x00006000 #define VMCS_CR4_GUEST_HOST_MASK 0x00006002 -- cgit mrf-deployment