| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/11 02:38 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only adds and modifies KVM selftests in tools/testing/selftests/kvm/. It does not make any functional changes to the kernel code itself.",
"WorthFuzzing": false
} |
| 1/1 | 2026/07/11 02:38 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 5d6d1eb96f3c28e1779c05188f6f8d3e636e2872\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Jul 11 02:37:58 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm\nindex d28a057fa6c2d6..ad74d0b986945d 100644\n--- a/tools/testing/selftests/kvm/Makefile.kvm\n+++ b/tools/testing/selftests/kvm/Makefile.kvm\n@@ -66,6 +66,7 @@ TEST_GEN_PROGS_COMMON += kvm_page_table_test\n TEST_GEN_PROGS_COMMON += set_memory_region_test\n TEST_GEN_PROGS_COMMON += memslot_modification_stress_test\n TEST_GEN_PROGS_COMMON += memslot_perf_test\n+TEST_GEN_PROGS_COMMON += vm_types_test\n \n # Compiled test targets\n TEST_GEN_PROGS_x86 = $(TEST_GEN_PROGS_COMMON)\ndiff --git a/tools/testing/selftests/kvm/vm_types_test.c b/tools/testing/selftests/kvm/vm_types_test.c\nnew file mode 100644\nindex 00000000000000..e8ef3b018f6c92\n--- /dev/null\n+++ b/tools/testing/selftests/kvm/vm_types_test.c\n@@ -0,0 +1,50 @@\n+// SPDX-License-Identifier: GPL-2.0-only\n+/*\n+ * Verify that KVM_CREATE_VM accepts exactly the VM types enumerated by\n+ * KVM_CAP_VM_TYPES, and rejects every other type with -EINVAL.\n+ */\n+#include \u003cerrno.h\u003e\n+#include \u003cstdbool.h\u003e\n+#include \u003cunistd.h\u003e\n+\n+#include \u003clinux/kvm.h\u003e\n+\n+#include \"kvm_util.h\"\n+#include \"test_util.h\"\n+\n+int main(void)\n+{\n+\tunsigned int supported_types;\n+\tunsigned long type;\n+\tint kvm_fd, fd;\n+\n+\tTEST_REQUIRE(kvm_has_cap(KVM_CAP_VM_TYPES));\n+\n+\tkvm_fd = open_kvm_dev_path_or_exit();\n+\tsupported_types = kvm_check_cap(KVM_CAP_VM_TYPES);\n+\tpr_info(\"KVM_CAP_VM_TYPES: 0x%x\\n\", supported_types);\n+\n+\t/*\n+\t * KVM_CAP_VM_TYPES is a u32 bitmap, so only types 0..31 can ever be\n+\t * advertised. Walk past that range as well to confirm that any\n+\t * out-of-range type is rejected rather than silently accepted.\n+\t */\n+\tfor (type = 0; type \u003c 64; type++) {\n+\t\tbool supported = type \u003c 32 \u0026\u0026 (supported_types \u0026 (1U \u003c\u003c type));\n+\n+\t\tfd = __kvm_ioctl(kvm_fd, KVM_CREATE_VM, (void *)type);\n+\n+\t\tif (supported) {\n+\t\t\tTEST_ASSERT(fd \u003e= 0,\n+\t\t\t\t \"KVM_CREATE_VM(%lu) should succeed, KVM_CAP_VM_TYPES=0x%x\",\n+\t\t\t\t type, supported_types);\n+\t\t\tclose(fd);\n+\t\t} else {\n+\t\t\tTEST_ASSERT(fd \u003c 0 \u0026\u0026 errno == EINVAL,\n+\t\t\t\t \"KVM_CREATE_VM(%lu) should fail with EINVAL, KVM_CAP_VM_TYPES=0x%x\",\n+\t\t\t\t type, supported_types);\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\ndiff --git a/tools/testing/selftests/kvm/x86/sev_init2_tests.c b/tools/testing/selftests/kvm/x86/sev_init2_tests.c\nindex 8db88c355f1654..d4227dc922abe5 100644\n--- a/tools/testing/selftests/kvm/x86/sev_init2_tests.c\n+++ b/tools/testing/selftests/kvm/x86/sev_init2_tests.c\n@@ -77,10 +77,6 @@ void test_vm_types(void)\n {\n \ttest_init2(KVM_X86_SEV_VM, \u0026(struct kvm_sev_init){});\n \n-\t/*\n-\t * TODO: check that unsupported types cannot be created. Probably\n-\t * a separate selftest.\n-\t */\n \tif (have_sev_es)\n \t\ttest_init2(KVM_X86_SEV_ES_VM, \u0026(struct kvm_sev_init){});\n \n"
} |
| 2/1 | 2026/07/11 02:38 | agent | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only adds and modifies KVM selftests in tools/testing/selftests/kvm/. It does not make any functional changes to the kernel code itself.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Do not list too generic configs (we already have them enabled). Only list those that specifically cover the modified code. List them in the EnableConfigs output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4"). Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt: For your convenience, here is the diff of the changes:
commit 5d6d1eb96f3c28e1779c05188f6f8d3e636e2872
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Jul 11 02:37:58 2026 +0000
syz-cluster: applied patch under review
diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
index d28a057fa6c2d6..ad74d0b986945d 100644
--- a/tools/testing/selftests/kvm/Makefile.kvm
+++ b/tools/testing/selftests/kvm/Makefile.kvm
@@ -66,6 +66,7 @@ TEST_GEN_PROGS_COMMON += kvm_page_table_test
TEST_GEN_PROGS_COMMON += set_memory_region_test
TEST_GEN_PROGS_COMMON += memslot_modification_stress_test
TEST_GEN_PROGS_COMMON += memslot_perf_test
+TEST_GEN_PROGS_COMMON += vm_types_test
# Compiled test targets
TEST_GEN_PROGS_x86 = $(TEST_GEN_PROGS_COMMON)
diff --git a/tools/testing/selftests/kvm/vm_types_test.c b/tools/testing/selftests/kvm/vm_types_test.c
new file mode 100644
index 00000000000000..e8ef3b018f6c92
--- /dev/null
+++ b/tools/testing/selftests/kvm/vm_types_test.c
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Verify that KVM_CREATE_VM accepts exactly the VM types enumerated by
+ * KVM_CAP_VM_TYPES, and rejects every other type with -EINVAL.
+ */
+#include <errno.h>
+#include <stdbool.h>
+#include <unistd.h>
+
+#include <linux/kvm.h>
+
+#include "kvm_util.h"
+#include "test_util.h"
+
+int main(void)
+{
+ unsigned int supported_types;
+ unsigned long type;
+ int kvm_fd, fd;
+
+ TEST_REQUIRE(kvm_has_cap(KVM_CAP_VM_TYPES));
+
+ kvm_fd = open_kvm_dev_path_or_exit();
+ supported_types = kvm_check_cap(KVM_CAP_VM_TYPES);
+ pr_info("KVM_CAP_VM_TYPES: 0x%x\n", supported_types);
+
+ /*
+ * KVM_CAP_VM_TYPES is a u32 bitmap, so only types 0..31 can ever be
+ * advertised. Walk past that range as well to confirm that any
+ * out-of-range type is rejected rather than silently accepted.
+ */
+ for (type = 0; type < 64; type++) {
+ bool supported = type < 32 && (supported_types & (1U << type));
+
+ fd = __kvm_ioctl(kvm_fd, KVM_CREATE_VM, (void *)type);
+
+ if (supported) {
+ TEST_ASSERT(fd >= 0,
+ "KVM_CREATE_VM(%lu) should succeed, KVM_CAP_VM_TYPES=0x%x",
+ type, supported_types);
+ close(fd);
+ } else {
+ TEST_ASSERT(fd < 0 && errno == EINVAL,
+ "KVM_CREATE_VM(%lu) should fail with EINVAL, KVM_CAP_VM_TYPES=0x%x",
+ type, supported_types);
+ }
+ }
+
+ return 0;
+}
diff --git a/tools/testing/selftests/kvm/x86/sev_init2_tests.c b/tools/testing/selftests/kvm/x86/sev_init2_tests.c
index 8db88c355f1654..d4227dc922abe5 100644
--- a/tools/testing/selftests/kvm/x86/sev_init2_tests.c
+++ b/tools/testing/selftests/kvm/x86/sev_init2_tests.c
@@ -77,10 +77,6 @@ void test_vm_types(void)
{
test_init2(KVM_X86_SEV_VM, &(struct kvm_sev_init){});
- /*
- * TODO: check that unsupported types cannot be created. Probably
- * a separate selftest.
- */
if (have_sev_es)
test_init2(KVM_X86_SEV_ES_VM, &(struct kvm_sev_init){});
|
| 3/2 | 2026/07/11 02:38 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 2831 output: 67 thoughts: 99 Thoughts: Here's my assessment of this patch: **Analyzing the KVM Selftest Patch** Okay, so this patch introduces a new test file, `vm_types_test.c`, and tweaks the existing `Makefile.kvm` and `sev_init2_tests.c` within the KVM self-tests directory. No changes to the kernel itself, just the testing infrastructure. Hmm, it seems to be adding new tests or refining existing ones for KVM functionalities. Given that this is entirely within the testing framework and doesn't touch any of the core kernel code, the "WorthFuzzing" flag should definitely be set to `false`. These changes are all about improving the test coverage and ensuring that the KVM functionality behaves correctly under various conditions, which is good but not something that requires fuzzing the core kernel code. |
| 4/2 | 2026/07/11 02:38 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch only adds and modifies KVM selftests in tools/testing/selftests/kvm/. It does not make any functional changes to the kernel code itself.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only adds and modifies KVM selftests in tools/testing/selftests/kvm/. It does not make any functional changes to the kernel code itself.",
"WorthFuzzing": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|