From patchwork Wed Jul 12 08:22:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 9836219 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 931B460363 for ; Wed, 12 Jul 2017 08:23:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B28820373 for ; Wed, 12 Jul 2017 08:23:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EA55285F1; Wed, 12 Jul 2017 08:23:26 +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 063F220373 for ; Wed, 12 Jul 2017 08:23:26 +0000 (UTC) Received: from localhost ([::1]:51017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVCvd-00069P-A7 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Jul 2017 04:23:25 -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) 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 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) 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+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 Reviewed-by: Gerd Hoffmann Reviewed-by: Eduardo Habkost Signed-off-by: Michael S. Tsirkin --- 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). 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 = "1.2.0"; + m->deprecation_msg = "Please use a newer machine type instead."; SET_MACHINE_COMPAT(m, PC_COMPAT_1_2); } 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; 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); machine_class = select_machine(); + if (machine_class->deprecation_msg) { + error_report("Machine type '%s' is deprecated. %s", + machine_class->name, machine_class->deprecation_msg); + } set_memory_options(&ram_slots, &maxram_size, machine_class);