> -----Original Message----- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Tuesday, September 22, 2015 5:00 PM > To: Wu, Feng > Cc: Andrew Cooper; Dario Faggioli; George Dunlap; George Dunlap; Tian, Kevin; > xen-devel@lists.xen.org; Keir Fraser > Subject: RE: [Xen-devel] [PATCH v7 15/17] vmx: VT-d posted-interrupt core > logic > handling > > >>> On 22.09.15 at 09:19, <feng...@intel.com> wrote: > > However, I do find some issues with my proposal above, see below: > > > > 1. Set _VPF_blocked > > 2. ret = arch_block() > > 3. if ( ret || local_events_need_delivery() ) > > clear_bit(_VPF_blocked, &v->pause_flags); > > > > After step #2, if ret == false, that means, we successfully changed the PI > > descriptor in arch_block(), if local_events_need_delivery() returns true, > > _VPF_blocked is cleared. After that, external interrupt come in, hence > > pi_wakeup_interrupt() --> vcpu_unblock(), but _VPF_blocked is cleared, > > so vcpu_unblock() does nothing, so the vCPU's PI state is incorrect. > > > > One possible solution for it is: > > - Disable the interrupts before the check in step #3 above > > - if local_events_need_delivery() returns true, undo all the operations > > done in arch_block() > > - Enable interrupts after _VPF_blocked gets cleared. > > Couldn't this be taken care of by, if necessary, adjusting PI state > in vmx_do_resume()?
What do you mean here? Could you please elaborate? Thanks! Thanks, Feng > > Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel