On 25/10/12 09:56, Frederic Weisbecker wrote: [...] >>> * s390 doesn't disable irqs in its implementation of vtime_account(). >>> If vtime_account() in kvm races with an irq, the pending time might >>> be accounted twice. With vtime_account_system_irqsafe() we are protected. >> >> We disable irqs before we call kvm_guest_enter/exit, see kvm-s390.c: >> >> >> [...] >> if (!kvm_is_ucontrol(vcpu->kvm)) >> kvm_s390_deliver_pending_interrupts(vcpu); >> vcpu->arch.sie_block->icptcode = 0; >> local_irq_disable(); >> kvm_guest_enter(); >> local_irq_enable(); >> [...] >> > > Ah ok. Hmm I still need to keep it irqsafe for the other archs though, > as it is currently with vtime_account(). So perhaps I can remove your > local_irq_disable there and use vtime_account_system_irqsafe() > instead?
Yes. We added the local_irq_disable code just for the vtime accounting. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/