|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
RE: [Xen-devel] [patch] make hypercall_preempt_check() a little moresens
>From: Hollis Blanchard
>Sent: 2006年3月31日 1:17
>
>Since PowerPC has a hypervisor mode in the processor, Linux is able to
>disable
>interrupts directly using the EE bit in the MSR (Machine State Register),
>just like on hardware. This bit acts like the evtchn_upcall_mask bit.
A bit curious. Do you mean xenlinux can operate real MSR directly, to
disable real external interrupts on that physical processor, or here
so-called MSR is a virtual MSR presented per guest to disable virtual
interrupt on that virtual processor? I prefer to the latter. :-)
>
>It would be an invasive patch to PowerPC Linux to modify the code that
>disables the EE bit and additionally have it modify
>vcpu_info->evtchn_upcall_mask, especially when that code is in
>assembly.
>Instead, we can have hypercall_preempt_check() also check MSR:EE
>directly.
>IA64 may be able to use this facility as well, so I've CC'ed that list.
XEN/IA64 also realized this issue recently, and we've merged our
architecture specific interrupt enable flag with the evtchn_upcall_mask, to
avoid any race conditions when operating two flags simultaneously. After
this effort, now XEN/IA64 is completely same as x86 where
evtchn_upcall_mask becomes the only flag for interrupts/events, to avoid
any future similar misunderstandings.
By following your approach, there're others places you may need similar
wrapper to make it robust. For example, unmask_evtchn in
xenlinux/drivers/xen/core/evtchn.c will check evtchn_upcall_mask to see
whether force callback to fire previous pending events before unmasking.
Based on your description for powerpc, there you also need to check the
EE flag to avoid unnecessary force back since interrupt may be disabled
that time.
So hypercall_preempt_check is only one place directly related to that bug.
If you really want to go that way, it's better that you can capture all
possible places and tune all with clear comment about the difference as a
tip to future development.
Thanks,
Kevin
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- RE: [Xen-devel] [patch] make hypercall_preempt_check() a little moresensitive,
Tian, Kevin <=
|
|
|
|
|