From nobody Tue May 7 03:06:17 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.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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 152868853171159.879197883636266; Sun, 10 Jun 2018 20:42:11 -0700 (PDT) Received: from localhost ([::1]:46281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSDiU-0005l6-6q for importer@patchew.org; Sun, 10 Jun 2018 23:42:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSDhe-0005Rl-QA for qemu-devel@nongnu.org; Sun, 10 Jun 2018 23:41:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSDhb-0006u0-MU for qemu-devel@nongnu.org; Sun, 10 Jun 2018 23:41:10 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37046 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fSDhb-0006tc-HT for qemu-devel@nongnu.org; Sun, 10 Jun 2018 23:41:07 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89C244022905 for ; Mon, 11 Jun 2018 03:41:06 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-61.ams2.redhat.com [10.36.116.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 614D31002968; Mon, 11 Jun 2018 03:41:05 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Paolo Bonzini Date: Mon, 11 Jun 2018 05:41:04 +0200 Message-Id: <1528688464-17289-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 11 Jun 2018 03:41:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 11 Jun 2018 03:41:06 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH] 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: Eduardo Habkost 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" The oldest machine type which is still used in a maintained distribution 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. Signed-off-by: Thomas Huth --- This is based on a patch that I already sent in 2017. But back then, we were still in progress of discussing our deprecation policies (e.g. auto- matic deprecation for old machine types), and there was no clear consensus whether we should deprecate 0.10 - 0.11, all 0.x or even up to version 1.2. After some iterations and too much discussion, I've forgotten about this patch. Anyway, I think we agreed that at least 0.10 and 0.11 can certainly be removed nowadays, so let's finally get at least those two machine types marked as deprecated! If that works fine and we will finally have removed these two types in v3.2, we can resume the discussion about newer machine types afterwards. =20 hw/i386/pc_piix.c | 2 ++ include/hw/boards.h | 1 + qemu-doc.texi | 5 +++++ vl.c | 9 +++++++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3d81136..fa61dc3 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -955,6 +955,8 @@ 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_msg =3D "Old and unsupported machine version, " + "use a newer machine type instead."; SET_MACHINE_COMPAT(m, PC_COMPAT_0_11); } =20 diff --git a/include/hw/boards.h b/include/hw/boards.h index ef7457f..e1bd25f 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -166,6 +166,7 @@ struct MachineClass { char *name; const char *alias; const char *desc; + const char *deprecation_msg; =20 void (*init)(MachineState *state); void (*reset)(void); diff --git a/qemu-doc.texi b/qemu-doc.texi index 2effe66..2a597d6 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2965,6 +2965,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 life-migra= tion +from old QEMU versions anymore. A newer machine type should be used instea= d. + @section Block device options =20 @subsection "backing": "" (since 2.12.0) diff --git a/vl.c b/vl.c index 0603171..096814c 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_msg ? " (deprecated)" : ""); } } =20 @@ -3952,6 +3953,10 @@ int main(int argc, char **argv, char **envp) } =20 machine_class =3D select_machine(); + if (machine_class->deprecation_msg) { + error_report("Machine type '%s' is deprecated: %s", + machine_class->name, machine_class->deprecation_msg); + } =20 set_memory_options(&ram_slots, &maxram_size, machine_class); =20 --=20 1.8.3.1