All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] kvm freeze with ipipe patch for kernel 3.x
@ 2013-03-01 15:33 Gabriele Moabiti
  2013-03-01 17:09 ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Gabriele Moabiti @ 2013-03-01 15:33 UTC (permalink / raw)
  To: xenomai@xenomai.org


I'm using an XP guest with qemu+kvm (vmx) on linux host (kernel 3.2.21 + ipipe patch + xenomai version 2.6.2.1)
and I'm experiencing many system freezes when the vm is active.
I think then problem is in the 3.x (3.2,3.4,3.5) ipipe patch (ipipe-core-3.2.21-x86-5.patch):

:

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c


....

@@ -5749,13 +5795,11 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
      */
     smp_mb();

-    local_irq_disable();
-
     if (vcpu->mode == EXITING_GUEST_MODE || vcpu->requests
         || need_resched() || signal_pending(current)) {
         vcpu->mode = OUTSIDE_GUEST_MODE;
         smp_wmb();
-        local_irq_enable();
+        hard_cond_local_irq_enable();
         preempt_enable();
         kvm_x86_ops->cancel_injection(vcpu);
         r = 1;


....




local_irq_enable() should be enabled after hard_cond_local_irq_enable (as in the 2.6.38 patch), in this way:



...
-    local_irq_disable();
-
     if (vcpu->mode == EXITING_GUEST_MODE || vcpu->requests
         || need_resched() || signal_pending(current)) {
         vcpu->mode = OUTSIDE_GUEST_MODE;
         smp_wmb();
+        hard_cond_local_irq_enable();
         local_irq_enable();
         preempt_enable();
....

I've done some tests and now the system runs fine.

Gabriele Moabiti


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-03-04 11:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 15:33 [Xenomai] kvm freeze with ipipe patch for kernel 3.x Gabriele Moabiti
2013-03-01 17:09 ` Jan Kiszka
2013-03-01 17:35   ` Jan Kiszka
2013-03-02  0:47     ` Gabriele Moabiti
2013-03-02  8:17       ` Jan Kiszka
2013-03-02 11:01         ` Gilles Chanteperdrix
2013-03-02 11:12           ` Jan Kiszka
2013-03-02 14:20             ` Gilles Chanteperdrix
2013-03-02 14:38               ` Jan Kiszka
2013-03-02 14:41                 ` Gilles Chanteperdrix
2013-03-03  8:49                   ` Jan Kiszka
2013-03-03  9:00                     ` Gilles Chanteperdrix
2013-03-03 21:15                       ` Gabriele Moabiti
2013-03-04 11:59                         ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.