Re: [PATCH 2/2] KVM: PPC: Book3S: Call into C interrupt handlers

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

 



On Fri, 2012-04-27 at 01:50 +0200, Alexander Graf wrote:

> Yup. We're running the entire guest with IRQs off. Do you have any better idea how to make sure that we're atomic wrt signal delivery?

Something like this entry path:

 - local_irq_disable
 - check TIF_NEED_RESCHED, TIF_SIGPENDING,... (probably
_TIF_USER_WORK_MASK in fact)
 - if any set, re-enable then -> back to qemu
 - ppc64: hard disable
 - ppc64: check irq_pending, something set (other than hard disable) ->
local_irq_enable() and try again the whole sequence
 - call trace_irq_enable() (tell lockdep/irqtrace we are re-enabling)
 - enter the guest, last rfi will turn EE on

And exit:

 - irqs are hard off from the interrupt handler
 - call local_irq_disable() to tell lockdep about it and mark
soft-disabled on ppc64
 - ppc64: maybe set PACA_HARD_IRQ_DIS (tbd)
 - do things like do_IRQ() etc... if needed
 - local_irq_enable() (will hard enable if PACA_HARD_IRQ_DIS was set)


Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux