Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Amirmohammad Eftekhar <amirmohammad.eftekhar@cispa.de>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] KVM: x86: __set_regs() silently drops a pending nested exception destined to VM-exit to L1
Date: Fri, 16 Oct 2026 17:50:09 -0700	[thread overview]
Message-ID: <atLGQQEuILMqkx8F@google.com> (raw)
In-Reply-To: <20261016235221.33726-5-amirmohammad.eftekhar@cispa.de>

On Sat, Oct 17, 2026, Amirmohammad Eftekhar wrote:
> Hi,
> 
> __set_regs() (arch/x86/kvm/regs.c:102) unconditionally clears both pending
> exception queues:
> 
> 	vcpu->arch.exception.pending        = false;	/* regs.c:129 */
> 	vcpu->arch.exception_vmexit.pending = false;	/* regs.c:130 */

And?  It's an ioctl.  KVM can do whatever it wants, so long as it doesn't break
userspace.  Clearing the exception queue was deliberately added by commit
b4f14abd95cd ("KVM: Avoid spurious execeptions after setting registers") back in
2008.  Whether or not that was the best fix way back when, probably not.  But it
simply doesn't matter, this has been KVM's behavior for 18+ years.

      reply	other threads:[~2026-10-17  0:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 23:52 [BUG] KVM: x86: __set_regs() silently drops a pending nested exception destined to VM-exit to L1 Amirmohammad Eftekhar
2026-10-17  0:50 ` Sean Christopherson [this message]

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=atLGQQEuILMqkx8F@google.com \
    --to=seanjc@google.com \
    --cc=amirmohammad.eftekhar@cispa.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.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