From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: "tiejun.chen" <tiejun.chen@windriver.com>,
Alexander Graf <agraf@suse.de>,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
Mihai Caraman <mihai.caraman@freescale.com>
Subject: Re: [PATCH] kvm/ppc: interrupt disabling fixes
Date: Thu, 09 May 2013 12:51:54 +1000 [thread overview]
Message-ID: <1368067914.25488.154.camel@pasglop> (raw)
In-Reply-To: <1368059739.3398.64@snotra>
On Wed, 2013-05-08 at 19:35 -0500, Scott Wood wrote:
> 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
>
> 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.
next parent reply other threads:[~2013-05-09 2:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1368059739.3398.64@snotra>
2013-05-09 2:51 ` Benjamin Herrenschmidt [this message]
[not found] <1367953139.3398.28@snotra>
2013-05-07 20:23 ` [PATCH] kvm/ppc: interrupt disabling fixes Benjamin Herrenschmidt
2013-05-07 3:32 Scott Wood
2013-05-07 3:55 ` Benjamin Herrenschmidt
2013-05-07 10:00 ` tiejun.chen
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=1368067914.25488.154.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=mihai.caraman@freescale.com \
--cc=scottwood@freescale.com \
--cc=tiejun.chen@windriver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox