mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+1522459a74d26b0ac33a@syzkaller.appspotmail.com>
To: alessandro@0x65c.net
Cc: alessandro@0x65c.net, linux-kernel@vger.kernel.org,
	 syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [kvm?] WARNING in vcpu_run
Date: Sat, 03 Jan 2026 13:22:20 -0800	[thread overview]
Message-ID: <6959888c.050a0220.a1b6.0377.GAE@google.com> (raw)
In-Reply-To: <CAKiXHKc_LQaT5-i+CJKt_xvLf5uQ6_0DkPSjJKdrqK9CH6ZnVA@mail.gmail.com>

> #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 <alessandro@0x65c.net>
> 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 <alessandro@0x65c.net>
> ---
>  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

       reply	other threads:[~2026-01-03 21:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKiXHKc_LQaT5-i+CJKt_xvLf5uQ6_0DkPSjJKdrqK9CH6ZnVA@mail.gmail.com>
2026-01-03 21:22 ` syzbot [this message]
2024-10-25 16:30 syzbot
2024-12-10  9:38 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6959888c.050a0220.a1b6.0377.GAE@google.com \
    --to=syzbot+1522459a74d26b0ac33a@syzkaller.appspotmail.com \
    --cc=alessandro@0x65c.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®