| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/11/08 04:03 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies documentation and ARM64-specific KVM VGIC (Virtual Generic Interrupt Controller) emulation code under arch/arm64/kvm/vgic/. Because the target architecture is amd64, these code paths are exclusive to another architecture and cannot be compiled or executed on amd64.",
"WorthFuzzing": false
} |
| 1/1 | 2026/11/08 04:03 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 3cb22505df16c052cba04c7c2cc7d97879aec490\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sun Nov 8 04:03:30 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/Documentation/virt/kvm/devices/arm-vgic-v3.rst b/Documentation/virt/kvm/devices/arm-vgic-v3.rst\nindex 5395ee66fc3247..c878d3f728858a 100644\n--- a/Documentation/virt/kvm/devices/arm-vgic-v3.rst\n+++ b/Documentation/virt/kvm/devices/arm-vgic-v3.rst\n@@ -308,6 +308,7 @@ Groups:\n save all LPI pending bits into guest RAM pending tables.\n \n The first kB of the pending table is not altered by this operation.\n+ Neither is the pending table of a redistributor with LPIs disabled.\n \n Errors:\n \ndiff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c\nindex 5ce485485a1178..ede205e05dc048 100644\n--- a/arch/arm64/kvm/vgic/vgic-its.c\n+++ b/arch/arm64/kvm/vgic/vgic-its.c\n@@ -142,7 +142,7 @@ static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid,\n \t * However we only have those structs for mapped IRQs, so we read in\n \t * the respective config data from memory here upon mapping the LPI.\n \t *\n-\t * Should any of these fail, behave as if we couldn't create the LPI\n+\t * Should that fail, behave as if we couldn't create the LPI\n \t * by dropping the refcount and returning the error.\n \t */\n \tret = update_lpi_config(kvm, irq, NULL, false);\n@@ -151,12 +151,6 @@ static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid,\n \t\treturn ERR_PTR(ret);\n \t}\n \n-\tret = vgic_v3_lpi_sync_pending_status(kvm, irq);\n-\tif (ret) {\n-\t\tvgic_put_irq(kvm, irq);\n-\t\treturn ERR_PTR(ret);\n-\t}\n-\n \treturn irq;\n }\n \n@@ -2710,6 +2704,9 @@ static int vgic_its_save_tables_v0(struct vgic_its *its)\n */\n static int vgic_its_restore_tables_v0(struct vgic_its *its)\n {\n+\tstruct kvm *kvm = its-\u003edev-\u003ekvm;\n+\tstruct kvm_vcpu *vcpu;\n+\tunsigned long i;\n \tint ret;\n \n \tret = vgic_its_restore_collection_table(its);\n@@ -2717,9 +2714,25 @@ static int vgic_its_restore_tables_v0(struct vgic_its *its)\n \t\treturn ret;\n \n \tret = vgic_its_restore_device_tables(its);\n-\tif (ret)\n-\t\tvgic_its_free_collection_list(its-\u003edev-\u003ekvm, its);\n-\treturn ret;\n+\tif (ret) {\n+\t\tvgic_its_free_collection_list(kvm, its);\n+\t\treturn ret;\n+\t}\n+\n+\t/* Enabling LPIs read the pending tables before these LPIs existed. */\n+\tkvm_for_each_vcpu(i, vcpu, kvm) {\n+\t\tif (!vgic_lpis_enabled(vcpu))\n+\t\t\tcontinue;\n+\n+\t\tret = its_sync_lpi_pending_table(vcpu);\n+\t\tif (ret) {\n+\t\t\tvgic_its_free_device_list(kvm, its);\n+\t\t\tvgic_its_free_collection_list(kvm, its);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n }\n \n static void vgic_its_commit_v0(struct vgic_its *its)\ndiff --git a/arch/arm64/kvm/vgic/vgic-mmio-v3.c b/arch/arm64/kvm/vgic/vgic-mmio-v3.c\nindex 02292f8e0b4312..93024879ed3b36 100644\n--- a/arch/arm64/kvm/vgic/vgic-mmio-v3.c\n+++ b/arch/arm64/kvm/vgic/vgic-mmio-v3.c\n@@ -298,14 +298,15 @@ static void vgic_mmio_write_v3r_ctlr(struct kvm_vcpu *vcpu,\n \t\t/*\n \t\t * Yes, disabling LPIs is painful, since it can be done from\n \t\t * a *remote* vcpu! So let's not take any chance, and make\n-\t\t * sure that the target vCPU has written their LRs back to the\n+\t\t * sure that every vCPU has written their LRs back to the\n \t\t * irq structures, and release any reference they would have.\n-\t\t * Pause it before its LPIs read as disabled, so that the exit's\n-\t\t * prune leaves them for vgic_flush_pending_lpis() to retire.\n+\t\t * Halt them before the LPIs read as disabled, so that none can\n+\t\t * fold an LPI back from its LRs after vgic_flush_pending_lpis()\n+\t\t * has cleared it.\n \t\t *\n \t\t * If it hurts, don't do it.\n \t\t */\n-\t\tkvm_pause_vcpu(vcpu);\n+\t\tkvm_arm_halt_guest(vcpu-\u003ekvm);\n \n \t\t/*\n \t\t * Don't disable if RWP is set, as there already an\n@@ -315,12 +316,12 @@ static void vgic_mmio_write_v3r_ctlr(struct kvm_vcpu *vcpu,\n \t\t\t\t\t GICR_CTLR_ENABLE_LPIS,\n \t\t\t\t\t GICR_CTLR_RWP);\n \t\tif (ctlr == GICR_CTLR_ENABLE_LPIS) {\n-\t\t\tvgic_flush_pending_lpis(vcpu);\n \t\t\tvgic_its_invalidate_all_caches(vcpu-\u003ekvm);\n+\t\t\tvgic_flush_pending_lpis(vcpu);\n \t\t\tatomic_set_release(\u0026vgic_cpu-\u003ectlr, 0);\n \t\t}\n \n-\t\tkvm_resume_vcpu(vcpu);\n+\t\tkvm_arm_resume_guest(vcpu-\u003ekvm);\n \t} else {\n \t\tctlr = atomic_cmpxchg_acquire(\u0026vgic_cpu-\u003ectlr, 0,\n \t\t\t\t\t GICR_CTLR_ENABLE_LPIS);\ndiff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c\nindex 65b77fb35be37d..35e45479dfa42a 100644\n--- a/arch/arm64/kvm/vgic/vgic-v3.c\n+++ b/arch/arm64/kvm/vgic/vgic-v3.c\n@@ -517,52 +517,6 @@ void vcpu_set_ich_hcr(struct kvm_vcpu *vcpu)\n \t\t\t\t ICH_HCR_EL2_TC);\n }\n \n-int vgic_v3_lpi_sync_pending_status(struct kvm *kvm, struct vgic_irq *irq)\n-{\n-\tstruct kvm_vcpu *vcpu;\n-\tint byte_offset, bit_nr;\n-\tgpa_t pendbase, ptr;\n-\tbool status;\n-\tu8 val;\n-\tint ret;\n-\tunsigned long flags;\n-\n-retry:\n-\tvcpu = irq-\u003etarget_vcpu;\n-\tif (!vcpu)\n-\t\treturn 0;\n-\n-\tpendbase = GICR_PENDBASER_ADDRESS(vcpu-\u003earch.vgic_cpu.pendbaser);\n-\n-\tbyte_offset = irq-\u003eintid / BITS_PER_BYTE;\n-\tbit_nr = irq-\u003eintid % BITS_PER_BYTE;\n-\tptr = pendbase + byte_offset;\n-\n-\tret = kvm_read_guest_lock(kvm, ptr, \u0026val, 1);\n-\tif (ret)\n-\t\treturn ret;\n-\n-\tstatus = val \u0026 (1 \u003c\u003c bit_nr);\n-\n-\traw_spin_lock_irqsave(\u0026irq-\u003eirq_lock, flags);\n-\tif (irq-\u003etarget_vcpu != vcpu) {\n-\t\traw_spin_unlock_irqrestore(\u0026irq-\u003eirq_lock, flags);\n-\t\tgoto retry;\n-\t}\n-\tirq-\u003epending_latch = status;\n-\tvgic_queue_irq_unlock(vcpu-\u003ekvm, irq, flags);\n-\n-\t/* Enabling LPIs resets the latch from the table: leave the bit for it */\n-\tif (status \u0026\u0026 vgic_lpis_enabled(vcpu)) {\n-\t\t/* clear consumed data */\n-\t\tval \u0026= ~(1 \u003c\u003c bit_nr);\n-\t\tret = vgic_write_guest_lock(kvm, ptr, \u0026val, 1);\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\t}\n-\treturn 0;\n-}\n-\n /*\n * The deactivation of the doorbell interrupt will trigger the\n * unmapping of the associated vPE.\n@@ -625,7 +579,9 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)\n \t\t\tcontinue;\n \n \t\tvcpu = irq-\u003etarget_vcpu;\n-\t\tif (!vcpu)\n+\n+\t\t/* While LPIs are disabled, the pending table is the guest's. */\n+\t\tif (!vcpu || !vgic_lpis_enabled(vcpu))\n \t\t\tgoto put_irq;\n \n \t\tpendbase = GICR_PENDBASER_ADDRESS(vcpu-\u003earch.vgic_cpu.pendbaser);\ndiff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c\nindex fe09ada3226253..a99570538f104d 100644\n--- a/arch/arm64/kvm/vgic/vgic.c\n+++ b/arch/arm64/kvm/vgic/vgic.c\n@@ -207,9 +207,10 @@ static void vgic_release_deleted_lpis(struct kvm *kvm)\n void vgic_flush_pending_lpis(struct kvm_vcpu *vcpu)\n {\n \tstruct vgic_cpu *vgic_cpu = \u0026vcpu-\u003earch.vgic_cpu;\n+\tstruct vgic_dist *dist = \u0026vcpu-\u003ekvm-\u003earch.vgic;\n \tstruct vgic_irq *irq, *tmp;\n+\tunsigned long intid, flags;\n \tbool deleted = false;\n-\tunsigned long flags;\n \n \traw_spin_lock_irqsave(\u0026vgic_cpu-\u003eap_list_lock, flags);\n \n@@ -228,6 +229,19 @@ void vgic_flush_pending_lpis(struct kvm_vcpu *vcpu)\n \n \tif (deleted)\n \t\tvgic_release_deleted_lpis(vcpu-\u003ekvm);\n+\n+\t/* Disabled LPIs and LPIs MOVI'd here can be pending off this AP list. */\n+\txa_for_each(\u0026dist-\u003elpi_xa, intid, irq) {\n+\t\tirq = vgic_get_irq(vcpu-\u003ekvm, intid);\n+\t\tif (!irq)\n+\t\t\tcontinue;\n+\n+\t\traw_spin_lock_irqsave(\u0026irq-\u003eirq_lock, flags);\n+\t\tif (irq-\u003etarget_vcpu == vcpu)\n+\t\t\tirq-\u003epending_latch = false;\n+\t\traw_spin_unlock_irqrestore(\u0026irq-\u003eirq_lock, flags);\n+\t\tvgic_put_irq(vcpu-\u003ekvm, irq);\n+\t}\n }\n \n void vgic_irq_set_phys_pending(struct vgic_irq *irq, bool pending)\ndiff --git a/arch/arm64/kvm/vgic/vgic.h b/arch/arm64/kvm/vgic/vgic.h\nindex 71c481ddd98d61..c4407f69f36137 100644\n--- a/arch/arm64/kvm/vgic/vgic.h\n+++ b/arch/arm64/kvm/vgic/vgic.h\n@@ -347,7 +347,6 @@ void vgic_v3_reset(struct kvm_vcpu *vcpu);\n void vgic_v3_enable_cpuif_traps(void);\n int vgic_v3_probe(const struct gic_kvm_info *info);\n int vgic_v3_map_resources(struct kvm *kvm);\n-int vgic_v3_lpi_sync_pending_status(struct kvm *kvm, struct vgic_irq *irq);\n int vgic_v3_save_pending_tables(struct kvm *kvm);\n int vgic_v3_set_redist_base(struct kvm *kvm, u32 index, u64 addr, u32 count);\n int vgic_register_redist_iodev(struct kvm_vcpu *vcpu);\n"
} |
| 2/1 | 2026/11/08 04:03 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies documentation and ARM64-specific KVM VGIC (Virtual Generic Interrupt Controller) emulation code under arch/arm64/kvm/vgic/. Because the target architecture is amd64, these code paths are exclusive to another architecture and cannot be compiled or executed on amd64.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any '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: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 3cb22505df16c052cba04c7c2cc7d97879aec490
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Nov 8 04:03:30 2026 +0000
syz-cluster: applied patch under review
diff --git a/Documentation/virt/kvm/devices/arm-vgic-v3.rst b/Documentation/virt/kvm/devices/arm-vgic-v3.rst
index 5395ee66fc3247..c878d3f728858a 100644
--- a/Documentation/virt/kvm/devices/arm-vgic-v3.rst
+++ b/Documentation/virt/kvm/devices/arm-vgic-v3.rst
@@ -308,6 +308,7 @@ Groups:
save all LPI pending bits into guest RAM pending tables.
The first kB of the pending table is not altered by this operation.
+ Neither is the pending table of a redistributor with LPIs disabled.
Errors:
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 5ce485485a1178..ede205e05dc048 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -142,7 +142,7 @@ static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid,
* However we only have those structs for mapped IRQs, so we read in
* the respective config data from memory here upon mapping the LPI.
*
- * Should any of these fail, behave as if we couldn't create the LPI
+ * Should that fail, behave as if we couldn't create the LPI
* by dropping the refcount and returning the error.
*/
ret = update_lpi_config(kvm, irq, NULL, false);
@@ -151,12 +151,6 @@ static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid,
return ERR_PTR(ret);
}
- ret = vgic_v3_lpi_sync_pending_status(kvm, irq);
- if (ret) {
- vgic_put_irq(kvm, irq);
- return ERR_PTR(ret);
- }
-
return irq;
}
@@ -2710,6 +2704,9 @@ static int vgic_its_save_tables_v0(struct vgic_its *its)
*/
static int vgic_its_restore_tables_v0(struct vgic_its *its)
{
+ struct kvm *kvm = its->dev->kvm;
+ struct kvm_vcpu *vcpu;
+ unsigned long i;
int ret;
ret = vgic_its_restore_collection_table(its);
@@ -2717,9 +2714,25 @@ static int vgic_its_restore_tables_v0(struct vgic_its *its)
return ret;
ret = vgic_its_restore_device_tables(its);
- if (ret)
- vgic_its_free_collection_list(its->dev->kvm, its);
- return ret;
+ if (ret) {
+ vgic_its_free_collection_list(kvm, its);
+ return ret;
+ }
+
+ /* Enabling LPIs read the pending tables before these LPIs existed. */
+ kvm_for_each_vcpu(i, vcpu, kvm) {
+ if (!vgic_lpis_enabled(vcpu))
+ continue;
+
+ ret = its_sync_lpi_pending_table(vcpu);
+ if (ret) {
+ vgic_its_free_device_list(kvm, its);
+ vgic_its_free_collection_list(kvm, its);
+ return ret;
+ }
+ }
+
+ return 0;
}
static void vgic_its_commit_v0(struct vgic_its *its)
diff --git a/arch/arm64/kvm/vgic/vgic-mmio-v3.c b/arch/arm64/kvm/vgic/vgic-mmio-v3.c
index 02292f8e0b4312..93024879ed3b36 100644
--- a/arch/arm64/kvm/vgic/vgic-mmio-v3.c
+++ b/arch/arm64/kvm/vgic/vgic-mmio-v3.c
@@ -298,14 +298,15 @@ static void vgic_mmio_write_v3r_ctlr(struct kvm_vcpu *vcpu,
/*
* Yes, disabling LPIs is painful, since it can be done from
* a *remote* vcpu! So let's not take any chance, and make
- * sure that the target vCPU has written their LRs back to the
+ * sure that every vCPU has written their LRs back to the
* irq structures, and release any reference they would have.
- * Pause it before its LPIs read as disabled, so that the exit's
- * prune leaves them for vgic_flush_pending_lpis() to retire.
+ * Halt them before the LPIs read as disabled, so that none can
+ * fold an LPI back from its LRs after vgic_flush_pending_lpis()
+ * has cleared it.
*
* If it hurts, don't do it.
*/
- kvm_pause_vcpu(vcpu);
+ kvm_arm_halt_guest(vcpu->kvm);
/*
* Don't disable if RWP is set, as there already an
@@ -315,12 +316,12 @@ static void vgic_mmio_write_v3r_ctlr(struct kvm_vcpu *vcpu,
GICR_CTLR_ENABLE_LPIS,
GICR_CTLR_RWP);
if (ctlr == GICR_CTLR_ENABLE_LPIS) {
- vgic_flush_pending_lpis(vcpu);
vgic_its_invalidate_all_caches(vcpu->kvm);
+ vgic_flush_pending_lpis(vcpu);
atomic_set_release(&vgic_cpu->ctlr, 0);
}
- kvm_resume_vcpu(vcpu);
+ kvm_arm_resume_guest(vcpu->kvm);
} else {
ctlr = atomic_cmpxchg_acquire(&vgic_cpu->ctlr, 0,
GICR_CTLR_ENABLE_LPIS);
diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c
index 65b77fb35be37d..35e45479dfa42a 100644
--- a/arch/arm64/kvm/vgic/vgic-v3.c
+++ b/arch/arm64/kvm/vgic/vgic-v3.c
@@ -517,52 +517,6 @@ void vcpu_set_ich_hcr(struct kvm_vcpu *vcpu)
ICH_HCR_EL2_TC);
}
-int vgic_v3_lpi_sync_pending_status(struct kvm *kvm, struct vgic_irq *irq)
-{
- struct kvm_vcpu *vcpu;
- int byte_offset, bit_nr;
- gpa_t pendbase, ptr;
- bool status;
- u8 val;
- int ret;
- unsigned long flags;
-
-retry:
- vcpu = irq->target_vcpu;
- if (!vcpu)
- return 0;
-
- pendbase = GICR_PENDBASER_ADDRESS(vcpu->arch.vgic_cpu.pendbaser);
-
- byte_offset = irq->intid / BITS_PER_BYTE;
- bit_nr = irq->intid % BITS_PER_BYTE;
- ptr = pendbase + byte_offset;
-
- ret = kvm_read_guest_lock(kvm, ptr, &val, 1);
- if (ret)
- return ret;
-
- status = val & (1 << bit_nr);
-
- raw_spin_lock_irqsave(&irq->irq_lock, flags);
- if (irq->target_vcpu != vcpu) {
- raw_spin_unlock_irqrestore(&irq->irq_lock, flags);
- goto retry;
- }
- irq->pending_latch = status;
- vgic_queue_irq_unlock(vcpu->kvm, irq, flags);
-
- /* Enabling LPIs resets the latch from the table: leave the bit for it */
- if (status && vgic_lpis_enabled(vcpu)) {
- /* clear consumed data */
- val &= ~(1 << bit_nr);
- ret = vgic_write_guest_lock(kvm, ptr, &val, 1);
- if (ret)
- return ret;
- }
- return 0;
-}
-
/*
* The deactivation of the doorbell interrupt will trigger the
* unmapping of the associated vPE.
@@ -625,7 +579,9 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
continue;
vcpu = irq->target_vcpu;
- if (!vcpu)
+
+ /* While LPIs are disabled, the pending table is the guest's. */
+ if (!vcpu || !vgic_lpis_enabled(vcpu))
goto put_irq;
pendbase = GICR_PENDBASER_ADDRESS(vcpu->arch.vgic_cpu.pendbaser);
diff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c
index fe09ada3226253..a99570538f104d 100644
--- a/arch/arm64/kvm/vgic/vgic.c
+++ b/arch/arm64/kvm/vgic/vgic.c
@@ -207,9 +207,10 @@ static void vgic_release_deleted_lpis(struct kvm *kvm)
void vgic_flush_pending_lpis(struct kvm_vcpu *vcpu)
{
struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
+ struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
struct vgic_irq *irq, *tmp;
+ unsigned long intid, flags;
bool deleted = false;
- unsigned long flags;
raw_spin_lock_irqsave(&vgic_cpu->ap_list_lock, flags);
@@ -228,6 +229,19 @@ void vgic_flush_pending_lpis(struct kvm_vcpu *vcpu)
if (deleted)
vgic_release_deleted_lpis(vcpu->kvm);
+
+ /* Disabled LPIs and LPIs MOVI'd here can be pending off this AP list. */
+ xa_for_each(&dist->lpi_xa, intid, irq) {
+ irq = vgic_get_irq(vcpu->kvm, intid);
+ if (!irq)
+ continue;
+
+ raw_spin_lock_irqsave(&irq->irq_lock, flags);
+ if (irq->target_vcpu == vcpu)
+ irq->pending_latch = false;
+ raw_spin_unlock_irqrestore(&irq->irq_lock, flags);
+ vgic_put_irq(vcpu->kvm, irq);
+ }
}
void vgic_irq_set_phys_pending(struct vgic_irq *irq, bool pending)
diff --git a/arch/arm64/kvm/vgic/vgic.h b/arch/arm64/kvm/vgic/vgic.h
index 71c481ddd98d61..c4407f69f36137 100644
--- a/arch/arm64/kvm/vgic/vgic.h
+++ b/arch/arm64/kvm/vgic/vgic.h
@@ -347,7 +347,6 @@ void vgic_v3_reset(struct kvm_vcpu *vcpu);
void vgic_v3_enable_cpuif_traps(void);
int vgic_v3_probe(const struct gic_kvm_info *info);
int vgic_v3_map_resources(struct kvm *kvm);
-int vgic_v3_lpi_sync_pending_status(struct kvm *kvm, struct vgic_irq *irq);
int vgic_v3_save_pending_tables(struct kvm *kvm);
int vgic_v3_set_redist_base(struct kvm *kvm, u32 index, u64 addr, u32 count);
int vgic_register_redist_iodev(struct kvm_vcpu *vcpu);
|
| 3/2 | 2026/11/08 04:03 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6343 output: 39 thoughts: 866 Thoughts: **Evaluating the Patch Series for Fuzzing with Syzkaller** Okay, so I need to assess this patch series for fuzzing potential with syzkaller. First things first, I need to know the target architecture. Ah, "Target architecture: amd64," got it. That's key. Now, let's look at the actual diff. * `diff --git a/Documentation/virt/kvm/devices/arm-vgic-v3.rst b/Documentation/virt/kvm/devices/arm-vgic-v3.rst` * `diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c` * `diff --git a/arch/arm64/kvm/vgic/vgic-mmio-v3.c b/arch/arm64/kvm/vgic/vgic-mmio-v3.c` * `diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c` * `diff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c` * `diff --git a/arch/arm64/kvm/vgic/vgic.h b/arch/arm64/kvm/vgic/vgic.h` Alright, all the modified files are under `Documentation/` and `arch/arm64/kvm/vgic/`. Hmm, something's not quite right... the target is amd64, but this is ARM64 specific. Let's make sure I understand the relevant part of the instructions: "Unreachable execution paths... Code paths exclusive to architectures other than the target architecture." Wait a minute, can `arch/arm64/kvm/vgic/*` *even* be compiled or executed on amd64? No, that's impossible. `arch/arm64` is exclusively compiled for ARM64 (aarch64). On amd64, KVM is under `arch/x86/kvm/`. This `arch/arm64/` code is not compiled or used on amd64 at all. Let's double-check the instructions to be absolutely certain: "Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories... Structurally unreachable hardware... Unreachable execution paths... Code paths exclusive to architectures other than the target architecture." Got it, that confirms my initial assessment. Okay, let's verify. Does any part of this patch touch any common code or anything outside of `arch/arm64`? Let's go through the diff again: `Documentation/virt/kvm/devices/arm-vgic-v3.rst`, and everything in `arch/arm64/kvm/vgic/`. Documentation is non-kernel and non-executable, and `arch/arm64` is clearly exclusive to the arm64 architecture, while we're targeting amd64. To be absolutely sure, let me double-check the commit using `git log` or a similar tool to ensure there aren't any other files modified in this commit, just in case. Let me run a tool to inspect the commit to be sure. Based on this analysis, I'm confident that this patch series is not suitable for fuzzing with the amd64 syzkaller configuration. |
| 4/2 | 2026/11/08 04:04 | tool | grepper |
0mArgs:{
"Expression": "vgic_flush_pending_lpis",
"PathPrefixes": [
"arch/arm64/kvm/"
]
}Results: {
"Output": "arch/arm64/kvm/vgic/vgic-init.c=599=static void __kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu)\n--\narch/arm64/kvm/vgic/vgic-init.c-606-\t */\narch/arm64/kvm/vgic/vgic-init.c:607:\tvgic_flush_pending_lpis(vcpu);\narch/arm64/kvm/vgic/vgic-init.c-608-\n--\narch/arm64/kvm/vgic/vgic-mmio-v3.c=287=static void vgic_mmio_write_v3r_ctlr(struct kvm_vcpu *vcpu,\n--\narch/arm64/kvm/vgic/vgic-mmio-v3.c-303-\t\t * Halt them before the LPIs read as disabled, so that none can\narch/arm64/kvm/vgic/vgic-mmio-v3.c:304:\t\t * fold an LPI back from its LRs after vgic_flush_pending_lpis()\narch/arm64/kvm/vgic/vgic-mmio-v3.c-305-\t\t * has cleared it.\n--\narch/arm64/kvm/vgic/vgic-mmio-v3.c-319-\t\t\tvgic_its_invalidate_all_caches(vcpu-\u003ekvm);\narch/arm64/kvm/vgic/vgic-mmio-v3.c:320:\t\t\tvgic_flush_pending_lpis(vcpu);\narch/arm64/kvm/vgic/vgic-mmio-v3.c-321-\t\t\tatomic_set_release(\u0026vgic_cpu-\u003ectlr, 0);\n--\narch/arm64/kvm/vgic/vgic.c=191=static void vgic_release_deleted_lpis(struct kvm *kvm)\n--\narch/arm64/kvm/vgic/vgic.c-206-\narch/arm64/kvm/vgic/vgic.c:207:void vgic_flush_pending_lpis(struct kvm_vcpu *vcpu)\narch/arm64/kvm/vgic/vgic.c-208-{\n--\narch/arm64/kvm/vgic/vgic.h=361=void vgic_enable_lpis(struct kvm_vcpu *vcpu);\narch/arm64/kvm/vgic/vgic.h:362:void vgic_flush_pending_lpis(struct kvm_vcpu *vcpu);\narch/arm64/kvm/vgic/vgic.h-363-int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi);\n"
} |
| 5/2 | 2026/11/08 04:04 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8803 output: 34 thoughts: 30 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Targeted Code Review: ARM64 KVM Scope** Right, before diving too deep, I need to make absolutely sure any changes I'm looking at are *specifically* relevant to the ARM64 KVM implementation. No point in wasting time on something that's broadly applicable or a generic KVM issue. So, my first move is to explicitly check the `arch/arm64/kvm/Kconfig` file, or perhaps a similarly targeted configuration file within the ARM64 KVM directory. I'm looking for either direct modifications to, or dependencies introduced in the configuration that confirm this is a narrowly-scoped change. Essentially, I'm verifying the changes I'm seeing are confined to the ARM64 KVM space. This helps me frame my thinking and understand the direct impact. |
| 6/2 | 2026/11/08 04:04 | tool | grepper |
0mArgs:{
"Expression": "KVM",
"PathPrefixes": [
"arch/arm64/kvm/Kconfig"
]
}Results: {
"Output": "arch/arm64/kvm/Kconfig-2-#\narch/arm64/kvm/Kconfig:3:# KVM configuration\narch/arm64/kvm/Kconfig-4-#\n--\narch/arm64/kvm/Kconfig=18=if VIRTUALIZATION\narch/arm64/kvm/Kconfig-19-\narch/arm64/kvm/Kconfig:20:menuconfig KVM\narch/arm64/kvm/Kconfig:21:\tbool \"Kernel-based Virtual Machine (KVM) support\"\narch/arm64/kvm/Kconfig:22:\tselect KVM_COMMON\narch/arm64/kvm/Kconfig:23:\tselect KVM_GENERIC_HARDWARE_ENABLING\narch/arm64/kvm/Kconfig:24:\tselect HAVE_KVM_CPU_RELAX_INTERCEPT\narch/arm64/kvm/Kconfig:25:\tselect KVM_GENERIC_DIRTYLOG_READ_PROTECT\narch/arm64/kvm/Kconfig-26-\tselect VIRT_XFER_TO_GUEST_WORK\narch/arm64/kvm/Kconfig:27:\tselect KVM_VFIO\narch/arm64/kvm/Kconfig:28:\tselect HAVE_KVM_DIRTY_RING_ACQ_REL\narch/arm64/kvm/Kconfig:29:\tselect NEED_KVM_DIRTY_RING_WITH_BITMAP\narch/arm64/kvm/Kconfig:30:\tselect HAVE_KVM_IRQCHIP\narch/arm64/kvm/Kconfig:31:\tselect HAVE_KVM_IRQ_ROUTING\narch/arm64/kvm/Kconfig:32:\tselect HAVE_KVM_IRQ_BYPASS\narch/arm64/kvm/Kconfig-33-\tselect SCHED_INFO\narch/arm64/kvm/Kconfig-34-\tselect GUEST_PERF_EVENTS if PERF_EVENTS\narch/arm64/kvm/Kconfig:35:\tselect KVM_GUEST_MEMFD\narch/arm64/kvm/Kconfig:36:\tselect KVM_GENERIC_PRE_FAULT_MEMORY\narch/arm64/kvm/Kconfig-37-\thelp\n--\narch/arm64/kvm/Kconfig-41-\narch/arm64/kvm/Kconfig:42:if KVM\narch/arm64/kvm/Kconfig-43-\n--\narch/arm64/kvm/Kconfig=60=config NVHE_EL2_DEBUG\n--\narch/arm64/kvm/Kconfig-63-\thelp\narch/arm64/kvm/Kconfig:64:\t Say Y here to enable the debug mode for the non-VHE KVM EL2 object.\narch/arm64/kvm/Kconfig-65-\t Failure reports will BUG() in the hypervisor. This is intended for\n--\narch/arm64/kvm/Kconfig=72=config NVHE_EL2_TRACING\n--\narch/arm64/kvm/Kconfig-77-\narch/arm64/kvm/Kconfig:78:config PKVM_DISABLE_STAGE2_ON_PANIC\narch/arm64/kvm/Kconfig-79-\tbool \"Disable the host stage-2 on panic\"\n--\narch/arm64/kvm/Kconfig-88-\narch/arm64/kvm/Kconfig:89:config PKVM_STACKTRACE\narch/arm64/kvm/Kconfig:90:\tbool \"Protected KVM hypervisor stacktraces\"\narch/arm64/kvm/Kconfig:91:\tdepends on PKVM_DISABLE_STAGE2_ON_PANIC\narch/arm64/kvm/Kconfig-92-\tdefault y\narch/arm64/kvm/Kconfig-93-\thelp\narch/arm64/kvm/Kconfig:94:\t Say Y here to enable pKVM hypervisor stacktraces on hyp_panic()\narch/arm64/kvm/Kconfig-95-\narch/arm64/kvm/Kconfig-96-\t If using protected nVHE mode, but cannot afford the associated\narch/arm64/kvm/Kconfig:97:\t memory cost (less than 0.75 page per CPU) of pKVM stacktraces,\narch/arm64/kvm/Kconfig-98-\t say N.\narch/arm64/kvm/Kconfig-99-\narch/arm64/kvm/Kconfig:100:\t If unsure, or not using protected nVHE (pKVM), say N.\narch/arm64/kvm/Kconfig-101-\narch/arm64/kvm/Kconfig=102=endif # NVHE_EL2_DEBUG\narch/arm64/kvm/Kconfig:103:endif # KVM\narch/arm64/kvm/Kconfig-104-endif # VIRTUALIZATION\n"
} |
| 7/2 | 2026/11/08 04:04 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10328 output: 94 thoughts: 485 Thoughts: **My Assessment: No Fuzzing Needed** Okay, so the architecture this patch is targeting is amd64. Let's break down where the changes are: `Documentation/virt/kvm/devices/arm-vgic-v3.rst`, and then a slew of files within `arch/arm64/kvm/vgic/`. Aha, that last one is the key. Everything's tucked away under `arch/arm64/kvm/vgic/`, which, as we know, is ARM64-specific code for the KVM Virtual Generic Interrupt Controller (GICv3) emulation. Classic. Now, according to the criteria for `WorthFuzzing`, the patch doesn't warrant fuzzing if it meets one of a few categories. Specifically, I'm focusing on "Code paths exclusive to architectures other than the target architecture." Since the target is amd64 and all the changes are in `Documentation/` (documentation, irrelevant for this) and `arch/arm64/` (ARM64 only), these paths are completely inaccessible on amd64. They're unbuildable, and therefore unreachable. This immediately screams "no fuzzing required." `WorthFuzzing` is unequivocally `false` here. `FocusSymbols`? Empty. `EnableConfigs`? Empty. No debate. Let's quickly re-confirm the parameters for `set-results`: * `EnableConfigs`: `[]` (yup) * `FocusSymbols`: `[]` (checks out) * `Reasoning`: "The patch modifies ARM64 KVM VGIC (Virtual Generic Interrupt Controller) emulation code under arch/arm64/kvm/vgic/ and its documentation. These code paths are exclusive to the arm64 architecture and are completely unreachable and unbuildable on the target architecture (amd64)." (Perfect, that nails it) * `WorthFuzzing`: `false` (Exactly) Alright, time to call `set-results` and move on. |
| 8/2 | 2026/11/08 04:04 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies documentation and ARM64-specific KVM VGIC (Virtual Generic Interrupt Controller) emulation code under arch/arm64/kvm/vgic/. Because the target architecture is amd64, these code paths are exclusive to another architecture and cannot be compiled or executed on amd64.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies documentation and ARM64-specific KVM VGIC (Virtual Generic Interrupt Controller) emulation code under arch/arm64/kvm/vgic/. Because the target architecture is amd64, these code paths are exclusive to another architecture and cannot be compiled or executed on amd64.",
"WorthFuzzing": false
} |
| 9/1 | 2026/11/08 04:04 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|