From: Paolo Bonzini <pbonzini@redhat.com>
To: "Zheng, Lv" <lv.zheng@intel.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Richard Henderson <rth@twiddle.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Shannon Zhao <shannon.zhao@linaro.org>
Cc: Lv Zheng <zetalog@gmail.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT revision changes
Date: Wed, 17 Aug 2016 13:42:37 +0200 [thread overview]
Message-ID: <96278727-ab59-8aee-3f2e-33d2d0711523@redhat.com> (raw)
In-Reply-To: <1AE640813FDE7649BE1B193DEA596E883BC0DC9D@SHSMSX101.ccr.corp.intel.com>
On 15/08/2016 03:42, Zheng, Lv wrote:
> Hi, Paolo
>
>> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
>> Subject: Re: [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT
>> revision changes
>>
>>
>>
>> On 11/08/2016 11:36, Lv Zheng wrote:
>>>
>>> - error_setg(errp, "'-acpitable' requires one of 'data' or 'file'");
>>> + val = qemu_opt_get((QemuOpts *)opts, "fadt");
>>> + if (val) {
>>> + unsigned long rev;
>>
>> Don't use qemu_opt_get. Add the field to AcpiTableOptions in
>> qapi-schema.json, and then use hdrs->has_fadt, hdrs->fadt.
>
>
> 1. If I do so, users may be confused when only -acpitable fadt=3 is
> specified (no user tables are provided), qemu may exit because of
> "data or file option missing".
> 2. If we doesn't want qemu exit in the above case, code in
> acpi_table_add() will be too complicated.
> 3. If I put fadt into AcpiTableOptions in the schema,
> hdrs->has_fadt/hdrs->fadt will become 2 more useless options
> (just like hders->file/hdrs->data/hdrs->has_file/hdrs->has_data,
> see comments of acpi_table_install()) passed to acpi_table_install().
>
> That's why I enhanced -acpitable to convert it into an option with 3
> mandatory sub-options:
> -acpitable data/file ....
> -acpitable fadt ....
But most arguments of -acpitable (e.g. oem_id) apply to FADT as well.
In fact "-acpitable fadt=3" perhaps could be written as "-acpitable fadt,rev=3".
So one possibility if you add '*fadt': 'bool' to AcpiTableOptions is the following:
if (hdrs->has_file + hdrs->has_data + hdrs->has_fadt > 1) {
error_setg(&err, "'-acpitable' requires one of 'data' or 'file' or 'fadt'");
goto out;
}
if (hdrs->has_fadt && hdrs->fadt) {
fadt_options = hdrs;
return;
}
Paolo
prev parent reply other threads:[~2016-08-17 11:42 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 7:28 [Qemu-devel] [PATCH] ACPI: Add -acpifadt to allow FADT revision changes Lv Zheng
2016-08-08 7:35 ` no-reply
2016-08-08 8:16 ` [Qemu-devel] [PATCH v2] " Lv Zheng
2016-08-08 9:01 ` Paolo Bonzini
2016-08-09 21:06 ` Zheng, Lv
2016-08-08 11:25 ` [Qemu-devel] [PATCH] " Igor Mammedov
2016-08-11 9:06 ` [Qemu-devel] [PATCH v3 0/2] ACPI: Add FADT revision support Lv Zheng
2016-08-11 9:06 ` [Qemu-devel] [PATCH v3 1/2] ACPI: Cleanup -acpitable option code Lv Zheng
2016-08-11 9:06 ` [Qemu-devel] [PATCH v3 2/2] ACPI: Add -acpitable fadt= to allow FADT revision changes Lv Zheng
2016-08-11 9:11 ` [Qemu-devel] [PATCH v3 0/2] ACPI: Add FADT revision support no-reply
2016-08-11 9:12 ` [Qemu-devel] [PATCH v4 " Lv Zheng
2016-08-11 9:12 ` [Qemu-devel] [PATCH v4 1/2] ACPI: Cleanup -acpitable option code Lv Zheng
2016-08-11 9:17 ` Zheng, Lv
2016-08-11 9:12 ` [Qemu-devel] [PATCH v4 2/2] ACPI: Add -acpitable fadt= to allow FADT revision changes Lv Zheng
2016-08-11 9:36 ` [Qemu-devel] [PATCH v5 0/2] ACPI: Add FADT revision support Lv Zheng
2016-08-11 9:36 ` [Qemu-devel] [PATCH v5 1/2] ACPI: Cleanup -acpitable option code Lv Zheng
2016-08-12 14:51 ` Igor Mammedov
2016-08-15 5:23 ` Zheng, Lv
2016-08-11 9:36 ` [Qemu-devel] [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT revision changes Lv Zheng
2016-08-11 12:42 ` Igor Mammedov
2016-08-12 0:47 ` Zheng, Lv
2016-08-12 3:07 ` Michael S. Tsirkin
2016-08-15 1:33 ` Zheng, Lv
2016-08-15 1:47 ` Michael S. Tsirkin
2016-08-15 2:18 ` Zheng, Lv
2016-08-15 2:23 ` Michael S. Tsirkin
2016-08-15 3:18 ` Zheng, Lv
2016-08-12 14:55 ` Igor Mammedov
2016-08-15 4:18 ` Zheng, Lv
2016-08-12 14:59 ` Paolo Bonzini
2016-08-15 1:42 ` Zheng, Lv
2016-08-17 11:42 ` Paolo Bonzini [this message]
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=96278727-ab59-8aee-3f2e-33d2d0711523@redhat.com \
--to=pbonzini@redhat.com \
--cc=crosthwaite.peter@gmail.com \
--cc=imammedo@redhat.com \
--cc=lv.zheng@intel.com \
--cc=mst@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=shannon.zhao@linaro.org \
--cc=zetalog@gmail.com \
/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).