[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command l
From: |
Alexey Kardashevskiy |
Subject: |
Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments |
Date: |
Tue, 12 Nov 2013 10:49:58 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/12/2013 01:25 AM, Igor Mammedov wrote:
> On Mon, 11 Nov 2013 13:41:05 +0100
> Andreas Färber <address@hidden> wrote:
>
>> Am 11.11.2013 08:44, schrieb Alexey Kardashevskiy:
>>> This converts +foo/-foo to "foo=on"/"foo=off" respectively when
>>> QEMU parser is used for the command line options.
>>>
>>> "-cpu" parsers in x86 and other architectures should be unaffected
>>> by this change.
>>>
>>> Signed-off-by: Alexey Kardashevskiy <address@hidden>
>>> ---
>>> util/qemu-option.c | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/util/qemu-option.c b/util/qemu-option.c
>>> index efcb5dc..6c8667c 100644
>>> --- a/util/qemu-option.c
>>> +++ b/util/qemu-option.c
>>> @@ -890,6 +890,12 @@ static int opts_do_parse(QemuOpts *opts, const char
>>> *params,
>>> if (strncmp(option, "no", 2) == 0) {
>>> memmove(option, option+2, strlen(option+2)+1);
>>> pstrcpy(value, sizeof(value), "off");
>>> + } else if (strncmp(option, "-", 1) == 0) {
>>> + memmove(option, option+1, strlen(option+1)+1);
>>> + pstrcpy(value, sizeof(value), "off");
>>> + } else if (strncmp(option, "+", 1) == 0) {
>>> + memmove(option, option+1, strlen(option+1)+1);
>>> + pstrcpy(value, sizeof(value), "on");
>>> } else {
>>> pstrcpy(value, sizeof(value), "on");
>>> }
>>
>> This looks like an interesting idea! However this is much too big a
>> change to just CC ppc folks on...
>>
>> Jan, I wonder if this might break slirp's hostfwd option?
>>
>> Not sure what other options potentially starting with '-' might be
>> affected. Test cases would be a helpful way of demonstrating that this
>> change does not have undesired side effects.
> on x86 there is several value fixups for compatibility reason and a manual
> value parsing in cpu_x86_parse_featurestr(), so above won't just work there.
What particular x86 CPU option cannot be handled the way as PPC's "VSX" is
handled two patches below? As I see, even static properties will work there
fine.
--
Alexey
- [Qemu-devel] [PATCH v3 0/6] spapr: add "compat" machine option, Alexey Kardashevskiy, 2013/11/11
- [Qemu-devel] [PATCH v3 1/6] cpu: add suboptions support, Alexey Kardashevskiy, 2013/11/11
- [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Alexey Kardashevskiy, 2013/11/11
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Andreas Färber, 2013/11/11
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Igor Mammedov, 2013/11/11
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments,
Alexey Kardashevskiy <=
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Igor Mammedov, 2013/11/12
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Alexey Kardashevskiy, 2013/11/12
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Andreas Färber, 2013/11/12
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Alexey Kardashevskiy, 2013/11/12
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Paolo Bonzini, 2013/11/13
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Igor Mammedov, 2013/11/12
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Alexey Kardashevskiy, 2013/11/12
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Igor Mammedov, 2013/11/13
- Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, Paolo Bonzini, 2013/11/13
[Qemu-devel] [PATCH v3 5/6] bitops: add BITNR macro, Alexey Kardashevskiy, 2013/11/11