lkml.org 
[lkml]   [2007]   [Feb]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 15 Feb 2007 22:52:29 -0800
FromAndrew Morton <>
SubjectRe: [patch 18/21] Xen-paravirt: Add Xen grant table support
On Thu, 15 Feb 2007 18:25:07 -0800 Jeremy Fitzhardinge <jeremy@goop.org> 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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-16 07:57    [from the cache]
©2003-2008