> -----Original Message-----
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com]
> Sent: Friday, March 27, 2015 4:35 AM
> To: Wu, Feng; xen-devel@lists.xen.org
> Cc: Zhang, Yang Z; Tian, Kevin; k...@xen.org; jbeul...@suse.com
> Subject: Re: [Xen-devel] [RFC v1 14/15] Suppress posting interrupts when 'SN'
> is
> set
>
> On 25/03/15 12:31, Feng Wu wrote:
> > Currently, we don't support urgent interrupt, all interrupts
> > are recognized as non-urgent interrupt, so we cannot send
> > posted-interrupt when 'SN' is set.
> >
> > Signed-off-by: Feng Wu <feng...@intel.com>
> > ---
> > xen/arch/x86/hvm/vmx/vmx.c | 13 ++++++++++++-
> > 1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
> > index 6323bd6..40c7b0e 100644
> > --- a/xen/arch/x86/hvm/vmx/vmx.c
> > +++ b/xen/arch/x86/hvm/vmx/vmx.c
> > @@ -1663,9 +1663,20 @@ static void
> __vmx_deliver_posted_interrupt(struct vcpu *v)
> >
> > static void vmx_deliver_posted_intr(struct vcpu *v, u8 vector)
> > {
> > + int r, sn;
> > +
> > if ( pi_test_and_set_pir(vector, &v->arch.hvm_vmx.pi_desc) )
> > return;
> >
> > + /*
> > + * Currently, we don't support urgent interrupt, all interrupts
> > + * are recognized as non-urgent interrupt, so we cannot send
> > + * posted-interrupt when 'SN' is set.
> > + */
> > +
> > + sn = pi_test_sn(&v->arch.hvm_vmx.pi_desc);
>
> Is there anywhere which sets sn at all? I cant spot anywhere.
>
SN is set in [13/15] while vCPU is going to runnable state.
Thanks,
Feng
> ~Andrew
>
> > + r = pi_test_and_set_on(&v->arch.hvm_vmx.pi_desc);
> > +
> > if ( unlikely(v->arch.hvm_vmx.eoi_exitmap_changed) )
> > {
> > /*
> > @@ -1675,7 +1686,7 @@ static void vmx_deliver_posted_intr(struct vcpu *v,
> u8 vector)
> > */
> > pi_set_on(&v->arch.hvm_vmx.pi_desc);
> > }
> > - else if ( !pi_test_and_set_on(&v->arch.hvm_vmx.pi_desc) )
> > + else if ( !r && !sn )
> > {
> > __vmx_deliver_posted_interrupt(v);
> > return;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel