From: Jan Kiszka <jan.kiszka@siemens.com>
To: Gabriele Moabiti <gabmoa@yahoo.it>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
Date: Fri, 01 Mar 2013 18:09:27 +0100 [thread overview]
Message-ID: <5130E0C7.80709@siemens.com> (raw)
In-Reply-To: <1362151982.5735.YahooMailNeo@web171205.mail.ir2.yahoo.com>
On 2013-03-01 16:33, Gabriele Moabiti wrote:
>
> 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.
There is more broken, even in latest stable 3.5.7. See the patches at
[1] for a tested version. Unfortunately, I cannot update my tree for 3.8
ATM as git services seem to be down on xenomai.org.
Would be great if you could give it try and report remaining issues.
Jan
[1]
http://git.xenomai.org/?p=ipipe-jki.git;a=shortlog;h=refs/heads/for-upstream/3.5
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2013-03-01 17:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-01 15:33 [Xenomai] kvm freeze with ipipe patch for kernel 3.x Gabriele Moabiti
2013-03-01 17:09 ` Jan Kiszka [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5130E0C7.80709@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=gabmoa@yahoo.it \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.