From nobody Thu May 2 11:57:07 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149984781907652.85053565940814; Wed, 12 Jul 2017 01:23:39 -0700 (PDT) Received: from localhost ([::1]:51019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVCvp-0006Rl-HK for importer@patchew.org; Wed, 12 Jul 2017 04:23:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVCv4-000698-4W for qemu-devel@nongnu.org; Wed, 12 Jul 2017 04:22:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVCv0-0005FC-41 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 04:22:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46548) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVCuz-0005Em-U6 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 04:22:46 -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 D2BF7369C9; Wed, 12 Jul 2017 08:22:43 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-105.ams2.redhat.com [10.36.116.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF7E569301; Wed, 12 Jul 2017 08:22:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D2BF7369C9 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=thuth@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D2BF7369C9 From: Thomas Huth To: qemu-devel@nongnu.org, Paolo Bonzini , "Michael S. Tsirkin" , Eduardo Habkost Date: Wed, 12 Jul 2017 10:22:33 +0200 Message-Id: <1499847753-8513-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.30]); Wed, 12 Jul 2017 08:22:44 +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 v3] 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: Marcel Apfelbaum , Igor Mammedov , Gerd Hoffmann , 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). 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 Reviewed-by: Eduardo Habkost Reviewed-by: Gerd Hoffmann --- 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=3D0). v3: - Use a more generic approach by introducing a "deprecation_msg" in the MachineClass instead. v2: - Deprecate machines up to pc-1.2 hw/i386/pc_piix.c | 1 + include/hw/boards.h | 1 + vl.c | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 22dbef6..8e70308 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -707,6 +707,7 @@ static void pc_i440fx_1_2_machine_options(MachineClass = *m) { pc_i440fx_1_3_machine_options(m); m->hw_version =3D "1.2.0"; + m->deprecation_msg =3D "Please use a newer machine type instead."; SET_MACHINE_COMPAT(m, PC_COMPAT_1_2); } =20 diff --git a/include/hw/boards.h b/include/hw/boards.h index 76ce021..42a0264 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -112,6 +112,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/vl.c b/vl.c index f7560de..0058d41 100644 --- a/vl.c +++ b/vl.c @@ -4115,6 +4115,10 @@ int main(int argc, char **argv, char **envp) replay_configure(icount_opts); =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