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

Re: [Xen-devel] gnttab_setup_table attempting copy_from_guest in atomic

To: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] gnttab_setup_table attempting copy_from_guest in atomic context
From: Keir Fraser <keir@xxxxxxx>
Date: Thu, 02 Dec 2010 07:41:05 +0000
Cc:
Delivery-date: Wed, 01 Dec 2010 23:42:01 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=Gki1+3Xwu3+YgH2DjTHsIQ8bQIClL/gjdIwhQA9ySE0=; b=YMm2BuSXjWbcchjRn7IvNoVyOaOY61tvPDoPVl3V5G9u1/EFqM7IhmW3YVunEopVKr D8woMi+sqEy0oBcKZzQCUWmnO3RgM6C2Wga4DgNCX6F0X3sQOv1535sLH6wVUvdAngvM Bu7cbnLaLE5tcpqQsFXwa4VeXckghIlNRgPM0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=R0SV8BCm82nofpPtjZqiWyvUYgpRBBol/vpKPeJMvVx0OVFpaBAPJudH0b99Pa58K1 HDnXgMGmem1qRgRK4e6BSxWtFlzGTWpdUVH+YZGnsH2TUYdbTNHSOqpu4AGgei3wXItP vloDVVmRKNfof+EQ1wablLLxqwXvX5hiOGHMw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4CF6D0C0.2060402@xxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuR9EZwpMXX0nFazEOypqBdZ4K6kA==
Thread-topic: [Xen-devel] gnttab_setup_table attempting copy_from_guest in atomic context
User-agent: Microsoft-Entourage/12.27.0.100910
On 01/12/2010 22:48, "Daniel De Graaf" <dgdegra@xxxxxxxxxxxxx> wrote:

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

Yes, the grant locking will need reworking. Xenpaging is going to require
the ability to sleep in __hvm_copy(), and this means that all callers --
direct or indirect -- must hold no locks. Will have to take a look.

 -- Keir



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

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