From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Tim Wiederhake" <twiederh@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH 2/4] target/i386: Translate feature_word_info to xml
Date: Wed, 6 Sep 2023 16:33:29 +0200 [thread overview]
Message-ID: <fb2ee793-9b1b-93b9-5228-6c205be1b374@linaro.org> (raw)
In-Reply-To: <37b9e75a96188b6e2693ae6b2128e7a31b76bb82.camel@redhat.com>
On 21/8/23 11:54, Tim Wiederhake wrote:
> On Thu, 2023-08-17 at 12:07 +0100, Daniel P. Berrangé wrote:
>> On Fri, Aug 11, 2023 at 03:50:09PM +0200, Tim Wiederhake wrote:
>>> This is the data file that will be used to generate the C code.
>>> All information, including the comments, is preserved.
>>>
>>> Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
>>> ---
>>> target/i386/feature_word_info.xml | 1607
>>> +++++++++++++++++++++++++++++
>>> 1 file changed, 1607 insertions(+)
>>> create mode 100644 target/i386/feature_word_info.xml
>>>
>>> diff --git a/target/i386/feature_word_info.xml
>>> b/target/i386/feature_word_info.xml
>>> new file mode 100644
>>> index 0000000000..ff741b9f5a
>>> --- /dev/null
>>> +++ b/target/i386/feature_word_info.xml
>>> @@ -0,0 +1,1607 @@
>>> +<feature_words>
>>
>> I think adding data formats based on XML is pretty undesirable
>> for QEMU. AFAIK, the only place we've used XML is where we
>> needed to have interoperability with an external tool.
>>
>> Can we not just do this using JSON instead, which would avoid
>> the need to write python parsing code as we can directly load
>> it into a python object.
>>
>> With regards,
>> Daniel
>
> I thought of json as well, but that has some drawbacks over xml here:
>
> Integer values, e.g. "eax=0x80000008", would need to be stored in
> either decimal form or as a string. Both solutions are not desirable in
> my opinion.
>
> Additionally, preserving the comments is not as straight forward.
> Comments in json are a non-standard extension and not understood by all
> parsers, e.g. python's json module. This would require some regex-
> preprocessing that comes with its own problems.
Would YAML work?
next prev parent reply other threads:[~2023-09-06 14:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 13:50 [PATCH 0/4] Generate x86 cpu features Tim Wiederhake
2023-08-11 13:50 ` [PATCH 1/4] target/i386: Split out feature_word_info Tim Wiederhake
2023-09-06 14:34 ` Philippe Mathieu-Daudé
2023-08-11 13:50 ` [PATCH 2/4] target/i386: Translate feature_word_info to xml Tim Wiederhake
2023-08-17 11:07 ` Daniel P. Berrangé
2023-08-21 9:54 ` Tim Wiederhake
2023-09-06 14:33 ` Philippe Mathieu-Daudé [this message]
2023-09-06 14:21 ` Michael S. Tsirkin
2023-08-11 13:50 ` [PATCH 3/4] target/i386: Format feature_word_info.c.inc Tim Wiederhake
2023-08-11 13:50 ` [PATCH 4/4] target/i386: Autogenerate feature_word_info.c.inc Tim Wiederhake
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=fb2ee793-9b1b-93b9-5228-6c205be1b374@linaro.org \
--to=philmd@linaro.org \
--cc=berrange@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=twiederh@redhat.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).