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] Re: how to handle paged hypercall args?

To: Olaf Hering <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] Re: how to handle paged hypercall args?
From: Keir Fraser <keir@xxxxxxx>
Date: Fri, 03 Dec 2010 06:37:08 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Fri, 03 Dec 2010 06:38:55 -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=4ge37oIGdUTocVHm6xk5p8DsL6KgqKweEyUfvx5C+Rg=; b=i2aX7bQxtOjDFsFhbDEhkd7SoY1WBwiHWJ01/BQT7ybdSVrEwmj8akkZgUtdYxCzB7 LPp1WnKWz+WIGPVi8T3ymd+1zVuF6vH/DxPJu+S2E1GRHo/ulnjyGqpaj8g0qTYGlkLW yfW+YY/FUuXwFCiaMrkOohD9MYNnEcRqsifUE=
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=d5VnCkv3a0aQ8jz5zNsOzh4gwtChBfscxKV6dgmKYXPKZGFTP0QYHEYPKezeO0z3qa EaMjI8pyetjr0ZtRkRPTvX7oDdoaHhAzIPglspPafBFpEDxMfJE3xap1iHNCfZHukQoB HpUi0w8L909KXehxdwwjllgrj07MG8boPYsMs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101203091430.GC6055@xxxxxxxxx>
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: AcuS94/19mBhB/JkuUqvA9a0Wz85+g==
Thread-topic: [Xen-devel] Re: how to handle paged hypercall args?
User-agent: Microsoft-Entourage/12.23.0.091001
On 03/12/2010 01:14, "Olaf Hering" <olaf@xxxxxxxxx> wrote:

>> ...Or you might have a per-domain waitqueue_head, and do the wake_up() from
>> code that adds paged-in entries to the guest physmap. That would seem a
>> pretty sensible way to proceed, to me.
> 
> Thats what I'm doing right now.
> 
> It seems that the existing MEM_EVENT_FLAG_VCPU_PAUSED code can be reused
> for this. I was messing with wait_event() until I realized that the vcpu
> is stopped by p2m_mem_paging_populate() already and the wake_up() ran
> before the vcpu got a chance to call schedule().

Hm, not sure what you mean. The vcpu does not get synchronously stopped by
_paging_populate(). Maybe you are confused.

> If a vcpu happens to be scheduled and the domain is destroyed, the
> BUG_ON in destroy_waitqueue_vcpu() will trigger. What can happen if
> there is still an entry in the list? The cleanup should handle this
> situation to not crash Xen itself.

You'll get a crash if a vcpu is on a waitqueue when you kill the domain.
Yes, the destroydomain path needs code to handle that. It'll get added, once
I see an actual user of this waitqueue stuff. There a few other places that
need fixing up like destroydomain, too.

I don't know what you mean by 'vcpu is scheduled and the domain is
destroyed' causing the BUG_ON(). If a vcpu is scheduled and running then
presumably it is not on a waitqueue.

 -- Keir



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