qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/19] target/riscv, KVM: fixes and enhancements
@ 2023-06-22 13:56 Daniel Henrique Barboza
  2023-06-22 13:56 ` [PATCH v3 01/19] target/riscv: skip features setup for KVM CPUs Daniel Henrique Barboza
                   ` (18 more replies)
  0 siblings, 19 replies; 31+ messages in thread
From: Daniel Henrique Barboza @ 2023-06-22 13:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, alistair.francis, bmeng, liweiwei, zhiwei_liu, palmer,
	ajones, Daniel Henrique Barboza

Hi,

In this new version the highlight is the changes in how we're making
riscv_isa_string_ext() work with KVM CPUs. A new patch (patch 15) was
added where we eliminate an unneeded priv_check from the function,
sparing us from having to assign an env->priv_ver for the 'host' CPU
type.

Then, in patch 16, instead of making changes with tcg/kvm extensions
lists and so on, we're avoiding the problem altogether with mock/no-op
properties. We go through all the extension flags (boolean values only)
from riscv_cpu_extensions[] and, if the option wasn't already created by
the KVM driver, we assign a no-op set() callback to it. This allows the
user to use any property, kvm-only or otherwise, and the KVM guest can
safely ignore it. 

Last but not the least, patch 11 was changed as requested by Andrew in
v2.

Series is rebased on top of Alistair's riscv-to-apply.next.

Patches missing review: 11, 15, 16.

Changes from v2:
- patch 11:
  - renamed misa_ext_infos[] to misa_ext_info_arr[]
  - mention that misa_ext_cfgs[] also needs update in cpu.h
  - misa_ext_info_arr[] moved to cpu.c to be used as extern
- patch 13:
  - amended commit msg to clarify that all extensions, MISA Or multi-letter,
    should be enabled and advertised by KVM
  - fixed comment in kvm_riscv_update_cpu_misa_ext()
- patch 15 (new):
  - remove priv_ver check from riscv_isa_string_ext()
- patch 16 (former 15):
  - reworked: instead of reworking riscv_isa_string_ext(), add mock KVM
    properties
- v2 link: https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg02790.html

Daniel Henrique Barboza (19):
  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: 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                            | 282 ++++++++--
 target/riscv/cpu.h                            |  11 +-
 target/riscv/kvm.c                            | 499 +++++++++++++++++-
 target/riscv/kvm_riscv.h                      |   1 +
 19 files changed, 891 insertions(+), 81 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2023-06-26 17:28 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-22 13:56 [PATCH v3 00/19] target/riscv, KVM: fixes and enhancements Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 01/19] target/riscv: skip features setup for KVM CPUs Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 02/19] hw/riscv/virt.c: skip 'mmu-type' FDT if satp mode not set Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 03/19] target/riscv/cpu.c: restrict 'mvendorid' value Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 04/19] target/riscv/cpu.c: restrict 'mimpid' value Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 05/19] target/riscv/cpu.c: restrict 'marchid' value Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 06/19] target/riscv: use KVM scratch CPUs to init KVM properties Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 07/19] target/riscv: read marchid/mimpid in kvm_riscv_init_machine_ids() Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 08/19] target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 09/19] linux-headers: Update to v6.4-rc1 Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 10/19] target/riscv/kvm.c: init 'misa_ext_mask' with scratch CPU Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 11/19] target/riscv/cpu: add misa_ext_info_arr[] Daniel Henrique Barboza
2023-06-23  9:30   ` Andrew Jones
2023-06-22 13:56 ` [PATCH v3 12/19] target/riscv: add KVM specific MISA properties Daniel Henrique Barboza
2023-06-23  9:38   ` Andrew Jones
2023-06-23 14:14     ` Daniel Henrique Barboza
2023-06-24  7:32       ` Andrew Jones
2023-06-25 22:38         ` Daniel Henrique Barboza
2023-06-26  6:24   ` Andrew Jones
2023-06-22 13:56 ` [PATCH v3 13/19] target/riscv/kvm.c: update KVM MISA bits Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 14/19] target/riscv/kvm.c: add multi-letter extension KVM properties Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 15/19] target/riscv/cpu.c: remove priv_ver check from riscv_isa_string_ext() Daniel Henrique Barboza
2023-06-23  9:46   ` Andrew Jones
2023-06-22 13:56 ` [PATCH v3 16/19] target/riscv/cpu.c: create KVM mock properties Daniel Henrique Barboza
2023-06-23  9:58   ` Andrew Jones
2023-06-23 14:28     ` Daniel Henrique Barboza
2023-06-24  7:41       ` Andrew Jones
2023-06-26 17:27         ` Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 17/19] target/riscv: update multi-letter extension KVM properties Daniel Henrique Barboza
2023-06-22 13:56 ` [PATCH v3 18/19] target/riscv/kvm.c: add kvmconfig_get_cfg_addr() helper Daniel Henrique Barboza
2023-06-22 13:57 ` [PATCH v3 19/19] target/riscv/kvm.c: read/write (cbom|cboz)_blocksize in KVM Daniel Henrique Barboza

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).