From nobody Sun Apr 28 15:01:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1494399007531226.39486875650312; Tue, 9 May 2017 23:50:07 -0700 (PDT) Received: from localhost ([::1]:40679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8LRk-0000N8-Ux for importer@patchew.org; Wed, 10 May 2017 02:50:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8LQx-0008Si-Pp for qemu-devel@nongnu.org; Wed, 10 May 2017 02:49:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8LQu-00054n-KI for qemu-devel@nongnu.org; Wed, 10 May 2017 02:49:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d8LQu-000535-E5 for qemu-devel@nongnu.org; Wed, 10 May 2017 02:49:12 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 832A380471; Wed, 10 May 2017 06:49:09 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 83D9C88530; Wed, 10 May 2017 06:49:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 832A380471 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=thuth@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 832A380471 From: Thomas Huth To: qemu-devel@nongnu.org Date: Wed, 10 May 2017 08:48:53 +0200 Message-Id: <1494398933-8366-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 10 May 2017 06:49:09 +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] hw/i386: Deprecate the machines pc-0.10 to pc-0.15 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" , kraxel@redhat.com, Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=3D0 (i.e. where QEMU copies ROM BARs directly to low memory). So let's start with a deprecation message for the old 0.xx 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: I've decided to print the warning for all pc-0.* machine types, but that of course doesn't mean that we also have to remove them all at once 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=3D0), as discussed in the "Deprecating old machine types" mail thread recently. hw/i386/pc_piix.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 9f102aa..16e2fb7 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" @@ -85,6 +86,12 @@ static void pc_init1(MachineState *machine, MemoryRegion *rom_memory; ram_addr_t lowmem; =20 + if (!qtest_enabled() && !strncmp(MACHINE_CLASS(pcmc)->name, "pc-0.", 5= )) { + error_report("Machine type '%s' is deprecated, " + "please use a newer type instead", + MACHINE_CLASS(pcmc)->name); + } + /* * Calculate ram split, for memory below and above 4G. It's a bit * complicated for backward compatibility reasons ... --=20 1.8.3.1