From patchwork Mon Nov 4 13:30:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 288188 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ECEF22C00DE for ; Tue, 5 Nov 2013 00:32:00 +1100 (EST) Received: from localhost ([::1]:49925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdKG7-0005Dc-0F for incoming@patchwork.ozlabs.org; Mon, 04 Nov 2013 08:31:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdKFL-0004xr-Hu for qemu-devel@nongnu.org; Mon, 04 Nov 2013 08:31:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdKFC-0002wd-RP for qemu-devel@nongnu.org; Mon, 04 Nov 2013 08:31:11 -0500 Received: from mail-qe0-x233.google.com ([2607:f8b0:400d:c02::233]:40637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdKFC-0002wZ-ML for qemu-devel@nongnu.org; Mon, 04 Nov 2013 08:31:02 -0500 Received: by mail-qe0-f51.google.com with SMTP id q19so4021819qeb.24 for ; Mon, 04 Nov 2013 05:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=omdVv7auZ42kd6ECjIeWm/Ijb6Z1rR/fMu4APP3Js7s=; b=PImKIeyXVyreHp4ob85zxMbiiADtcQR6n81n9VNeGCaw7FO7Pk3Tj5dJ6HsmCWhcr8 ht6Dmk9+d4OJ3kJzeST3AGSFbYYwppaTYXRNoX4j7TpbdvjrbQRmp2gMdzbhCz21WpwT UqFucRMHsl7eQavUPKtFdN3UWLwC/SRIMUhrPzTlLR9dqN1VJJfVnDP+kyl2CPvx8FU0 EwJDKaZB95lcTxuR4QAwfOCKq3SXNwIMSjoI0ZNIfjfobSY8DP2fOFblbV9zKBiBN5xR yYCvhtzQVdkQyk2bAU8iqSE9qbKysRDHb9eOkVH7crDIT5wWpJC0XmBmCbEuQYcWP2Ux Sfjw== X-Received: by 10.224.121.198 with SMTP id i6mr4561010qar.52.1383571862187; Mon, 04 Nov 2013 05:31:02 -0800 (PST) Received: from yakj.usersys.redhat.com (net-37-117-137-113.cust.dsl.vodafone.it. [37.117.137.113]) by mx.google.com with ESMTPSA id r5sm47729844qeh.1.2013.11.04.05.31.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Nov 2013 05:31:01 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 4 Nov 2013 14:30:48 +0100 Message-Id: <1383571848-30518-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::233 Cc: mst@redhat.com Subject: [Qemu-devel] [PATCH 1.7] pc: get rid of builtin pvpanic for "-M pc-1.5" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Eric Blake --- hw/i386/pc_piix.c | 7 ------- hw/i386/pc_q35.c | 7 ------- hw/misc/pvpanic.c | 5 ----- include/hw/i386/pc.h | 3 --- 4 files changed, 22 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index c6042c7..a041e53 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; /* PC hardware initialisation */ @@ -225,10 +224,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) @@ -245,13 +240,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 ca84e1c..593ed2a 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; /* PC hardware initialisation */ @@ -214,10 +213,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) @@ -229,13 +224,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 b64e3bb..4c85906 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); -} - static Property pvpanic_isa_properties[] = { DEFINE_PROP_UINT16("ioport", PVPanicState, ioport, 0x505), DEFINE_PROP_END_OF_LIST(), diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 6083839..f6313b2 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -213,9 +213,6 @@ static inline bool isa_ne2000_init(ISABus *bus, int base, int irq, NICInfo *nd) void pc_system_firmware_init(MemoryRegion *rom_memory, bool isapc_ram_fw); -/* pvpanic.c */ -void pvpanic_init(ISABus *bus); - /* e820 types */ #define E820_RAM 1 #define E820_RESERVED 2