WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel][PATCH][VTD] small patches for VTD

To: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Subject: Re: [Xen-ia64-devel][PATCH][VTD] small patches for VTD
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 24 Oct 2008 11:52:04 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 23 Oct 2008 19:52:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <F7C8A4D3A9905B45A80E4C194793FA6501B31BF4F3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <F7C8A4D3A9905B45A80E4C194793FA6501B3130ED5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081022053201.GE8110%yamahata@xxxxxxxxxxxxx> <F7C8A4D3A9905B45A80E4C194793FA6501B31316B5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081023015608.GC15025%yamahata@xxxxxxxxxxxxx> <F7C8A4D3A9905B45A80E4C194793FA6501B3131A24@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081023022420.GD15025%yamahata@xxxxxxxxxxxxx> <F7C8A4D3A9905B45A80E4C194793FA6501B3131A92@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081023024404.GF15025%yamahata@xxxxxxxxxxxxx> <F7C8A4D3A9905B45A80E4C194793FA6501B31BF4F3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Thu, Oct 23, 2008 at 03:10:55PM +0800, Xu, Anthony wrote:
> The new one,

It looks almost okay. The last one.


> diff -r 02c8733e2d91 xen/arch/ia64/vmx/viosapic.c
> --- a/xen/arch/ia64/vmx/viosapic.c    Wed Oct 22 17:20:15 2008 +0900
> +++ b/xen/arch/ia64/vmx/viosapic.c    Thu Oct 23 14:48:09 2008 +0800
> @@ -121,6 +121,13 @@
>                       redir_num, vector);
>          return;
>      }
> +    if ( iommu_enabled )
> +    {
> +        spin_unlock(&viosapic->lock);
> +        hvm_dpci_eoi(current->domain, redir_num, 
> &viosapic->redirtbl[redir_num]);
> +        spin_lock(&viosapic->lock);
> +    }
> +
>      service_iosapic(viosapic);
>      spin_unlock(&viosapic->lock);
>  }

Is this unlock/lock sequence okay?
I'm asking simply because I'm not sure.

viosapic->irr and isr are protected by the lock.
And viosapic_update_EOI() updates them atomically.
The above unlock/lock seems to break its atomicity.

I'm not sure it's okay or not. To make sure, it is required
to take closer look at viosapic.c.

thanks,
-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel