[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/19] i386: hvf: abort on decoding error
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 15/19] i386: hvf: abort on decoding error |
Date: |
Wed, 20 Dec 2017 19:03:54 +0100 |
Rather than unsupported situations, some VM_PANIC calls actually
are caused by internal errors. Convert them to just abort.
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/hvf/hvf.c | 2 +-
target/i386/hvf/x86_emu.c | 10 ++++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index c87b20fa35..f7fe258a3a 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -762,7 +762,7 @@ int hvf_vcpu_exec(CPUState *cpu)
env->hvf_emul->fetch_rip = rip;
decode_instruction(env, &decode);
- VM_PANIC_ON(ins_len != decode.len);
+ assert(ins_len == decode.len);
exec_instruction(env, &decode);
store_regs(cpu);
diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86_emu.c
index ff146fa81b..5ecabc4230 100644
--- a/target/i386/hvf/x86_emu.c
+++ b/target/i386/hvf/x86_emu.c
@@ -146,7 +146,7 @@ addr_t read_reg(CPUX86State *env, int reg, int size)
case 8:
return env->hvf_emul->regs[reg].rrx;
default:
- VM_PANIC_ON("read_reg size");
+ abort();
}
return 0;
}
@@ -167,7 +167,7 @@ void write_reg(CPUX86State *env, int reg, addr_t val, int
size)
env->hvf_emul->regs[reg].rrx = val;
break;
default:
- VM_PANIC_ON("write_reg size");
+ abort();
}
}
@@ -189,8 +189,7 @@ addr_t read_val_from_reg(addr_t reg_ptr, int size)
val = *(uint64_t *)reg_ptr;
break;
default:
- VM_PANIC_ON_EX(1, "read_val: Unknown size %d\n", size);
- break;
+ abort();
}
return val;
}
@@ -211,8 +210,7 @@ void write_val_to_reg(addr_t reg_ptr, addr_t val, int size)
*(uint64_t *)reg_ptr = val;
break;
default:
- VM_PANIC("write_val: Unknown size\n");
- break;
+ abort();
}
}
--
2.14.3
- [Qemu-devel] [PULL 07/19] i386: hvf: implement vga dirty page tracking, (continued)
- [Qemu-devel] [PULL 07/19] i386: hvf: implement vga dirty page tracking, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 05/19] i386: hvf: implement hvf_get_supported_cpuid, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 08/19] i386: hvf: refactor event injection code for hvf, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 03/19] i386: hvf: fix licensing issues; isolate task handling code (GPL v2-only), Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 09/19] i386: hvf: inject General Protection Fault when vmexit through vmcall, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 06/19] i386: refactor KVM cpuid code so that it applies to hvf as well, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 11/19] i386: hvf: header cleanup, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 10/19] i386: hvf: move all hvf files in the same directory, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 14/19] i386: hvf: remove ZERO_INIT macro, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 13/19] i386: hvf: remove more dead emulator code, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 15/19] i386: hvf: abort on decoding error,
Paolo Bonzini <=
- [Qemu-devel] [PULL 19/19] i386: hvf: cleanup x86_gen.h, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 16/19] i386: hvf: simplify flag handling, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 12/19] i386: hvf: unify register enums between HVF and the rest, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 17/19] i386: hvf: remove addr_t, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 18/19] i386: hvf: remove VM_PANIC from "in", Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 02/19] i386: hvf: add code base from Google's QEMU repository, Paolo Bonzini, 2017/12/20
- Re: [Qemu-devel] [PULL 00/19] Initial support for Hypervisor.framework, no-reply, 2017/12/20
- Re: [Qemu-devel] [PULL 00/19] Initial support for Hypervisor.framework, Peter Maydell, 2017/12/20
- Re: [Qemu-devel] [PULL 00/19] Initial support for Hypervisor.framework, no-reply, 2017/12/20