qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2
@ 2017-07-12  8:22 Thomas Huth
  2017-07-12 13:31 ` Gerd Hoffmann
                   ` (4 more replies)
  0 siblings, 5 replies; 37+ messages in thread
From: Thomas Huth @ 2017-07-12  8:22 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Michael S. Tsirkin, Eduardo Habkost
  Cc: Richard Henderson, Marcel Apfelbaum, Igor Mammedov, Gerd Hoffmann

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

^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2017-07-14 16:34 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12  8:22 [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2 Thomas Huth
2017-07-12 13:31 ` Gerd Hoffmann
2017-07-12 14:51 ` Eduardo Habkost
2017-07-12 15:17   ` Michael S. Tsirkin
2017-07-12 20:15     ` Eduardo Habkost
2017-07-12 20:31       ` Michael S. Tsirkin
2017-07-12 20:56         ` Eduardo Habkost
2017-07-12 22:27           ` Michael S. Tsirkin
2017-07-13  0:23             ` Laszlo Ersek
2017-07-13  0:45               ` Michael S. Tsirkin
2017-07-13  0:47               ` Michael S. Tsirkin
2017-07-13 15:17               ` Eduardo Habkost
2017-07-13 15:34                 ` Laszlo Ersek
2017-07-13 22:41                 ` Michael S. Tsirkin
2017-07-14 15:40                   ` Eduardo Habkost
2017-07-13 15:24       ` Eric Blake
2017-07-12 15:45   ` Markus Armbruster
2017-07-12 17:48     ` Eduardo Habkost
2017-07-12 15:04 ` Daniel P. Berrange
2017-07-12 16:00   ` Thomas Huth
2017-07-12 16:12     ` Daniel P. Berrange
2017-07-12 16:23       ` Thomas Huth
2017-07-12 16:32         ` Daniel P. Berrange
2017-07-12 16:23       ` Paolo Bonzini
2017-07-12 16:29         ` Daniel P. Berrange
2017-07-12 20:37           ` Eduardo Habkost
2017-07-13 23:14           ` Michael S. Tsirkin
2017-07-14 16:33             ` Eduardo Habkost
2017-07-12 20:26   ` Eduardo Habkost
2017-07-13  0:30 ` Laszlo Ersek
2017-07-13  0:47   ` Michael S. Tsirkin
2017-07-13  1:02     ` Laszlo Ersek
2017-07-13  1:00 ` Michael S. Tsirkin
2017-07-13 15:20   ` Eduardo Habkost
2017-07-13 23:04     ` Michael S. Tsirkin
2017-07-14  5:37       ` Thomas Huth
2017-07-14  9:50       ` Gerd Hoffmann

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).