qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <rth@twiddle.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	kraxel@redhat.com, berrange@redhat.com
Subject: [Qemu-devel] [PATCH] hw/i386: Deprecate the machines pc-0.10 to pc-0.15
Date: Wed, 10 May 2017 08:48:53 +0200	[thread overview]
Message-ID: <1494398933-8366-1-git-send-email-thuth@redhat.com> (raw)

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). 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 <thuth@redhat.com>
---
 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=0), 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;
 
+    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 ...
-- 
1.8.3.1

             reply	other threads:[~2017-05-10  6:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10  6:48 Thomas Huth [this message]
2017-05-10  9:08 ` [Qemu-devel] [PATCH] hw/i386: Deprecate the machines pc-0.10 to pc-0.15 Daniel P. Berrange
2017-05-10 10:05   ` Thomas Huth
2017-05-10 10:31     ` Daniel P. Berrange
2017-05-10 14:47       ` Thomas Huth
2017-05-10 16:15         ` Paolo Bonzini
2017-05-11  7:06           ` Markus Armbruster
2017-05-11  7:21             ` Thomas Huth
2017-05-11  9:30           ` Daniel P. Berrange
2017-05-11 15:10             ` Markus Armbruster
2017-05-12  6:55               ` Thomas Huth
2017-05-10 15:37     ` Markus Armbruster
2017-05-10 15:40       ` Paolo Bonzini
2017-05-10 19:04       ` Dr. David Alan Gilbert
2017-05-11  7:20         ` Markus Armbruster
2017-05-10 14:51   ` Dr. David Alan Gilbert
2017-05-10 15:04     ` Daniel P. Berrange
2017-05-10 15:14       ` Dr. David Alan Gilbert
2017-05-11  7:26         ` Markus Armbruster
2017-05-10 15:05     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494398933-8366-1-git-send-email-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).