Hi, This version includes most of the fixes and changes suggested in the v6 review [1].
Unfortunately we weren't able to proceed with Drew's suggestion to avoid assigning 'name' and 'description' during runtime in patch 11 because some Gitlab runners (clang-user and tsan-build) complained about misa_ext_info_arr[] not being a compiler-time constant. I documented this 'clang' situation in patch 11 commit msg. The change to use __builtin_ctz() instead of ctz32() was kept because it's clearer to use the MISA bits (RVA, RVC ...) as input for MISA_EXT_INFO() than doing a calculation with (letter - 'A'). All other suggestions from both Drew and Phil were implemented. 'sudo' references from commit msgs were removed from patches 1 and 2 as suggested by Michael (R-bs were kept). Series based on top of Alistair's riscv-to-apply.next. Patches missing review: 11, 12 Changes from v6: - patches 1 and 2: removed 'sudo' references from commit msgs - patch 11: - use __builtin_ctz() instead of ctz32() in MISA_EXT_INFO - renamed getter to riscv_get_misa_ext_description() - do input/output validation in both getters - patch 12: - use object_property_find() to skip the property if it already exists - v6 link: https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg06353.html [1] https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg06353.html Daniel Henrique Barboza (20): target/riscv: skip features setup for KVM CPUs hw/riscv/virt.c: skip 'mmu-type' FDT if satp mode not set target/riscv/cpu.c: restrict 'mvendorid' value target/riscv/cpu.c: restrict 'mimpid' value target/riscv/cpu.c: restrict 'marchid' value target/riscv: use KVM scratch CPUs to init KVM properties target/riscv: read marchid/mimpid in kvm_riscv_init_machine_ids() target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs linux-headers: Update to v6.4-rc1 target/riscv/kvm.c: init 'misa_ext_mask' with scratch CPU target/riscv/cpu: add misa_ext_info_arr[] target/riscv: add KVM specific MISA properties target/riscv/kvm.c: update KVM MISA bits target/riscv/kvm.c: add multi-letter extension KVM properties target/riscv/cpu.c: add satp_mode properties earlier target/riscv/cpu.c: remove priv_ver check from riscv_isa_string_ext() target/riscv/cpu.c: create KVM mock properties target/riscv: update multi-letter extension KVM properties target/riscv/kvm.c: add kvmconfig_get_cfg_addr() helper target/riscv/kvm.c: read/write (cbom|cboz)_blocksize in KVM hw/riscv/virt.c | 14 +- include/standard-headers/linux/const.h | 2 +- include/standard-headers/linux/virtio_blk.h | 18 +- .../standard-headers/linux/virtio_config.h | 6 + include/standard-headers/linux/virtio_net.h | 1 + linux-headers/asm-arm64/kvm.h | 33 ++ linux-headers/asm-riscv/kvm.h | 53 +- linux-headers/asm-riscv/unistd.h | 9 + linux-headers/asm-s390/unistd_32.h | 1 + linux-headers/asm-s390/unistd_64.h | 1 + linux-headers/asm-x86/kvm.h | 3 + linux-headers/linux/const.h | 2 +- linux-headers/linux/kvm.h | 12 +- linux-headers/linux/psp-sev.h | 7 + linux-headers/linux/userfaultfd.h | 17 +- target/riscv/cpu.c | 341 ++++++++++-- target/riscv/cpu.h | 7 +- target/riscv/kvm.c | 499 +++++++++++++++++- target/riscv/kvm_riscv.h | 1 + 19 files changed, 940 insertions(+), 87 deletions(-) -- 2.41.0