* [Qemu-devel] [PATCH v2 1.7] pc: get rid of builtin pvpanic for "-M pc-1.5"
@ 2013-11-06 10:42 Paolo Bonzini
2013-11-06 13:51 ` Eric Blake
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2013-11-06 10:42 UTC (permalink / raw)
To: qemu-devel; +Cc: anthony
This causes two slight backwards-incompatibilities between "-M pc-1.5"
and 1.5's "-M pc":
(1) a fw_cfg file is removed with this patch. This is only a problem
if migration stops the virtual machine exactly during fw_cfg enumeration.
(2) after migration, a VM created without an explicit "-device pvpanic"
will stop reporting panics to management.
The first problem only occurs if migration is done at a very, very
early point (and I'm not sure it can happen in practice for reasonable-size
VMs, since it will likely take more time to send the RAM to destination,
than it will take for BIOS to scan fw_cfg).
The second problem only occurs if the guest panics _and_ has a guest
driver _and_ management knows to look at the crash event, so it is
mostly theoretical at this point in time.
Thus keep the code simple, and pretend it was never broken.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/pc_piix.c | 7 -------
hw/i386/pc_q35.c | 7 -------
hw/misc/pvpanic.c | 5 -----
include/hw/i386/pc.h | 1 -
4 files changed, 20 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 4fdb7b6..b3d94bd 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -57,7 +57,6 @@ static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
-static bool has_pvpanic;
static bool has_pci_info = true;
static bool has_acpi_build = true;
@@ -229,10 +228,6 @@ static void pc_init1(QEMUMachineInitArgs *args,
if (pci_enabled) {
pc_pci_device_init(pci_bus);
}
-
- if (has_pvpanic) {
- pvpanic_init(isa_bus);
- }
}
static void pc_init_pci(QEMUMachineInitArgs *args)
@@ -250,13 +245,11 @@ static void pc_compat_1_6(QEMUMachineInitArgs *args)
static void pc_compat_1_5(QEMUMachineInitArgs *args)
{
pc_compat_1_6(args);
- has_pvpanic = true;
}
static void pc_compat_1_4(QEMUMachineInitArgs *args)
{
pc_compat_1_5(args);
- has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ);
}
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 4c191d3..2e315f7 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -47,7 +47,6 @@
/* ICH9 AHCI has 6 ports */
#define MAX_SATA_PORTS 6
-static bool has_pvpanic;
static bool has_pci_info = true;
static bool has_acpi_build = true;
@@ -216,10 +215,6 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
if (pci_enabled) {
pc_pci_device_init(host_bus);
}
-
- if (has_pvpanic) {
- pvpanic_init(isa_bus);
- }
}
static void pc_compat_1_6(QEMUMachineInitArgs *args)
@@ -232,13 +227,11 @@ static void pc_compat_1_6(QEMUMachineInitArgs *args)
static void pc_compat_1_5(QEMUMachineInitArgs *args)
{
pc_compat_1_6(args);
- has_pvpanic = true;
}
static void pc_compat_1_4(QEMUMachineInitArgs *args)
{
pc_compat_1_5(args);
- has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ);
}
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index 226e298..5377fee 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -112,11 +112,6 @@ static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp)
isa_register_ioport(d, &s->io, s->ioport);
}
-void pvpanic_init(ISABus *bus)
-{
- isa_create_simple(bus, TYPE_ISA_PVPANIC_DEVICE);
-}
-
#define PVPANIC_IOPORT_PROP "ioport"
uint16_t pvpanic_port(void)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 03cc0ba..1f39b27 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -235,7 +235,6 @@ void pc_system_firmware_init(MemoryRegion *rom_memory,
bool isapc_ram_fw);
/* pvpanic.c */
-void pvpanic_init(ISABus *bus);
uint16_t pvpanic_port(void);
/* e820 types */
--
1.8.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1.7] pc: get rid of builtin pvpanic for "-M pc-1.5"
2013-11-06 10:42 [Qemu-devel] [PATCH v2 1.7] pc: get rid of builtin pvpanic for "-M pc-1.5" Paolo Bonzini
@ 2013-11-06 13:51 ` Eric Blake
0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2013-11-06 13:51 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: anthony
[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]
On 11/06/2013 03:42 AM, Paolo Bonzini wrote:
> This causes two slight backwards-incompatibilities between "-M pc-1.5"
> and 1.5's "-M pc":
>
> (1) a fw_cfg file is removed with this patch. This is only a problem
> if migration stops the virtual machine exactly during fw_cfg enumeration.
>
> (2) after migration, a VM created without an explicit "-device pvpanic"
> will stop reporting panics to management.
>
> The first problem only occurs if migration is done at a very, very
> early point (and I'm not sure it can happen in practice for reasonable-size
> VMs, since it will likely take more time to send the RAM to destination,
> than it will take for BIOS to scan fw_cfg).
>
> The second problem only occurs if the guest panics _and_ has a guest
> driver _and_ management knows to look at the crash event, so it is
> mostly theoretical at this point in time.
>
> Thus keep the code simple, and pretend it was never broken.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/i386/pc_piix.c | 7 -------
> hw/i386/pc_q35.c | 7 -------
> hw/misc/pvpanic.c | 5 -----
> include/hw/i386/pc.h | 1 -
> 4 files changed, 20 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-06 13:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 10:42 [Qemu-devel] [PATCH v2 1.7] pc: get rid of builtin pvpanic for "-M pc-1.5" Paolo Bonzini
2013-11-06 13:51 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).