On 15.05.19 14:48, Ralf Ramsauer wrote:
Hi Jan,
On 5/15/19 12:02 PM, Jan Kiszka wrote:
From: Jan Kiszka <[email protected]>
Add basic reporting of exceptions that are triggered by an inmate so
that we stop translating all of them into hypervisor-caught triple
faults. Reporting is optional and need to be enabled explicitly by an
inmate via excp_reporting_init().
Signed-off-by: Jan Kiszka <[email protected]>
---
inmates/lib/x86/Makefile | 2 +-
inmates/lib/x86/excp.c | 165 +++++++++++++++++++++++++++++++++++++++
inmates/lib/x86/include/inmate.h | 2 +
3 files changed, 168 insertions(+), 1 deletion(-)
create mode 100644 inmates/lib/x86/excp.c
diff --git a/inmates/lib/x86/Makefile b/inmates/lib/x86/Makefile
index dc017b90..258eed18 100644
--- a/inmates/lib/x86/Makefile
+++ b/inmates/lib/x86/Makefile
@@ -40,7 +40,7 @@ include $(INMATES_LIB)/Makefile.lib
always := lib.a lib32.a
-TARGETS := header.o ioapic.o printk.o setup.o smp.o uart.o int.o
+TARGETS := header.o ioapic.o printk.o setup.o smp.o uart.o int.o excp.o
excp.o is shared across 32 and 64 bit, and uses printk.
- Compiler might produce unsupported instructions in excp.o (as we had
before with SSE/AVX). In this case, the handlers won't help.
- If unsupported, and if we crash early, we also don't know if the
compiler produces SSE instructions for printk.o. So even if we
supress SSE for excp.o, it's very likely that there's some SSE stuff
inside printk.o, which will let us double fail.
That's the classic dilemma: how do you debug a debugger?
This infrastructure is not solving that. It's primarily targeting "application"
faults, i.e. everything that is called from inmate_main. Yes, if we do have any
of the issues you described above, we will continue to triple fault, at latest
on a fault in #DF. You can check that with your SSE scenario.
But if we avoid running into SSE paths under /normal/ conditions prior to
enabling it in early setup, exceptions won't be triggered, printk can look like
as it like to, and all will be fine.
Jan
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/3dcf8dcf-a0fb-0b77-eb0a-a0364a957b0d%40web.de.
For more options, visit https://groups.google.com/d/optout.