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-devel

[Xen-devel] gnttab_setup_table attempting copy_from_guest in atomic cont

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] gnttab_setup_table attempting copy_from_guest in atomic context
From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Date: Wed, 01 Dec 2010 17:48:32 -0500
Cc:
Delivery-date: Wed, 01 Dec 2010 14:50:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: National Security Agency
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Thunderbird/3.1.6
do_grant_table_op takes domain_lock(d), and then calls gnttab_setup_table
with the lock held. Since changeset 22402:7d2fdc083c9c, this will cause the
copy to fail with a rather misleading message:

(XEN) grant_table.c:1315:d1 Fault while reading gnttab_query_size_t.

This causes grants between HVM guests to fail.

>From looking at the code, it appears that at least some of the functions
within do_grant_table_op do not need to hold domain_lock. Is there a reason
to hold domain_lock when manipulating the grant table? Most of the critical
operations already appear to be protected by the grant table lock, so it may
be safe to completely remove the lock_domain calls in this function.

-- 
Daniel De Graaf
National Security Agency

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

<Prev in Thread] Current Thread [Next in Thread>