|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [patch 18/21] Xen-paravirt: Add Xen grant table support
To: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Subject: |
[Xen-devel] Re: [patch 18/21] Xen-paravirt: Add Xen grant table support |
From: |
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> |
Date: |
Thu, 15 Feb 2007 22:52:29 -0800 |
Cc: |
Zachary Amsden <zach@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Chris Wright <chrisw@xxxxxxxxxxxx>, Andi Kleen <ak@xxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx> |
Delivery-date: |
Fri, 16 Feb 2007 05:32:21 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxx |
In-reply-to: |
<20070216022531.904462260@xxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<20070216022449.739760547@xxxxxxxx> <20070216022531.904462260@xxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
On Thu, 15 Feb 2007 18:25:07 -0800 Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> +int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
> + int readonly)
> +{
> + int ref;
> +
> + if (unlikely((ref = get_free_entry()) == -1))
> + return -ENOSPC;
> +
> + shared[ref].frame = frame;
> + shared[ref].domid = domid;
> + wmb();
> + shared[ref].flags = GTF_permit_access | (readonly ? GTF_readonly : 0);
> +
> + return ref;
> +}
> +EXPORT_SYMBOL_GPL(gnttab_grant_foreign_access);
We have lots of open-coded mysteriously unexplained barriers in here.
I assume they're not smp_wmb() because this could be a !SMP guest talking
to an SMP host?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|