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/
Home Products Support Community News


Re: [Xen-devel] Re: how to handle paged hypercall args?

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Olaf Hering <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] Re: how to handle paged hypercall args?
From: Keir Fraser <keir@xxxxxxx>
Date: Fri, 12 Nov 2010 10:22:48 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 12 Nov 2010 02:23:48 -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:cc:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=/nQZN+uwSJ8wZZwfnCx59dB9vNI5fBqAmaAIzXYHTbM=; b=Pu+vMsnAqwWXP3S5Y1OEfb9mKD70MmxEUH0f9nghVKv2Mju83C1acKaocM6GNDmSMO D5il6JZA03JIgK9eHzdordy8pYm1ujQcBzqTIljVQGtJ7LHCR8dGzEtRsUgOM7sUQa0w HmZrFmmBFHdDyvUlJZCGgrO2fsKR+ktNrFUAU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=qcJ1uQeNcPHeO22Mar5TfiCaMkc5tv0njmUbwU5U2B64oHzOg7nadLamq3SVyDev5f LH6ZQLNuJstj5sNi+NPfdIAHiGe8gTU+H2S1rbMLtk+Dn/dfF1m9z+Yj0lPmqW6NsHgU MDg3qkjZqVtbMUKEL3seO5xgN5UkEmP4yU6Rc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4CDD1AB70200007800021EB7@xxxxxxxxxxxxxxxxxx>
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: AcuCU42d2PLiHo5eVUuBJMdRM6rX3A==
Thread-topic: [Xen-devel] Re: how to handle paged hypercall args?
User-agent: Microsoft-Entourage/
On 12/11/2010 09:45, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

> Furthermore, even for the do_memory_op() one, encoding a
> continuation for a failure of copying in the arguments is clearly
> acceptable (if no other solution can be found), but unwinding
> the whole operation when copying out the results fails is at
> least undesirable (and can lead to a live lock). So I think a
> general (hopefully transparent to the individual hypercall
> handlers) solution needs to be found, and a word on the
> general issue from the original paging code authors (and their
> thoughts of it when designing the whole thing) would be very
> much appreciated.

We will at least have to enforce that no spinlocks are held during
copy_to/from_guest operations. That's easily enforced at least in debug
builds of course.

Beyond that, introducing some transparent mechanisms for sleeping in the
hypervisor -- mutexes, wait queues, and the like -- is actually fine with
me. Perhaps this will also help clean up the preemptible page-type-checking
logic that you had to do some heavy lifting on?

I'm happy to help work on the basic mechanism of this, if it's going to be
useful and widely used. I reckon I could get mutexes and wait queues going
in a couple of days. This would be the kind of framework that the paging
mechanisms should then properly be built on.

What do you think?

 -- Keir

Xen-devel mailing list