aboutsummaryrefslogtreecommitdiff
path: root/tests/keys
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>2023-07-06 07:17:38 -0300
committerAlistair Francis <alistair.francis@wdc.com>2023-07-10 22:29:20 +1000
commitb9f822215ee58b57863bc082c322bb88529bd958 (patch)
tree8c5a4a1cd914da1a8b8b53816b4d4ca9339df401 /tests/keys
parenta1be1d9a77a8170822258663e5fb0580f5252536 (diff)
downloadqemu-b9f822215ee58b57863bc082c322bb88529bd958.zip
qemu-b9f822215ee58b57863bc082c322bb88529bd958.tar.gz
qemu-b9f822215ee58b57863bc082c322bb88529bd958.tar.bz2
target/riscv/kvm.c: read/write (cbom|cboz)_blocksize in KVM
If we don't set a proper cbom_blocksize|cboz_blocksize in the FDT the Linux Kernel will fail to detect the availability of the CBOM/CBOZ extensions, regardless of the contents of the 'riscv,isa' DT prop. The FDT is being written using the cpu->cfg.cbom|z_blocksize attributes, so let's expose them as user properties like it is already done with TCG. This will also require us to determine proper blocksize values during init() time since the FDT is already created during realize(). We'll take a ride in kvm_riscv_init_multiext_cfg() to do it. Note that we don't need to fetch both cbom and cboz blocksizes every time: check for their parent extensions (icbom and icboz) and only read the blocksizes if needed. In contrast with cbom|z_blocksize properties from TCG, the user is not able to set any value that is different from the 'host' value when running KVM. KVM can be particularly harsh dealing with it: a ENOTSUPP can be thrown for the mere attempt of executing kvm_set_one_reg() for these 2 regs. Hopefully we don't need to call kvm_set_one_reg() for these regs. We'll check if the user input matches the host value in kvm_cpu_set_cbomz_blksize(), the set() accessor for both blocksize properties. We'll fail fast since it's already known to not be supported. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230706101738.460804-21-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'tests/keys')
0 files changed, 0 insertions, 0 deletions