pci, pc, pvpanic bug fixes
This fixes strange pvpanic behaviour: you had to pause to let VM continue (and potentially reboot on panic if enabled). This also fixes two bugs reported by Andreas. One is a long-standing bug exposed by recent pci changes, the other affects old piix machine types and was caused by recent acpi changes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQEcBAABAgAGBQJSd6RWAAoJECgfDbjSjVRpCH0H/1j25vllaM7S5cnW6Ilk81Uz U/OA93R3p8A+UmZlcWaNPbAb0GvBLreUXz8QIdyTaGH3v714W5xctPR9cGRlSdlH ZNd02LAvmui9zFYizWFyUjWqorpTHUBQeeAENZN0CmTUYprI0xEMQ8L/WG0zVal+ JjsQElg2+LSg70g9u8oekooGcjhmuMbD/HkaYmKQTni1GBc8ITmkPVuNn/aqWIIF oERjE5BoTba22773/PHchU3gT7IKEL+gX/q1RJNghP9V3uQH3u1euLWxUgSGh1sz BnY8Fu3oROssLZAQ82C+DgTOo/OWCtzKV6Ai60wfDNGrjM214rWG8FZjGKwUWxc= =/YQA -----END PGP SIGNATURE----- Merge tag 'for_anthony' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu pci, pc, pvpanic bug fixes This fixes strange pvpanic behaviour: you had to pause to let VM continue (and potentially reboot on panic if enabled). This also fixes two bugs reported by Andreas. One is a long-standing bug exposed by recent pci changes, the other affects old piix machine types and was caused by recent acpi changes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
commit
6d0a373542
7
exec.c
7
exec.c
@ -1741,7 +1741,12 @@ void address_space_destroy_dispatch(AddressSpace *as)
|
||||
static void memory_map_init(void)
|
||||
{
|
||||
system_memory = g_malloc(sizeof(*system_memory));
|
||||
memory_region_init(system_memory, NULL, "system", INT64_MAX);
|
||||
|
||||
assert(TARGET_PHYS_ADDR_SPACE_BITS <= 64);
|
||||
|
||||
memory_region_init(system_memory, NULL, "system",
|
||||
TARGET_PHYS_ADDR_SPACE_BITS == 64 ?
|
||||
UINT64_MAX : (0x1ULL << TARGET_PHYS_ADDR_SPACE_BITS));
|
||||
address_space_init(&address_space_memory, system_memory, "memory");
|
||||
|
||||
system_io = g_malloc(sizeof(*system_io));
|
||||
|
@ -368,9 +368,6 @@ static inline void gdb_continue(GDBState *s)
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
s->running_state = 1;
|
||||
#else
|
||||
if (runstate_check(RUN_STATE_GUEST_PANICKED)) {
|
||||
runstate_set(RUN_STATE_DEBUG);
|
||||
}
|
||||
if (!runstate_needs_reset()) {
|
||||
vm_start();
|
||||
}
|
||||
|
@ -309,6 +309,7 @@ static void pc_init_pci_1_2(QEMUMachineInitArgs *args)
|
||||
static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
|
||||
{
|
||||
has_pci_info = false;
|
||||
has_acpi_build = false;
|
||||
disable_kvm_pv_eoi();
|
||||
enable_compat_apic_id_mode();
|
||||
pc_init1(args, 1, 0);
|
||||
@ -317,6 +318,7 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
|
||||
static void pc_init_isa(QEMUMachineInitArgs *args)
|
||||
{
|
||||
has_pci_info = false;
|
||||
has_acpi_build = false;
|
||||
if (!args->cpu_model) {
|
||||
args->cpu_model = "486";
|
||||
}
|
||||
|
6
vl.c
6
vl.c
@ -638,9 +638,8 @@ static const RunStateTransition runstate_transitions_def[] = {
|
||||
{ RUN_STATE_WATCHDOG, RUN_STATE_RUNNING },
|
||||
{ RUN_STATE_WATCHDOG, RUN_STATE_FINISH_MIGRATE },
|
||||
|
||||
{ RUN_STATE_GUEST_PANICKED, RUN_STATE_PAUSED },
|
||||
{ RUN_STATE_GUEST_PANICKED, RUN_STATE_RUNNING },
|
||||
{ RUN_STATE_GUEST_PANICKED, RUN_STATE_FINISH_MIGRATE },
|
||||
{ RUN_STATE_GUEST_PANICKED, RUN_STATE_DEBUG },
|
||||
|
||||
{ RUN_STATE_MAX, RUN_STATE_MAX },
|
||||
};
|
||||
@ -686,8 +685,7 @@ int runstate_is_running(void)
|
||||
bool runstate_needs_reset(void)
|
||||
{
|
||||
return runstate_check(RUN_STATE_INTERNAL_ERROR) ||
|
||||
runstate_check(RUN_STATE_SHUTDOWN) ||
|
||||
runstate_check(RUN_STATE_GUEST_PANICKED);
|
||||
runstate_check(RUN_STATE_SHUTDOWN);
|
||||
}
|
||||
|
||||
StatusInfo *qmp_query_status(Error **errp)
|
||||
|
Loading…
Reference in New Issue
Block a user