From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A6883E7BB0 for ; Thu, 25 Jun 2026 15:23:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782401024; cv=none; b=ZULlUfyNO1mbzt3ZsPKWJuE95GqRs6H60bLaM26XPobpdsw9PQ2opsU0DxO4w4Bm6fa+ba9EZbWssEkiG3FFUh6oJbliVyJ/D1Ay3sJTO53ZBTQKGG0ZOsyMCzUrP19QNiQn8663rZSwoHVWx2CmA6ZdKNmMZiMtKID0TAZEPO8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782401024; c=relaxed/simple; bh=68wQ/N57413y5fmpjsLjrjzh99rTtNfsAvpDaKmHlMo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=NeAxKbstbMHHagfvw3ZThKlWKmAc7KYSJyp8C2cJk4/zNp31Gc/q5cgdTPASQjhyfnM/qkqgwgzhIdxe+VW+G1GMClnMI1SfuG21beDhDBs/e8MESvOISJAnenCV3wBC6hNG/WYNkeghEBOytoPdl6iz/vgtkfnNakGFM7teJ8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=FCoMgod8; arc=none smtp.client-ip=209.85.210.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="FCoMgod8" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-8423f1fe39eso2793942b3a.1 for ; Thu, 25 Jun 2026 08:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782401022; x=1783005822; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=B4W/9MmETYpefFGvxRMmkYZZV+m52dEAcM8p8mpMdiU=; b=FCoMgod8Ll+kdHa5Dr5EMXa229odtnhdaKh5ZjEF/dxEYAnfBFqFVYfu1O3NEEcmsN UcexiJThyzJGLsbLx8AseGpxLy8Jqmn4CyoLI1Nkj772Wm5eJO0qVueWuaqZN6e11N+n vt9V9BuKO+Eyi71OyUn7cWjUvBF9uGdYqrGNiSDtg06y5gI/bVkK1L6SMyQxlHpQQJ+e WjWtm7r6rA2Ps5jRfwB7o6Yk3PdEKjJKR0T3no19aTTtqw0UDDhAb1+0cvaXtUuWCYyR oflw1HCGhmg/WRpgYZxpbZUprOZSeDoM1v3yuoSh5azOQJYtNneT8n5gunzAnrTXtBYw Fv0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782401022; x=1783005822; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=B4W/9MmETYpefFGvxRMmkYZZV+m52dEAcM8p8mpMdiU=; b=dt9AGxIPKNG9dFhYkrLCzHD6ByTA4VrX5x+pW26NjrfUVB8QzQRk6frwcFXH6fmSdU wGIdvNUb0r1Nffu2rAo1il29AAPkIwqK1DGmbgbiTS4nXSAQla0yz5mOfnqYqrgHThr9 F4fJXZo5lT83IT0czoBGJwtLuXz52R5KHLfzkpVhQe+6M8viwwDZnbnRpCBpZAfofony LqiKXomK7NhSDEDHH7Tb1huwC21t0qjtmzyx4eqAI0ZkfK6ouEVYQFOwEZbCT4kvQhUu pu0BQ6BptWHeUDXCP742QdKJ5Vt81P1md6oMuVxdkWIpahbB0F0IpZ62MnToHNTYWpVe +46w== X-Forwarded-Encrypted: i=1; AHgh+RoxtOpFpVp40Z1EZjt5akKQDsg1TBmaHeC1/5E0OuYw3Ue4Dr5/9PxgNEY6M77MjI/KQQPWDdqR3WhRImU=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3rz3IlzjGXobWNcnko3LgErz/qQlZ/eVFSEGeIfSAK4IEoJ7j cByUYze4e4Jn3kmqZN9fPuosLui3ob4nrmad/FsvdhEB9eebv6GTLwg6RuiHsscuflPFX/LtC+B DrgATRQ== X-Received: from pfqy5.prod.google.com ([2002:aa7:9e05:0:b0:845:bd02:c4cb]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:2d81:b0:842:7476:2373 with SMTP id d2e1a72fcca58-845b3bc5d15mr3671613b3a.44.1782401021410; Thu, 25 Jun 2026 08:23:41 -0700 (PDT) Date: Thu, 25 Jun 2026 08:23:40 -0700 In-Reply-To: <6a360fdf.871e809a.2d6dda.0000.GAE@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <6a360fdf.871e809a.2d6dda.0000.GAE@google.com> Message-ID: Subject: Re: [syzbot] [kvm-x86?] WARNING in vcpu_run (2) From: Sean Christopherson To: syzbot Cc: bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, pbonzini@redhat.com, syzkaller-bugs@googlegroups.com, tglx@kernel.org, x86@kernel.org Content-Type: text/plain; charset="us-ascii" On Fri, Jun 19, 2026, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 8c13415c8a43 Merge tag 'media/v7.2-1' of git://git.kernel... > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=12ec001c580000 > kernel config: https://syzkaller.appspot.com/x/.config?x=d4e6991ab3edc95e > dashboard link: https://syzkaller.appspot.com/bug?extid=dd769db18693736eee89 > compiler: Debian clang version 22.1.6 (++20260514074242+fc4aad7b5db3-1~exp1~20260514074407.73), Debian LLD 22.1.6 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=157ce8ea580000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1176e566580000 > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/27752fb81380/disk-8c13415c.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/192b476e0df1/vmlinux-8c13415c.xz > kernel image: https://storage.googleapis.com/syzbot-assets/ba635e3d5aec/bzImage-8c13415c.xz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+dd769db18693736eee89@syzkaller.appspotmail.com > > ------------[ cut here ]------------ > irq == -1 > WARNING: arch/x86/kvm/x86.c:10860 at kvm_check_and_inject_events arch/x86/kvm/x86.c:10860 [inline], CPU#0: syz.4.1716/11103 > WARNING: arch/x86/kvm/x86.c:10860 at vcpu_enter_guest arch/x86/kvm/x86.c:11356 [inline], CPU#0: syz.4.1716/11103 > WARNING: arch/x86/kvm/x86.c:10860 at vcpu_run+0x57ec/0x7950 arch/x86/kvm/x86.c:11770, CPU#0: syz.4.1716/11103 #syz test diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index d9d51803b7b2..14a62c2ce3ad 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -10797,10 +10797,12 @@ static int kvm_check_and_inject_events(struct kvm_vcpu *vcpu, if (r) { int irq = kvm_cpu_get_interrupt(vcpu); - if (!WARN_ON_ONCE(irq == -1)) { + if (likely(irq != -1)) { kvm_queue_interrupt(vcpu, irq, false); kvm_x86_call(inject_irq)(vcpu, false); WARN_ON(kvm_x86_call(interrupt_allowed)(vcpu, true) < 0); + } else { + WARN_ON_ONCE(!pic_in_kernel(vcpu->kvm)); } } if (kvm_cpu_has_injectable_intr(vcpu))