From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Mihai Caraman <mihai.caraman@freescale.com>,
"<linuxppc-dev@lists.ozlabs.org>" <linuxppc-dev@lists.ozlabs.org>,
"<kvm@vger.kernel.org>" <kvm@vger.kernel.org>,
"<kvm-ppc@vger.kernel.org>" <kvm-ppc@vger.kernel.org>
Subject: Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro
Date: Wed, 12 Sep 2012 16:54:21 -0500 [thread overview]
Message-ID: <5051048D.3080309@freescale.com> (raw)
In-Reply-To: <B9A48F7E-664A-4E8A-883F-CEB01068CC2A@suse.de>
On 09/12/2012 04:45 PM, Alexander Graf wrote:
>
>
> On 12.09.2012, at 23:38, Scott Wood <scottwood@freescale.com> wrote:
>
>> On 09/12/2012 01:56 PM, Alexander Graf wrote:
>>>
>>>
>>> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote:
>>>
>>>> The current form of DO_KVM macro restricts its use to one call per input
>>>> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol
>>>> definition.
>>>> Duplicate calls of DO_KVM are required by distinct implementations of
>>>> exeption handlers which are delegated at runtime.
>>>
>>> Not sure I understand what you're trying to achieve here. Please elaborate ;)
>>
>> On 64-bit book3e we compile multiple versions of the TLB miss handlers,
>> and choose from them at runtime.
>
> Why?
Because one size does not fit all, and we try to not force a separate
kernel build based on what sort of TLB miss handler a piece of hardware
wants. Some of the differences are too large to be sanely handled by
feature fixups.
>> Without this patch, we get duplicate
>> label errors if more than one variant of the same exception uses DO_KVM.
>
> Makes sense. The proposed solution also looks good. Just quickly walk me through the reasoning for the runtime check again please.
To start with, you have a TLB miss handler for when partial hardware
tablewalk is used (only the final page table level is looked up in
hardware, so we still need a TLB miss handler to load indirect entries),
and one where that feature is not available. Then you have the "bolted"
variant used by e5500, which is faster than the generic version because
it doesn't have to deal with recursive faults. So far the bolted
version is the only one with DO_KVM.
I posted a patch to add another variant, for e6500-style hardware
tablewalk, which shares the bolted prolog/epilog (besides prolog/epilog
performance, e6500 is incompatible with the IBM tablewalk code for
various reasons). That caused us to have two DO_KVMs for the same
exception type.
-Scott
next prev parent reply other threads:[~2012-09-12 21:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 13:18 [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro Mihai Caraman
2012-09-12 18:56 ` Alexander Graf
2012-09-12 21:38 ` Scott Wood
2012-09-12 21:45 ` Alexander Graf
2012-09-12 21:54 ` Scott Wood [this message]
2012-09-13 12:50 ` Caraman Mihai Claudiu-B02008
2012-09-13 15:02 ` Alexander Graf
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=5051048D.3080309@freescale.com \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mihai.caraman@freescale.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;
as well as URLs for NNTP newsgroup(s).