From: "tiejun.chen" <tiejun.chen@windriver.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alexander Graf <agraf@suse.de>,
"<kvm-ppc@vger.kernel.org>" <kvm-ppc@vger.kernel.org>,
"<kvm@vger.kernel.org> list" <kvm@vger.kernel.org>
Subject: Re: [v1][PATCH 1/1] KVM: PPC: disable preemption when using hard_irq_disable()
Date: Mon, 15 Jul 2013 03:04:36 +0000 [thread overview]
Message-ID: <51E366C4.5060305@windriver.com> (raw)
In-Reply-To: <1373775224.19894.265.camel@pasglop>
On 07/14/2013 12:13 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2013-07-12 at 12:54 +0800, tiejun.chen wrote:
>> Is the following fine?
>>
>> powerpc: to access local paca after hard irq disabled
>>
>> We can access paca directly after hard interrupt disabled, and
>> this can avoid accessing wrong paca when using get_paca() in
>> preempt case.
>>
>> Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
>
> Ack. We still have an unresolved problem where gcc decides to copy r13
> to another register and then index from that, or even store and reload
> it, and this possibly accross preempt sections.
>
> It's unclear to me in what circumstances it will do it and whether
> there's a case of us getting completely screwed over, I need to
> investigate. This is the reason why we originally made the accesses to
> soft_enabled be inline asm.
Understood.
>
> We might need to do a bulk conversion of all PACA accesses to either
> such inline asm or "hide" r13 behind asm (forcing essentially a copy
> to another register on each use) or a combination of both.
>
> IE. inline asm for direct access of things like soft_enabled, and a
> get_paca/put_paca style interface that copies r13 and includes a
> preempt_disable/enable for the rest.
>
I'd like to check this possibility later.
Tiejun
next prev parent reply other threads:[~2013-07-15 3:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 6:02 [v1][PATCH 1/1] KVM: PPC: disable preemption when using hard_irq_disable() Tiejun Chen
2013-07-10 9:49 ` Alexander Graf
2013-07-11 2:48 ` tiejun.chen
2013-07-11 9:49 ` Alexander Graf
2013-07-11 12:28 ` Benjamin Herrenschmidt
2013-07-11 12:47 ` Alexander Graf
2013-07-11 12:54 ` Benjamin Herrenschmidt
2013-07-11 13:07 ` Alexander Graf
2013-07-12 0:19 ` Benjamin Herrenschmidt
2013-07-12 2:13 ` tiejun.chen
2013-07-12 3:57 ` Benjamin Herrenschmidt
2013-07-12 4:54 ` tiejun.chen
2013-07-14 4:13 ` Benjamin Herrenschmidt
2013-07-15 3:04 ` tiejun.chen [this message]
2013-07-10 19:15 ` Scott Wood
2013-07-11 2:59 ` tiejun.chen
[not found] <1373559480.8183.258@snotra>
2013-07-12 0:30 ` Benjamin Herrenschmidt
[not found] ` <FB21594A-C233-4A97-8503-E2A1275F8F17@suse.de>
[not found] ` <1373560585.8183.261@snotra>
2013-07-12 3:22 ` tiejun.chen
[not found] <1373651433.8183.276@snotra>
2013-07-12 23:05 ` Benjamin Herrenschmidt
2013-07-15 2:20 ` tiejun.chen
2013-07-15 2:47 ` Benjamin Herrenschmidt
2013-07-15 3:03 ` tiejun.chen
[not found] ` <1373909248.8183.303@snotra>
2013-07-16 2:15 ` tiejun.chen
2013-07-15 2:25 ` 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=51E366C4.5060305@windriver.com \
--to=tiejun.chen@windriver.com \
--cc=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--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