qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Bolognani <abologna@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: peter.maydell@linaro.org, richard.henderson@linaro.org,
	qemu-devel@nongnu.org, armbru@redhat.com, qemu-arm@nongnu.org,
	alex.bennee@linaro.org, Dave.Martin@arm.com
Subject: Re: [Qemu-devel] [PATCH 00/13] target/arm/kvm: enable SVE in guests
Date: Tue, 14 May 2019 18:03:09 +0200	[thread overview]
Message-ID: <1857a74ef586a4e41d93b184498cfcf6c2927cec.camel@redhat.com> (raw)
In-Reply-To: <20190514125329.mi7ctaoujirwm6gs@kamzik.brq.redhat.com>

On Tue, 2019-05-14 at 14:53 +0200, Andrew Jones wrote:
> On Tue, May 14, 2019 at 02:29:51PM +0200, Andrea Bolognani wrote:
> > Since we expect management applications to use QMP to discover what
> > vector lengths are supported and then provide an explicit map, I
> > think it's fair to say that the ability to specify a single maximum
> > vector length is going to be exclusively used as a convenience for
> > command line users.
> > 
> > In that light, I think it would be reasonable for the usage to look
> > along the lines of
> > 
> >   -cpu host,sve-vl-map=0xd # machine-friendly variant
> >   -cpu max,sve-vl-max=512  # user-friendly variant
> 
> We already have sve-max-vq, so I'm not sure we want to rename it.

Oh, I didn't realize that was the case. And of course it already
takes a number of quadwords as argument, I suppose? That's pretty
unfortunate :(

Perhaps we could consider deprecating it in favor of a user-friendly
variant that's actually suitable for regular humans, like the one I
suggest above?

[...]
> > > Dave points out
> > > we may want to reduce the list to a single set and then add flags
> > > to indicate what can be done with it in order to derive other sets.
> > > What do you think about that?
> > 
> > So right now all that can be done is truncating the list by removing
> > an arbitrary number of elements from the end, right? Eg. if you have
> > [ 1, 2, 4 ] you can use either that or [ 1, 2 ] or [ 1 ]. But in the
> > future you might also be able to mask single elements in the middle
> > of the list, thus enabling things like [ 1, 4 ].
> > 
> > That doesn't sound very complicated to support in libvirt, though I
> > have to say that I'm not a big fan of this proposal because as far as
> > I can see it basically means implementing the very same logic twice,
> > once in QEMU and then once more in libvirt.
> 
> So if big tables of bits aren't a problem for QMP queries, then I'll
> just leave the design as it is.

I thought about it a bit more and perhaps the simplified design is
better after all.

Whatever the interface looks like on the QEMU side, we're going to
want to offer libvirt users two options for configuring vector
lengths: listing all desired vector lengths explicitly (basically
sev-vl-map but more verbose and readable) and providing just the
biggest desired vector length (like in sev-max-vq).

In the latter case, we'll want to expand the user-provided value
into an explicit list anyway in order to guarantee guest ABI
stability, and doing so when a single bitmap has been obtained via
QMP seems like it would be more manageable.

Sorry for the flip-flop, but after all isn't this exactly what
upstream design discussion is supposed to be all about? :)

[...]
> > If the size of the bitmap on the KVM side is 512 bits, why don't we
> > just make it that size on the QEMU side too from the start?
> 
> I'd still only want to input 64-bits on the command line, otherwise
> we get into inputting arrays, which isn't easy. KVM's interface is
> meant for expansion, but it won't be using most of those bits for
> quite some time either.

