public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alexander Graf <agraf@suse.de>
Cc: kvm list <kvm@vger.kernel.org>, kvm-ppc <kvm-ppc@vger.kernel.org>
Subject: Re: [PATCH 2/2] KVM: PPC: Book3S: Call into C interrupt handlers
Date: Fri, 27 Apr 2012 09:37:50 +1000	[thread overview]
Message-ID: <1335483470.21961.89.camel@pasglop> (raw)
In-Reply-To: <B9B828CD-E9D9-4F9C-ABE0-8F52D758DB71@suse.de>

On Fri, 2012-04-27 at 01:30 +0200, Alexander Graf wrote:
> On 27.04.2012, at 01:12, Benjamin Herrenschmidt wrote:
> 
> > On Fri, 2012-04-27 at 00:24 +0200, Alexander Graf wrote:
> >> 
> >> This is to actually enable interrupts for real, regardless of ppc64
> >> and ppc32. In fact, the previous code was pretty buggy - it was
> >> running the handlers with interrupts disabled ;). 
> > 
> > They should be run with interrupts disabled.. tho both soft & hard.
> 
> The kvm_resched()? No, that one should be run with interrupts enabled - hard and soft :).

Ok, when you said "the handler" I thought you mean do_IRQ & co... those
must be run with IRQs off (and never enabled since taking the actual
exception).

> > You probably do want to call local_irq_disable() unconditionally anyway,
> > because on ppc32, that will give you the proper accounting vs. lockdep.
> 
> We already do __hard_irq_disable (which maps to local_irq_disable on ppc32)
> when entering the guest context and when leaving the intercept handler :).
> So that should be fine, no?

Well, __hard_irq_disable() isn't defined on ppc32 in hw_irq.h so if you
redefine it locally that's really gross :-) Also that means that from a
lockdep perspective you are running the entire guest with IRQs off ?
that doesn't sound right...

Cheers,
Ben.



  reply	other threads:[~2012-04-26 23:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 10:19 [PATCH 1/2] PPC: Export some interrupt handlers Alexander Graf
2012-04-26 10:19 ` [PATCH 2/2] KVM: PPC: Book3S: Call into C " Alexander Graf
2012-04-26 21:45   ` Benjamin Herrenschmidt
2012-04-26 22:24     ` Alexander Graf
2012-04-26 23:12       ` Benjamin Herrenschmidt
2012-04-26 23:30         ` Alexander Graf
2012-04-26 23:37           ` Benjamin Herrenschmidt [this message]
2012-04-26 23:50             ` Alexander Graf
2012-04-27  0:00               ` Benjamin Herrenschmidt
2012-04-26 21:54   ` Scott Wood
2012-04-26 22:26     ` Alexander Graf
2012-04-26 22:58     ` Benjamin Herrenschmidt
2012-04-27  5:48   ` Paul Mackerras
2012-04-27 11:23     ` Alexander Graf
2012-04-27 14:19       ` Alexander Graf
2012-04-27 16:37       ` Scott Wood
2012-04-27 16:54         ` Alexander Graf
2012-04-27 22:20       ` Benjamin Herrenschmidt

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=1335483470.21961.89.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox