|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [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
|
|
|
|
|