I'm probably missing something entirely obvious, but couldn't you
just have a single, possibly fairly massive (up to 128 hex digits if
I'm not mistaken) value on the command line and just work with that
one, no arrays necessary?

-- 
Andrea Bolognani / Red Hat / Virtualization



  reply	other threads:[~2019-05-14 16:17 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-12  8:36 [Qemu-devel] [PATCH 00/13] target/arm/kvm: enable SVE in guests Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 01/13] target/arm/kvm64: fix error returns Andrew Jones
2019-06-05  7:20   ` Auger Eric
2019-05-12  8:36 ` [Qemu-devel] [PATCH 02/13] update-linux-headers: Add sve_context.h to asm-arm64 Andrew Jones
2019-06-05  7:21   ` Auger Eric
2019-06-05  7:30     ` Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 03/13] HACK: linux header update Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 04/13] target/arm/kvm: Move the get/put of fpsimd registers out Andrew Jones
2019-06-05  7:15   ` Auger Eric
2019-06-05  7:27     ` Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 05/13] target/arm/kvm: Add kvm_arch_get/put_sve Andrew Jones
2019-05-13 12:31   ` Dave Martin
2019-05-13 13:55     ` Andrew Jones
2019-05-13 15:31       ` Dave Martin
2019-05-13 15:40         ` Peter Maydell
2019-05-13 16:05           ` Dave Martin
2019-05-13 16:40     ` Richard Henderson
2019-05-13 18:14       ` Andrew Jones
2019-05-13 18:31         ` Richard Henderson
2019-05-13 12:43   ` Dave Martin
2019-05-13 14:07     ` Andrew Jones
2019-05-13 14:39       ` Dave Martin
2019-05-13 16:58         ` Richard Henderson
2019-05-14  9:10           ` Dave Martin
2019-05-12  8:36 ` [Qemu-devel] [PATCH 06/13] target/arm/kvm: max cpu: Enable SVE when available Andrew Jones
2019-06-05  9:09   ` Auger Eric
2019-06-05 11:04     ` Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 07/13] target/arm/kvm: max cpu: Allow sve max vector length setting Andrew Jones
2019-05-13 17:19   ` Richard Henderson
2019-05-13 18:19     ` Andrew Jones
2019-06-06  8:30   ` Auger Eric
2019-06-06  8:53     ` Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 08/13] target/arm/monitor: Add query-sve-vector-lengths Andrew Jones
2019-05-13 16:12   ` Markus Armbruster
2019-05-13 18:30     ` Andrew Jones
2019-05-14  5:32       ` Markus Armbruster
2019-05-12  8:36 ` [Qemu-devel] [PATCH 09/13] target/arm/kvm: Export kvm_arm_get_sve_vls Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 10/13] target/arm/monitor: kvm: only return valid sve vector sets Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 11/13] target/arm/cpu64: max cpu: Introduce sve-vls-map Andrew Jones
2019-05-13 11:26   ` Dave Martin
2019-05-13 12:30     ` Andrew Jones
2019-05-13 12:41       ` Dave Martin
2019-05-13 12:57         ` Andrew Jones
2019-05-13 13:12           ` Dave Martin
2019-05-13 13:45             ` Andrew Jones
2019-05-13 14:35               ` Dave Martin
2019-05-13 15:25   ` Markus Armbruster
2019-05-13 18:31     ` Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 12/13] target/arm/kvm: max cpu: Add support for sve-vls-map Andrew Jones
2019-05-12  8:36 ` [Qemu-devel] [PATCH 13/13] target/arm/kvm: host " Andrew Jones
2019-05-13 15:37   ` Markus Armbruster
2019-05-13 18:33     ` Andrew Jones
2019-05-13  9:32 ` [Qemu-devel] [PATCH 00/13] target/arm/kvm: enable SVE in guests Andrea Bolognani
2019-05-13 11:15   ` Dave Martin
2019-05-13 12:38     ` Andrew Jones
2019-05-13 12:50       ` Dave Martin
2019-05-13 12:36   ` Andrew Jones
2019-05-14 12:29     ` Andrea Bolognani
2019-05-14 12:53       ` Andrew Jones
2019-05-14 16:03         ` Andrea Bolognani [this message]
2019-05-14 20:14           ` Richard Henderson
2019-05-15  8:03             ` Andrea Bolognani
2019-05-15 11:14               ` Dave Martin
2019-05-15 11:28                 ` Andrea Bolognani
2019-05-15 12:47                   ` Dave Martin
2019-05-15  9:15           ` Andrew Jones
2019-05-13  9:52 ` Peter Maydell
2019-05-13 12:43   ` Andrew Jones
2019-05-13 18:46 ` Richard Henderson
2019-05-13 19:16   ` Andrew Jones
2019-05-14  9:05   ` Peter Maydell

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=1857a74ef586a4e41d93b184498cfcf6c2927cec.camel@redhat.com \
    --to=abologna@redhat.com \
    --cc=Dave.Martin@arm.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=drjones@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).