On 11/26/19 5:26 AM, Roger Pau Monne wrote: > When using posted interrupts on Intel hardware it's possible that the > vCPU resumes execution with a stale local APIC IRR register because > depending on the interrupts to be injected vlapic_has_pending_irq > might not be called, and thus PIR won't be synced into IRR. > > Fix this by making sure PIR is always synced to IRR in > hvm_vcpu_has_pending_irq regardless of what interrupts are pending. > > While there also simplify the code in __vmx_deliver_posted_interrupt: > only raise a softirq if the vCPU is the one currently running and > __vmx_deliver_posted_interrupt is called from interrupt context. The > softirq is raised to make sure vmx_intr_assist is retried if the > interrupt happens to arrive after vmx_intr_assist but before > interrupts are disabled in vmx_do_vmentry. Also simplify the logic for > IPIing other pCPUs, there's no need to check v->processor since the > IPI should be sent as long as the vCPU is not the current one and it's > running. > > Reported-by: Joe Jin <[email protected]> > Signed-off-by: Roger Pau Monné <[email protected]> > --- > Cc: Juergen Gross <[email protected]>
Patch works for me. Tested-by: Joe Jin <[email protected]> Thanks, Joe _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
