From: Andrea Bolognani <abologna@redhat.com>
To: Andrew Jones <drjones@redhat.com>,
qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, richard.henderson@linaro.org,
armbru@redhat.com, alex.bennee@linaro.org, Dave.Martin@arm.com
Subject: Re: [Qemu-devel] [PATCH 00/13] target/arm/kvm: enable SVE in guests
Date: Mon, 13 May 2019 11:32:46 +0200 [thread overview]
Message-ID: <9f57bfa56715b3128c1823150457ddb866e6054c.camel@redhat.com> (raw)
In-Reply-To: <20190512083624.8916-1-drjones@redhat.com>
On Sun, 2019-05-12 at 10:36 +0200, Andrew Jones wrote:
[...]
> CPU type | accel | sve-max-vq | sve-vls-map
> -------------------------------------------
> 1) max | tcg | $MAX_VQ | $VLS_MAP
> 2) max | kvm | $MAX_VQ | $VLS_MAP
> 3) host | kvm | N/A | $VLS_MAP
>
> Where for (1) $MAX_VQ sets the maximum vq and smaller vqs are
> all supported when $VLS_MAP is zero, or when the vqs are selected
> in $VLS_MAP.
I'm a bit confused by the nomenclature here. VL clearly stands for
Vector Length, but what does VQ stand for? You seem to be using the
two terms pretty much interchangeably throughout the cover letter.
[...]
> There is never any need to provide both properties, but if both
> are provided then they are checked for consistency.
I would personally just error out when both are provided.
> The QMP query returns a list of valid vq lists. For example, if
> a guest can use vqs 1, 2, 3, and 4, then the following list will
> be returned
>
> [ [ 1 ], [ 1, 2 ], [ 1, 2, 3 ], [ 1, 2, 3, 4 ] ]
>
> Another example might be 1, 2, 4, as the architecture states 3
> is optional. In that case the list would be
>
> [ [ 1 ], [ 1, 2 ], [ 1, 2, 4 ] ]
I think the proposed QMP command is problematic, because it reports
the valid vector lengths for either KVM or TCG based on which
accelerator is currently enabled: it should report all information
at all times instead, similarly to how query-gic-capabilities does
it.
[...]
> And now for what might be a bit more controversial; how we input
> the valid vector set with sve-vls-map. Well, sve-vls-map is a
> 64-bit bitmap, which is admittedly not user friendly and also not
> the same size as KVM's vls bitmap (which is 8 64-bit words). Here's
> the justification:
>
> 1) We want to use the QEMU command line in order for the information
> to be migrated without needing to add more VM state.
> 2) It's not easy/pretty to input arrays on the QEMU command line.
> 3) We already need to use the QMP query to get a valid set, which
> isn't user friendly either, meaning we're already in libvirt
> territory.
> 4) A 64-bit map (supporting up to 8192-bit vectors) is likely big
> enough for quite some time (currently KVM and TCG only support
> 2048-bit vectors).
> 5) If user friendliness is needed more than migratability then
> the 'max' cpu type can be used with the sve-max-vq property.
> 6) It's possible to probe the full valid vector set from the
> command line by using something like sve-vls-map=0xffff and
> then, when it fails, the error message will state the correct
> map, e.g. 0xb.
I don't have a problem with having to use a bitmap internally,
though libvirt will clearly want to expose a more approachable
interface to users.
However, QMP reporting the information in the current format means
we'd have to build an additional parser on top of the bitmap handling
and conversion routines we'll clearly need to make this work; plus it
just feels weird that the information reported by QMP can't be used
on the command line without going through some tranformation first.
Wouldn't it make more sense to both accept and report bitmaps?
--
Andrea Bolognani / Red Hat / Virtualization
next prev parent reply other threads:[~2019-05-13 9:33 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 ` Andrea Bolognani [this message]
2019-05-13 11:15 ` [Qemu-devel] [PATCH 00/13] target/arm/kvm: enable SVE in guests 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
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=9f57bfa56715b3128c1823150457ddb866e6054c.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).