I am doing KVM stuff and have a couple of questions that they cannot understand.
1> as you know, usually an external interrupt will cause VMexit, and the hypervisor will introduce a virtual interrupt if it is for a guest. Then what irq will be introduced (i means interrupt vector for indexing guest IDT)? How does KVM know about this (associate host IRQ with guest virtual IRQ)?
2> if for the designated device for the guest the hypervisor delivers this IRQ to the guest. while tracking the code, I found that the IRQ of the host is different from the guest (I mean the interrupt vector). How does KVM configure which interrupt vector a guest should use?
3> If we do not configure the output to an external interrupt by setting some field in VMCS, what will happen during physical interrupts? Will the processor use the guest IDT to interrupt the response? If so, can KVM redirect the processor to use a different IDT for the guest (provided the IDTR changes)?
4> where is the guest IDT located? Is this configured by qemu when initializing vcpu and registers (including IDTR)?
I really hope someone can answer my questions. I'll be very grateful.
thanks
source share