From: Thomas Huth <thuth@redhat.com>
To: David Gibson <dgibson@redhat.com>, Laurent Vivier <lvivier@redhat.com>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, drjones@redhat.com,
pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH 2/2] powerpc: restore TOC pointer
Date: Wed, 20 Apr 2016 10:28:47 +0000 [thread overview]
Message-ID: <571759DF.70202@redhat.com> (raw)
In-Reply-To: <20160420155942.3123963e@voom.fritz.box>
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
On 20.04.2016 07:59, David Gibson wrote:
> On Tue, 19 Apr 2016 19:26:28 +0200
> Laurent Vivier <lvivier@redhat.com> wrote:
>
>> As the TOC pointer can be corrupted by the main program,
>> we must restore it in the exception handler.
>>
>> As we know where we are loaded, we can now compute it easily.
>>
>> To compute it only in the common part of the exception handler
>> (call_handler), store the address of call_handler at an absolute
>> address in memory to be able to call the handler from the exception
>> table (as SLOF does).
>>
>> Reported-by: Thomas Huth <thuth@redhat.com>
>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>
> So, this looks ok as long as the unit tests are built with a single
> TOC.
In case there would be multiple TOCs, the previous exception handler
would not work at all anymore, since it does not set up r2 at all.
So for the current scope of kvm-unit-tests, I think this here is already
enough - we can still extend it later in case we ever need to support
multiple TOCs. So to me, this patch looks fine:
Reviewed-by: Thomas Huth <thuth@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Huth <thuth@redhat.com>
To: David Gibson <dgibson@redhat.com>, Laurent Vivier <lvivier@redhat.com>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, drjones@redhat.com,
pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH 2/2] powerpc: restore TOC pointer
Date: Wed, 20 Apr 2016 12:28:47 +0200 [thread overview]
Message-ID: <571759DF.70202@redhat.com> (raw)
In-Reply-To: <20160420155942.3123963e@voom.fritz.box>
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
On 20.04.2016 07:59, David Gibson wrote:
> On Tue, 19 Apr 2016 19:26:28 +0200
> Laurent Vivier <lvivier@redhat.com> wrote:
>
>> As the TOC pointer can be corrupted by the main program,
>> we must restore it in the exception handler.
>>
>> As we know where we are loaded, we can now compute it easily.
>>
>> To compute it only in the common part of the exception handler
>> (call_handler), store the address of call_handler at an absolute
>> address in memory to be able to call the handler from the exception
>> table (as SLOF does).
>>
>> Reported-by: Thomas Huth <thuth@redhat.com>
>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>
> So, this looks ok as long as the unit tests are built with a single
> TOC.
In case there would be multiple TOCs, the previous exception handler
would not work at all anymore, since it does not set up r2 at all.
So for the current scope of kvm-unit-tests, I think this here is already
enough - we can still extend it later in case we ever need to support
multiple TOCs. So to me, this patch looks fine:
Reviewed-by: Thomas Huth <thuth@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-04-20 10:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 17:26 [kvm-unit-tests PATCH 0/2] Fix TOC value in exception handler Laurent Vivier
2016-04-19 17:26 ` Laurent Vivier
2016-04-19 17:26 ` [kvm-unit-tests PATCH 1/2] powerpc: use well known kernel start address Laurent Vivier
2016-04-19 17:26 ` Laurent Vivier
2016-04-20 2:01 ` David Gibson
2016-04-20 2:01 ` David Gibson
2016-04-20 5:48 ` Laurent Vivier
2016-04-20 5:48 ` Laurent Vivier
2016-04-20 5:55 ` David Gibson
2016-04-20 5:55 ` David Gibson
2016-04-20 10:15 ` Thomas Huth
2016-04-20 10:15 ` Thomas Huth
2016-04-19 17:26 ` [kvm-unit-tests PATCH 2/2] powerpc: restore TOC pointer Laurent Vivier
2016-04-19 17:26 ` Laurent Vivier
2016-04-20 5:59 ` David Gibson
2016-04-20 5:59 ` David Gibson
2016-04-20 10:28 ` Thomas Huth [this message]
2016-04-20 10:28 ` Thomas Huth
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=571759DF.70202@redhat.com \
--to=thuth@redhat.com \
--cc=dgibson@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.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 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.