[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 10/14] target/arm/kvm64: Add kvm_arch_get/put
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 10/14] target/arm/kvm64: Add kvm_arch_get/put_sve |
Date: |
Thu, 27 Jun 2019 13:26:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 6/27/19 12:59 PM, Dave Martin wrote:
>> It's a shame that these slices exist at all. It seems like the kernel could
>> use the negotiated max sve size to grab the data all at once.
>
> The aim here was to be forwards compatible while fitting within the
> existing ABI.
>
> The ABI doesn't allow variable-sized registers, and if the vq can
> someday grow above 16 then the individual registers could become pretty
> big.
The ABI doesn't appear to have fixed sized data blocks. Since that's the case,
it didn't seem to me that variable sized blocks was so different, given that
the actual size is constrained by the hardware on which we're running.
And if VQ does grow large, then do we really want oodles of syscalls in order
to transfer the data for each register? With the 9 bits reserved for this
field, we could require a maximum of 1024 syscalls to transfer the whole
register set.
> It's for QEMU to choose, but does it actually matter what byteorder you
> store a Z-reg or P-reg in? Maybe the byteswap isn't really needed.
I think the only sensible order for the kernel is that in which LDR/STR itself
saves the data. Which is a byte stream.
Within QEMU, it has so far made sense to keep the data in 64-bit hunks in
host-endian order. That's how the AdvSIMD code was written originally, and it
turned out to be easy enough to continue that for SVE.
Which does mean that if we want to pass data to the kernel as the
aforementioned byte stream that a big-endian host does need to bswap the data
in 64-bit hunks.
> I don't know how this works when migrating from a little-endian to a
> big-endian host or vice-versa (or if that is even supported...)
The data is stored canonically within the vmsave, so such migrations are
supposed to work.
r~
- Re: [Qemu-devel] [PATCH v2 08/14] target/arm/kvm64: Fix error returns, (continued)
Re: [Qemu-devel] [PATCH v2 10/14] target/arm/kvm64: Add kvm_arch_get/put_sve, Auger Eric, 2019/06/27
[Qemu-devel] [PATCH v2 11/14] target/arm/kvm64: max cpu: Enable SVE when available, Andrew Jones, 2019/06/21
[Qemu-devel] [PATCH v2 14/14] target/arm/kvm: host cpu: Add support for sve<vl-bits> properties, Andrew Jones, 2019/06/21