> When the guest unmasks a level-triggered redirection entry whose line is
> already asserted, ioapic_write_indirect() injects the pending interrupt
> first and only then asks the destination vCPUs to rescan their
> ioapic_handled_vectors and EOI exit bitmaps. If the same write also set
> the vector or the trigger mode, a destination vCPU can take the interrupt
> and EOI it before the rescan. A posted interrupt reaches a running vCPU
> without a VM exit, and the EOI is then either virtualized without an exit
> or dropped by kvm_ioapic_send_eoi() because the vector is not in
> ioapic_handled_vectors yet. Remote IRR stays set and the pin delivers no
> more interrupts until the guest reprograms it.
> 
> Linux programs the entry masked and unmasks it with a separate write, so
> the vector is scanned before anything can be injected. Windows writes
> the vector, the trigger mode and the mask bit in one go. A virtio balloon
> on INTx whose line is already up when the driver connects its interrupt
> then stops receiving interrupts for the rest of the boot, and the guest
> ignores every later balloon target.
> 
> Make the scan request before servicing the pending IRR. The request
> waits for the destination vCPUs to leave guest mode, and each of them
> rescans the routes and reloads its EOI exit bitmap before it can enter
> the guest and take the interrupt.
> 
> Fixes: c7c9c56ca26f ("x86, apicv: add virtual interrupt delivery support")
> Fixes: 3bb345f387dd ("KVM: x86: store IOAPIC-handled vectors in each VCPU")
> Link: https://lore.kernel.org/kvm/[email protected]/
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-151727
> Feature: fix ms/kvm
> Signed-off-by: Denis V. Lunev <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท 
https://sashiko.vzint.dev/#/patchset/[email protected]?part=1


_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to