All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH 0/2] Fix TOC value in exception handler
@ 2016-04-19 17:26 ` Laurent Vivier
  0 siblings, 0 replies; 18+ messages in thread
From: Laurent Vivier @ 2016-04-19 17:26 UTC (permalink / raw)
  To: kvm, kvm-ppc; +Cc: drjones, thuth, dgibson, pbonzini, Laurent Vivier

As noticed by Thomas, if the TOC pointer (r2) is corrupted,
the code from the exception table cannot call the common exception handler
function.

This series tries to fix that by calling call_handler without using
the TOC pointer but a pointer to the function stored at an absolute
address in memory (as SLOF does), and then by restoring the value of
r2 before calling the user registered exception handler.

An easy way to to compute the TOC address seems to use directly the value
of the load address used by QEMU instead of computing it from the PC.

Laurent Vivier (2):
  powerpc: use well known kernel start address
  powerpc: restore TOC pointer

 powerpc/boot_rom.S |  3 ++-
 powerpc/cstart64.S | 23 +++++++++++++++++++----
 powerpc/spapr.h    |  6 ++++++
 3 files changed, 27 insertions(+), 5 deletions(-)
 create mode 100644 powerpc/spapr.h

-- 
2.5.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-04-20 10:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-04-20 10:28       ` Thomas Huth

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.