From patchwork Wed May 10 15:34:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 9720095 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1AD5A6035D for ; Wed, 10 May 2017 15:35:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CE7828610 for ; Wed, 10 May 2017 15:35:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0013428618; Wed, 10 May 2017 15:35:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A19C828610 for ; Wed, 10 May 2017 15:35:55 +0000 (UTC) Received: from localhost ([::1]:43343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8Tec-0001Yx-MD for patchwork-qemu-devel@patchwork.kernel.org; Wed, 10 May 2017 11:35:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8Te2-0001Ye-2q for qemu-devel@nongnu.org; Wed, 10 May 2017 11:35:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8Tdz-0004nv-Fk for qemu-devel@nongnu.org; Wed, 10 May 2017 11:35:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57890) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d8Tdz-0004nd-AV for qemu-devel@nongnu.org; Wed, 10 May 2017 11:35:15 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B473C059722; Wed, 10 May 2017 15:35:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4B473C059722 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=thuth@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4B473C059722 Received: from thh440s.redhat.com (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 128794D9E0; Wed, 10 May 2017 15:34:53 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Date: Wed, 10 May 2017 17:34:53 +0200 Message-Id: <1494430493-23119-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 10 May 2017 15:35:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] hw/i386: Deprecate the machines pc-0.10 to pc-1.2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , dgilbert@redhat.com, kraxel@redhat.com, Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP We don't want to carry along old machine types forever. If we are able to remove the pc machines up to 0.13 one day for example, this would allow us to eventually kill the code for rombar=0 (i.e. where QEMU copies ROM BARs directly to low memory). Everything up to pc-1.2 is also known to have issues with migration. So let's start with a deprecation message for the old machine types so that the (hopefully) few users of these old systems start switching over to newer machine types instead. Signed-off-by: Thomas Huth --- Note: Even if we mark all these old machines as deprecated, this ofcourse doesn't mean that we also have to remove them all at once later when we decide to finally really remove some. We could then also start by removing 0.10 and 0.11 only, for example (since there should really be no users left for these), or only up to 0.13 (to be able to kill rombar=0). v2: - Deprecate machines up to pc-1.2 hw/i386/pc_piix.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 9f102aa..aace378 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -38,6 +38,7 @@ #include "sysemu/kvm.h" #include "hw/kvm/clock.h" #include "sysemu/sysemu.h" +#include "sysemu/qtest.h" #include "hw/sysbus.h" #include "sysemu/arch_init.h" #include "sysemu/block-backend.h" @@ -84,6 +85,14 @@ static void pc_init1(MachineState *machine, MemoryRegion *pci_memory; MemoryRegion *rom_memory; ram_addr_t lowmem; + char *mc_name = MACHINE_CLASS(pcmc)->name; + + /* Machines pc-0.10 up to pc-1.2 are considered as deprecated */ + if (!qtest_enabled() && (!strncmp(mc_name, "pc-0.", 5) + || (!strncmp(mc_name, "pc-1.", 5) && mc_name[5] < '3'))) { + error_report("Machine type '%s' is deprecated, " + "please use a newer type instead", mc_name); + } /* * Calculate ram split, for memory below and above 4G. It's a bit