From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) (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 45FAA2BD5A2 for ; Sat, 3 Jan 2026 21:22:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767475343; cv=none; b=ss+S6tqSwfD2vFcb9YD4OgJzxcbWQCEEkq18r5ZDAxfcdkYClJsXO3+Vi6lN3p7g0lPcTMl0gfakLFnLL/jHDICBiTQm+OfXBWe+yGP2P5DoDL1dFPIf7FBVfMjS729KldmoGLl9V84DXQfHgkKNh7RdGKMLIykDROmkKGvlS1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767475343; c=relaxed/simple; bh=nByPekeWbRBa+FCDcbVlPr6xAJSsluQEYY94dB4UUAQ=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:Cc: Content-Type; b=Smc5Zpfy+aieCy/uupwvTGURNLt7o6rAOYo4rUgEg2MG/rVUWDJSIS7x9TA+6edY6+Uo0P5RGjhBpMvYddzJVJaoHtxB0sgd9L+Iq5+hhgTSNWJZqLnS0JWqAZIILqmOffJqGmrZ5CObJOkwSThY1XrsX5p5Ci2sxpEvaWWeI2E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.210.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-ot1-f70.google.com with SMTP id 46e09a7af769-7caf4cdfa28so19083835a34.0 for ; Sat, 03 Jan 2026 13:22:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767475340; x=1768080140; h=cc:to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QL6edT1A4DNzXNBhEOQwCEOB5CcXWTKfIcHoaN1agpg=; b=jZrPZT56cESgs4Hq2rnN3YmMzUfQ1sVgKPfVQNHkGFwj2oAGGhoslmBbAHJVm9rBgK dU2igjELNyVZhU6pzeEoTIB+WGhUuZOuQBBv4LSHGvRT4Ir7qIodf57cI/0uzDYOag36 8H/BUPz3CpFDbEdrRZZwTtCLXj/t8kNl1D6nts2MIa/xfkbuoz3cukiev5jhmVGLPKcD zF/488VidrRIuettWSUqzA0jKmOHJ8SS9wTodnTYs5PzaZJHs+yN/piYcvWq+2UgsPF0 nVeDBCZSRR7tofBIAAWS85BXEQmCGo4ipKYjTjq55o2mhoTDPiksm7US4fwmd2L/+i1s cjSQ== X-Forwarded-Encrypted: i=1; AJvYcCUiE0ZtnUHSZtsbrWF9H+PEAbjxnmnf1jxeOAoJ4DSzjpI+/DcsaRPPNwhUuYEfj/lWKpbKNWGYh2yWERo=@vger.kernel.org X-Gm-Message-State: AOJu0Yw2+tBki138M+BwLv2U5CffXznV0McS+UjKxoUx9zzKIjj9YX5A MR20pbSgkPz+EEIY9lSgKRPzPgjdm45bRCFr1qLC5+HPHAq4qYXHDctG2FyCWQdBHfnJZgRkuLl fSY+dWaFy5V7p1b/ljDNCs9v7KoxJlj2MYt+6gLEyvdYBmvZMlMuAKuallWw= X-Google-Smtp-Source: AGHT+IGJlEHAyq5Fd60gPKZNaHXWN/n2279/Jl+jadH0V1bv22cWuoiYBsNPseR4mFcMkbhu0IW55InAajKo1ldrWdnqaw4KW3RE Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:162a:b0:65d:1c:f3a5 with SMTP id 006d021491bc7-65d0e96d303mr17394364eaf.20.1767475340249; Sat, 03 Jan 2026 13:22:20 -0800 (PST) Date: Sat, 03 Jan 2026 13:22:20 -0800 In-Reply-To: X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6959888c.050a0220.a1b6.0377.GAE@google.com> Subject: Re: [syzbot] [kvm?] WARNING in vcpu_run From: syzbot To: alessandro@0x65c.net Cc: alessandro@0x65c.net, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" > #syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git I've failed to parse your command. Did you perhaps forget to provide the branch name, or added an extra ':'? Please use one of the two supported formats: 1. #syz test 2. #syz test: repo branch-or-commit-hash Note the lack of ':' in option 1. > master > > From 2090baeb71f48c9ad62129bd457a2c3bb5f0ed55 Mon Sep 17 00:00:00 2001 > From: Alessandro Ratti > Date: Sat, 3 Jan 2026 22:01:32 +0100 > Subject: [PATCH] KVM: x86: Handle -EBUSY from nested event check in > vcpu_block() > > When a vCPU running in nested guest mode attempts to block (e.g. due to > HLT), kvm_check_nested_events() may return -EBUSY to indicate that a > nested event is pending but cannot be injected immediately, such as > when event delivery is temporarily blocked in the guest. > > Currently, vcpu_block() treats this as a generic error and exits to > userspace. This can cause the vCPU to repeatedly block without making > forward progress, delaying nested event injection and potentially > leading to guest hangs under rare timing conditions. > > Handle -EBUSY explicitly by returning to the vCPU run loop and retrying > guest entry instead of blocking. This allows nested event delivery to > complete once the temporary blocking condition clears. > > This issue was triggered by syzkaller during nested virtualization > stress testing. > > Fixes: 45405155d876 ("KVM: x86: WARN if a vCPU gets a valid wakeup > that KVM can't yet inject") > Reported-by: syzbot+1522459a74d26b0ac33a@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?id=b646ef310afe5b51ae0372e1de8fdd68baad9eb5 > Signed-off-by: Alessandro Ratti > --- > arch/x86/kvm/x86.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index ff8812f3a129..d5cf9a7ff8c5 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -11596,7 +11596,15 @@ static inline int vcpu_block(struct kvm_vcpu *vcpu) > if (is_guest_mode(vcpu)) { > int r = kvm_check_nested_events(vcpu); > > - WARN_ON_ONCE(r == -EBUSY); > + /* > + * -EBUSY indicates a nested event is pending but cannot be > + * injected immediately (e.g., event delivery is temporarily > + * blocked). Return to the vCPU run loop to retry guest entry > + * instead of blocking, which would lose the pending event. > + */ > + if (r == -EBUSY) > + return 1; > + > if (r < 0) > return 0; > } > -- > 2.52.0