|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] How does hypervisor handle the hypercalls fromguest OSes
A couple of comments...
> long hypervisor_temp(struct task_struct *p, dom0_tmp_t *tmp)
> {
> int ret;
> unsigned long cpu_mask = 0;
> int p_size;
>
> if ( sizeof(*p->temp) > PAGE_SIZE ) BUG();
>
> p->temp = (void *)get_free_page(GFP_KERNEL);
> clear_page(p->temp);
> p->temp = tmp->test;
^^^^^^^^^^^^^^^^^^^^
The line above looks like debugging you've forgotten to remove?
> SHARE_PFN_WITH_DOMAIN(virt_to_page(p->temp), p->domain);
>
> cpu_mask = mark_guest_event(p, _EVENT_TEMP);
> guest_event_notify(cpu_mask);
> put_task_struct(p);
^^^^^^^^^^^^^^^^^^^
You probably don't want to decrement p's reference count here. p was
passed into the function as an argument, which usually means that
you are "borrowing" the caller's reference -- and he probably
expects to get it back!
Everything else looks like it is probably okay. The first comment
above could be the problem though -- it looks like the code is plain
wrong.
-- Keir
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel
|
|
|
|
|