I am having trouble implementing kvm’s paravirtual EOI feature. I have written to the specified MSR the (aligned) address of an unsigned long used to store the EOI bit, OR-ed with KVM_MSR_ENABLE (1). I am not getting any set bits during interrupts, so all interrupts are manually EOId (by writing to APIC EOI register).
I don’t have vt-d on this machine, is that relevant?
Disclosure: _test_and_clear_bit is from Linux without attribution (will attribute REAL soon!). In this case it might not be wanted, since there should not be any races on interrupts? Well, after I make the value per-cpu, at least. Or should I keep?