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 <th...@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