From: Thomas Huth <thuth@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
dgilbert@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] hw/i386: Deprecate the machines pc-0.10 to pc-1.2
Date: Tue, 30 May 2017 13:41:57 +0200 [thread overview]
Message-ID: <ea0b4874-61a7-4ea8-f381-41ebc232ce02@redhat.com> (raw)
In-Reply-To: <20170530130207.249299e7@nial.brq.redhat.com>
On 30.05.2017 13:02, Igor Mammedov wrote:
> On Tue, 30 May 2017 12:35:01 +0200
> Gerd Hoffmann <kraxel@redhat.com> wrote:
>
>> Hi,
>>
>>>> v2:
>>>> - Deprecate machines up to pc-1.2
>>>>
>>>> hw/i386/pc_piix.c | 9 +++++++++
>>>> 1 file changed, 9 insertions(+)
>>>>
>>>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>>>> index 9f102aa..aace378 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"
>>>> @@ -84,6 +85,14 @@ static void pc_init1(MachineState *machine,
>>>> MemoryRegion *pci_memory;
>>>> MemoryRegion *rom_memory;
>>>> ram_addr_t lowmem;
>>>> + char *mc_name = MACHINE_CLASS(pcmc)->name;
>>>> +
>>>> + /* Machines pc-0.10 up to pc-1.2 are considered as deprecated
>>>> */
>>>> + if (!qtest_enabled() && (!strncmp(mc_name, "pc-0.", 5)
>>>> + || (!strncmp(mc_name, "pc-1.", 5) && mc_name[5] < '3'))) {
>>>> + error_report("Machine type '%s' is deprecated, "
>>>> + "please use a newer type instead", mc_name);
>>>> + }
>>>>
>>>> /*
>>>> * Calculate ram split, for memory below and above 4G. It's a
>>>> bit
>>>>
>>>
>>> Ping! Any comments on this version of the patch?
>>
>> Does it make sense to build some infrastructure for this, so we don't
>> have ad-hoc code to print deprecation warnings everywhere?
> we are deprecating incomplete numa mapping but it uses 'obsoleted' word
> somewhere in warning message (in machine_numa_finish_init).
>
> it could be better if if we had error_report_depricated()
> which would add prefix deprecated prefix consistently
> something like: "DEPRECATED: "
I don't mind the exact wording as long as we present a message to the
users to inform them that the interface might get removed soon... But if
you feel that we need to unify all these spots with an
error_report_deprecated() function, feel free to suggest a patch on the
list!
Thomas
next prev parent reply other threads:[~2017-05-30 11:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-10 15:34 [Qemu-devel] [PATCH v2] hw/i386: Deprecate the machines pc-0.10 to pc-1.2 Thomas Huth
2017-05-30 9:23 ` Thomas Huth
2017-05-30 10:35 ` Gerd Hoffmann
2017-05-30 11:02 ` Igor Mammedov
2017-05-30 11:41 ` Thomas Huth [this message]
2017-05-30 11:39 ` Thomas Huth
2017-05-30 14:15 ` Gerd Hoffmann
2017-05-30 14:27 ` Eduardo Habkost
2017-05-30 14:24 ` Michael S. Tsirkin
2017-05-30 14:30 ` Eduardo Habkost
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=ea0b4874-61a7-4ea8-f381-41ebc232ce02@redhat.com \
--to=thuth@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@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).