On 18/03/21 17:07, Laszlo Ersek wrote:
However, when I try to register a new interrupt handler (for instance for the edu device, just to try it out), it works perfectly, meaning that the IDT is not really read-only. Do you have any idea why? Any suggestions on how to solve the problem? Of course I've also checked KVM_CAP_READONLY_MEM, no problem with that.
Sorry for asking a question that might be extremely stupid, but: did you check that the guest is writing to the IDT? For example Linux never modifies the IDT when it runs, in fact it even makes it read only (check out idt_setup_apic_and_irq_gates in arch/x86/kernel/idt.c).
Paolo