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

Re: [Xen-devel] [patch] make hypercall_preempt_check() a little moresensitive



On Mar 30, 2006, at 8:50 PM, Tian, Kevin wrote:

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,

Yes, some bits can be controlled by xenlinux

to
disable real external interrupts on that physical processor,

Yes, even this bit, tho' it this is on the 970 class of processor, newer processors can be configured to not disable externals, but they can still set the bit.

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. :-)

I understand your preference, but we've found with other hypervisors, that under server class workloads it does not matter. I could see how this would be a big deal for real-time, but Xen doesn't do that.. yet :)

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.

This is an interesting example, but why deliver an upcall thru the HV in the first place, why not just call the evtchn handler directly?

So hypercall_preempt_check is only one place directly related to that bug.

hmm, this is quite the pathological case, but I cannot deny it will hit us else where.

We expect to explore the Linux change when the xen-patches make it to kernel.org.
-JX
_______________________________________________
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®.