From nobody Mon Feb 9 06:00:47 2026 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.zohomail.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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152996656840919.4785507281847; Mon, 25 Jun 2018 15:42:48 -0700 (PDT) Received: from localhost ([::1]:49589 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXaC7-0007M7-9o for importer@patchew.org; Mon, 25 Jun 2018 18:42:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXaAn-0006jr-GQ for qemu-devel@nongnu.org; Mon, 25 Jun 2018 18:41:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXaAm-0000iY-9b for qemu-devel@nongnu.org; Mon, 25 Jun 2018 18:41:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32732) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fXaAm-0000gg-1U for qemu-devel@nongnu.org; Mon, 25 Jun 2018 18:41:24 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 37DBF8763C; Mon, 25 Jun 2018 22:41:23 +0000 (UTC) Received: from localhost (ovpn-116-16.gru2.redhat.com [10.97.116.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48260308BDA2; Mon, 25 Jun 2018 22:41:20 +0000 (UTC) From: Eduardo Habkost To: Peter Maydell , qemu-devel@nongnu.org Date: Mon, 25 Jun 2018 19:41:10 -0300 Message-Id: <20180625224110.5147-3-ehabkost@redhat.com> In-Reply-To: <20180625224110.5147-1-ehabkost@redhat.com> References: <20180625224110.5147-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 25 Jun 2018 22:41:23 +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] [PULL 2/2] hw/i386: Deprecate the machine types pc-0.10 and pc-0.11 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: Thomas Huth , Eduardo Habkost , "Michael S. Tsirkin" , Markus Armbruster , Paolo Bonzini 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" From: Thomas Huth The oldest machine type which is still used in a still maintained distro is a pc-0.12 based machine type in RHEL6, so everything that is older than pc-0.12 should not be used anymore. Thus let's deprecate pc-0.10 and pc-0.11 so that we can finally remove them in a future release. Reviewed-by: Eduardo Habkost Signed-off-by: Thomas Huth Message-Id: <1529917512-10528-1-git-send-email-thuth@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Eduardo Habkost --- include/hw/boards.h | 3 +++ hw/i386/pc_piix.c | 1 + vl.c | 10 ++++++++-- qemu-doc.texi | 5 +++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index ef7457f5dd..79069ddcbe 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -107,6 +107,8 @@ typedef struct { =20 /** * MachineClass: + * @deprecation_reason: If set, the machine is marked as deprecated. The + * string should provide some clear information about what to use inste= ad. * @max_cpus: maximum number of CPUs supported. Default: 1 * @min_cpus: minimum number of CPUs supported. Default: 1 * @default_cpus: number of CPUs instantiated if none are specified. Defau= lt: 1 @@ -166,6 +168,7 @@ struct MachineClass { char *name; const char *alias; const char *desc; + const char *deprecation_reason; =20 void (*init)(MachineState *state); void (*reset)(void); diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index e9b6f064fb..d357907b0b 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -956,6 +956,7 @@ static void pc_i440fx_0_11_machine_options(MachineClass= *m) { pc_i440fx_0_12_machine_options(m); m->hw_version =3D "0.11"; + m->deprecation_reason =3D "use a newer machine type instead"; SET_MACHINE_COMPAT(m, PC_COMPAT_0_11); } =20 diff --git a/vl.c b/vl.c index a37dfe4684..d26f19b06d 100644 --- a/vl.c +++ b/vl.c @@ -2560,8 +2560,9 @@ static gint machine_class_cmp(gconstpointer a, gconst= pointer b) if (mc->alias) { printf("%-20s %s (alias of %s)\n", mc->alias, mc->desc, mc= ->name); } - printf("%-20s %s%s\n", mc->name, mc->desc, - mc->is_default ? " (default)" : ""); + printf("%-20s %s%s%s\n", mc->name, mc->desc, + mc->is_default ? " (default)" : "", + mc->deprecation_reason ? " (deprecated)" : ""); } } =20 @@ -4263,6 +4264,11 @@ int main(int argc, char **argv, char **envp) =20 configure_accelerator(current_machine); =20 + if (!qtest_enabled() && machine_class->deprecation_reason) { + error_report("Machine type '%s' is deprecated: %s", + machine_class->name, machine_class->deprecation_reaso= n); + } + /* * Register all the global properties, including accel properties, * machine properties, and user-specified ones. diff --git a/qemu-doc.texi b/qemu-doc.texi index 282bc3dc35..16fcb47901 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2943,6 +2943,11 @@ support page sizes < 4096 any longer. =20 @section System emulator machines =20 +@subsection pc-0.10 and pc-0.11 (since 3.0) + +These machine types are very old and likely can not be used for live migra= tion +from old QEMU versions anymore. A newer machine type should be used instea= d. + @section Device options =20 @subsection Block device options --=20 2.18.0.rc1.1.g3f1ff2140