[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Olaf Hering <olaf@xxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcuS94/19mBhB/JkuUqvA9a0Wz85+g==
  • Thread-topic: [Xen-devel] Re: how to handle paged hypercall args?

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.