qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/16] target/riscv: deprecate riscv_cpu_options[]
@ 2024-01-03 17:39 Daniel Henrique Barboza
  2024-01-03 17:39 ` [PATCH v3 01/16] target/riscv/cpu_cfg.h: remove unused fields Daniel Henrique Barboza
                   ` (15 more replies)
  0 siblings, 16 replies; 30+ messages in thread
From: Daniel Henrique Barboza @ 2024-01-03 17:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, alistair.francis, bmeng, liwei1518, zhiwei_liu,
	palmer, ajones, vladimir.isaev, Daniel Henrique Barboza

Hi,

In v2, after Vladimir's feedback, the following major changes were made:

- add default values in riscv_cpu_init() instead of doing gimmicks with
  setters and .set_default_value callbacks. The cost of having defaults
  for non-boolean properties in the parent class is smaller than having
  to deal with duplicated 'if cfg.prop == 0' checks in all setters;

- all properties are now being registered in the 'general_user_opts'
  hash. We were registering only the properties that KVM checks,
  Vladimir pointed out that this isn't consistent, we're making it
  consistent now.

Other smaller changes were made in patches 1, 2, 3 and 7.

Vladimir, due to the amount of changes I didn't add your "Tested-by" in
the patches. You're welcome to give this another try and add a tested-by
again :)

Patches based on riscv-to-apply.next. 

Changes from v2:
- patch 1:
  - remove 'bext_ver' from cpu.h
- patch 2 and 3: switched places
- patch 3 (former 2):
  - added hash implementation from patch 8
  - added pmu_mask setter()
  - pmu-mask and pmu-num can't be changed for vendor CPUs
- patches 4, 5, 6:
  - properties are now being added in the hash
- patch 7:
  - fixed string check in prop_vext_spec_set()
  - vext_spec is now being added in the hash
- patches 8, 9, 11, 12:
  - default values added in riscv_cpu_init()
  - no longer checking for "value == 0" in setters
- v2 link: https://lore.kernel.org/qemu-riscv/20231222122235.545235-1-dbarboza@ventanamicro.com/

Daniel Henrique Barboza (16):
  target/riscv/cpu_cfg.h: remove unused fields
  target/riscv: make riscv_cpu_is_generic() public
  target/riscv: move 'pmu-mask' and 'pmu-num' to riscv_cpu_properties[]
  target/riscv: move 'mmu' to riscv_cpu_properties[]
  target/riscv: move 'pmp' to riscv_cpu_properties[]
  target/riscv: rework 'priv_spec'
  target/riscv: rework 'vext_spec'
  target/riscv: move 'vlen' to riscv_cpu_properties[]
  target/riscv: move 'elen' to riscv_cpu_properties[]
  target/riscv: create finalize_features() for KVM
  target/riscv: move 'cbom_blocksize' to riscv_cpu_properties[]
  target/riscv: move 'cboz_blocksize' to riscv_cpu_properties[]
  target/riscv: remove riscv_cpu_options[]
  target/riscv/cpu.c: move 'mvendorid' to riscv_cpu_properties[]
  target/riscv/cpu.c: move 'mimpid' to riscv_cpu_properties[]
  target/riscv/cpu.c: move 'marchid' to riscv_cpu_properties[]

 target/riscv/cpu.c           | 614 ++++++++++++++++++++++++++++++-----
 target/riscv/cpu.h           |   8 +-
 target/riscv/cpu_cfg.h       |   4 -
 target/riscv/kvm/kvm-cpu.c   |  94 +++---
 target/riscv/kvm/kvm_riscv.h |   1 +
 target/riscv/tcg/tcg-cpu.c   |  63 ----
 6 files changed, 590 insertions(+), 194 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2024-01-05  5:19 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 17:39 [PATCH v3 00/16] target/riscv: deprecate riscv_cpu_options[] Daniel Henrique Barboza
2024-01-03 17:39 ` [PATCH v3 01/16] target/riscv/cpu_cfg.h: remove unused fields Daniel Henrique Barboza
2024-01-05  3:51   ` Alistair Francis
2024-01-03 17:39 ` [PATCH v3 02/16] target/riscv: make riscv_cpu_is_generic() public Daniel Henrique Barboza
2024-01-05  3:51   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 03/16] target/riscv: move 'pmu-mask' and 'pmu-num' to riscv_cpu_properties[] Daniel Henrique Barboza
2024-01-05  3:55   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 04/16] target/riscv: move 'mmu' " Daniel Henrique Barboza
2024-01-05  5:00   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 05/16] target/riscv: move 'pmp' " Daniel Henrique Barboza
2024-01-05  5:03   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 06/16] target/riscv: rework 'priv_spec' Daniel Henrique Barboza
2024-01-05  4:23   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 07/16] target/riscv: rework 'vext_spec' Daniel Henrique Barboza
2024-01-05  5:15   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 08/16] target/riscv: move 'vlen' to riscv_cpu_properties[] Daniel Henrique Barboza
2024-01-05  5:05   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 09/16] target/riscv: move 'elen' " Daniel Henrique Barboza
2024-01-05  5:17   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 10/16] target/riscv: create finalize_features() for KVM Daniel Henrique Barboza
2024-01-05  4:54   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 11/16] target/riscv: move 'cbom_blocksize' to riscv_cpu_properties[] Daniel Henrique Barboza
2024-01-05  4:56   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 12/16] target/riscv: move 'cboz_blocksize' " Daniel Henrique Barboza
2024-01-05  4:57   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 13/16] target/riscv: remove riscv_cpu_options[] Daniel Henrique Barboza
2024-01-05  5:01   ` Alistair Francis
2024-01-03 17:40 ` [PATCH v3 14/16] target/riscv/cpu.c: move 'mvendorid' to riscv_cpu_properties[] Daniel Henrique Barboza
2024-01-03 17:40 ` [PATCH v3 15/16] target/riscv/cpu.c: move 'mimpid' " Daniel Henrique Barboza
2024-01-03 17:40 ` [PATCH v3 16/16] target/riscv/cpu.c: move 'marchid' " 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).