Skip to contentSkip to conversation

kvm/ppc: interrupt disabling fixes

PATCH Benjamin Herrenschmidt 1 participant 1 message May 9, 2013 1 message not in the archive KVM

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1368059739.3398.64@snotra

#1 lore raw
Quoted 16 lines · Scott Wood

Sigh, and then there's this:

#ifdef CONFIG_PPC64
                 /* lazy EE magic */
                 hard_irq_disable();
                 if (lazy_irq_pending()) {
                         /* Got an interrupt in between, try again */
                         local_irq_enable();
                         hard_irq_disable();
                         kvm_guest_exit();
                         continue;
                 }

                 trace_hardirqs_on();

#endif

Quoted 8 lines

Alex, could you be a bit more descriptive than "magic" please? Can this chunk of code be removed if we do the other changes being discussed? Or should we leave this in and drop the pre-enter hard_irq_disable portion of the proposed changes?

Why are you calling trace_hardirqs_on() here and not in kvmppc_lazy_ee_enable()? Why are you calling kvm_guest_exit() before you've called kvm_guest_enter()?

I think I originated that magic... it more/less mimmics prep_for_idle, the goal was to hard disable (because we had soft disabled earlier) and check if anything happened in between... if it did, abort, and try again, but it's a bit fishy really.

Ben.