Re: [PATCH v2] KVM: x86: Track kvm_vcpu_arch.pending_ioapic_eoi as a u8 to drop dead BUG_ON()

"Huang, Kai" <[email protected]>
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 2026-08-06 at 10:14 -0700, Sean Christopherson wrote:
> Track the vector associated with KVM_EXIT_IOAPIC_EOI as a u8, as the vector
> is zero-initialized and is only ever set to a legal vector.  I.e. unlike
> many of the other vector variables in KVM, it can't be -1 (and can't be
> greater than 255, though that should hold true for all vectors in KVM).
> 
> Drop the now fully dead BUG_ON(), which aside from being completely
> unnecessary, was also useless, as it wouldn't guard against a negative
> value, i.e. wouldn't detect KVM's magic -1 value.
> 
> For all intents and purposes, no functional change intended.
> 
> Suggested-by: Paolo Bonzini <[email protected]>
> Signed-off-by: Sean Christopherson <[email protected]>
> 

Reviewed-by: Kai Huang <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.