Drop the asserts on the guest-controlled address being 16-byte aligned
when emulating I/O APIC accesses, as the ASSERT()s are guest-triggerable
and ultimately pointless since KVM requires exact register matches, i.e.
will ultimately ignore unaligned accesses anyways.
Drop the ASSERT() definition itself now that all users are gone.
For all intents and purposes, no functional change intended.
Link: https://patch.msgid.link/20251206004311.479939-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
if (!ioapic_in_range(ioapic, addr))
return -EOPNOTSUPP;
- ASSERT(!(addr & 0xf)); /* check alignment */
-
addr &= 0xff;
spin_lock(&ioapic->lock);
switch (addr) {
if (!ioapic_in_range(ioapic, addr))
return -EOPNOTSUPP;
- ASSERT(!(addr & 0xf)); /* check alignment */
-
switch (len) {
case 8:
case 4:
void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin,
bool mask);
-#ifdef DEBUG
-#define ASSERT(x) \
-do { \
- if (!(x)) { \
- printk(KERN_EMERG "assertion failed %s: %d: %s\n", \
- __FILE__, __LINE__, #x); \
- BUG(); \
- } \
-} while (0)
-#else
-#define ASSERT(x) do { } while (0)
-#endif
-
static inline int ioapic_in_kernel(struct kvm *kvm)
{
return irqchip_full(kvm);