From: Dave Martin <Dave.Martin@arm.com>
To: Andrew Jones <drjones@redhat.com>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Markus Armbruster" <armbru@redhat.com>,
"imammedo@redhat.com" <imammedo@redhat.com>,
"dgilbert@redhat.com" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] How do we do user input bitmap properties?
Date: Wed, 15 May 2019 11:53:55 +0100 [thread overview]
Message-ID: <20190515105352.GP28398@e103592.cambridge.arm.com> (raw)
In-Reply-To: <20190515081520.nazchdnludojzfqe@kamzik.brq.redhat.com>
On Wed, May 15, 2019 at 09:15:20AM +0100, Andrew Jones wrote:
> On Tue, May 14, 2019 at 03:32:13PM +0200, Markus Armbruster wrote:
> > Syntax that can support such growth would be nice.
> >
> > To grow a single unsigned number, we can make it wider (but we don't
> > have infrastructure for numbers wider than 64 bits), or we can add more
> > numbers (but under what name?).
> >
> > Dotted keys syntax could grow more easily, but it's rather awkward.
> >
> > Looking more closely at your "[PATCH 11/13] target/arm/cpu64: max cpu:
> > Introduce sve-vls-map"... your syntax reflects your data structure:
> > property "sve-vls-map" is of type uint64_t, and interpreted as bit set.
> > This data type would have to grow, too.
> >
> > We could make widen the integer property (but we don't have
> > infrastructure for integer properties wider than 64 bits), or we can
> > turn it into an array of integers (compatibility?), or we can add more
> > properties to hold the additional integers (yet another silly way to
> > represent a list/array of integers).
> >
> > I'm not asking you to complicate things just to future-proof this. Just
> > pause and think whether you can pick a data type that's similarly
> > convenient now, and easier to grow.
> >
> > Then pick an external syntax for this data type. You may have to pick a
> > reasonable compromise between ease of implementation and ease of use.
>
> Widening the integer property sounds good to me. I just hadn't thought of
> it (implementation tunnel vision affecting my user interface design).
> Andrea also mentioned that as a possibility in a reply to the series. I
> think we can leave the property as a uint64_t right now and then, when/if
> it needs to expand past 64 bits we can change the property to a string
> and start parsing arbitrarily large integers from it. The internal state,
> 'uint64_t sve_vls_map' can easily be changed to a 'uint64_t sve_vls_map[]'
> at that point too. How's that sound?
Having an arbitrary-width integer should work.
It will suck a bit for the common case of sparse vector length support
0x8000000000000000800000008000808b
(= [ 1, 2, 4, 8, 16, 32, 64, 128 ] quadwords)
Since lengths above 16 quadwords remain theoretical for now though it's
probably OK as a compromise, though.
The most human-compatible approach would be some kind of list
comprehension syntax, but it's hard to justify that adding a whole new
syntax is justified at this point.
[...]
Cheers
---Dave
next prev parent reply other threads:[~2019-05-15 11:00 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 9:28 [Qemu-devel] How do we do user input bitmap properties? Andrew Jones
2019-04-18 9:28 ` Andrew Jones
2019-04-18 9:46 ` Andrew Jones
2019-04-18 9:46 ` Andrew Jones
2019-04-18 10:52 ` Dave Martin
2019-04-18 10:52 ` Dave Martin
2019-04-18 11:28 ` Andrew Jones
2019-04-18 11:28 ` Andrew Jones
2019-04-18 14:03 ` Dave Martin
2019-04-18 14:03 ` Dave Martin
2019-04-18 14:43 ` Andrew Jones
2019-04-18 14:43 ` Andrew Jones
2019-04-18 14:46 ` Dave Martin
2019-04-18 14:46 ` Dave Martin
2019-04-18 14:57 ` Dr. David Alan Gilbert
2019-04-18 14:57 ` Dr. David Alan Gilbert
2019-04-18 11:26 ` Daniel P. Berrangé
2019-04-18 11:26 ` Daniel P. Berrangé
2019-04-18 15:09 ` Andrew Jones
2019-04-18 15:09 ` Andrew Jones
2019-04-18 17:48 ` Markus Armbruster
2019-04-18 17:48 ` Markus Armbruster
2019-05-13 18:42 ` Andrew Jones
2019-05-14 4:54 ` Markus Armbruster
2019-05-14 9:02 ` Andrew Jones
2019-05-14 13:32 ` Markus Armbruster
2019-05-15 8:15 ` Andrew Jones
2019-05-15 10:53 ` Dave Martin [this message]
2019-05-15 10:59 ` Dr. David Alan Gilbert
2019-05-14 14:48 ` Igor Mammedov
2019-05-15 8:18 ` Andrew Jones
2019-05-15 10:52 ` Igor Mammedov
2019-05-15 11:54 ` Andrew Jones
2019-05-23 8:35 ` Andrea Bolognani
2019-05-24 18:24 ` Eduardo Habkost
2019-05-27 16:29 ` Andrea Bolognani
2019-05-27 18:59 ` Eduardo Habkost
2019-05-15 11:00 ` Dave Martin
2019-05-15 11:09 ` Dr. David Alan Gilbert
2019-05-15 12:51 ` Dave Martin
2019-05-15 11:42 ` Andrew Jones
2019-05-15 12:50 ` Dave Martin
2019-05-14 15:28 ` Dave Martin
2019-04-19 0:07 ` Laszlo Ersek
2019-04-19 0:07 ` Laszlo Ersek
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=20190515105352.GP28398@e103592.cambridge.arm.com \
--to=dave.martin@arm.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=drjones@redhat.com \
--cc=imammedo@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).