]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
x86: mmio: Add opcode to error message when failing to parse
authorHenning Schild <henning.schild@siemens.com>
Wed, 27 Aug 2014 12:12:09 +0000 (14:12 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Thu, 28 Aug 2014 06:36:29 +0000 (08:36 +0200)
In case the MMIO parser fails to decode the instruction print the
failing instruction with the error message.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/mmio.c

index e7df96187a3c8b329f2b1c4314f3baddda9e5c25..20748288cee8631986c045514f9d970b8159be46 100644 (file)
@@ -49,9 +49,9 @@ struct mmio_access mmio_parse(unsigned long pc,
                              bool is_write)
 {
        struct mmio_access access = { .inst_len = 0 };
+       union opcode op[3] = { };
        bool has_rex_r = false;
        bool does_write;
-       union opcode op[3];
        u8 *page = NULL;
 
 restart:
@@ -137,7 +137,8 @@ error_nopage:
        goto error;
 
 error_unsupported:
-       panic_printk("FATAL: unsupported instruction\n");
+       panic_printk("FATAL: unsupported instruction (0x%02x 0x%02x 0x%02x)\n",
+                    op[0].raw, op[1].raw, op[2].raw);
        goto error;
 
 error_inconsitent: