[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC v2 14/15] Suppress posting interrupts when 'SN' is set



>>> On 08.05.15 at 11:07, <feng.wu@xxxxxxxxx> wrote:
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -1664,9 +1664,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 = v->arch.hvm_vmx.pi_desc.sn;
> +    r = pi_test_and_set_on(&v->arch.hvm_vmx.pi_desc);

I'm probably misunderstanding something here, but to me this looks
like a change that would need to be done quite a bit earlier in the
series (i.e. at this point it looks like it's fixing a bug/oversight of an
earlier patch).

Apart from that I'm also not understanding the synchronization
aspect here: What if SN gets set after having been latched above,
but before the latched value gets looked at below?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.