History log of /openbmc/qemu/target/riscv/ (Results 201 – 225 of 1755)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
5005aed812-Feb-2024 Peter Maydell <peter.maydell@linaro.org>

Merge tag 'pull-maintainer-updates-090224-1' of https://gitlab.com/stsquad/qemu into staging

testing, doc and gdbstub updates:

- add sqlite3 to openSUSE image
- mark CRIS as deprecated
- re-e

Merge tag 'pull-maintainer-updates-090224-1' of https://gitlab.com/stsquad/qemu into staging

testing, doc and gdbstub updates:

- add sqlite3 to openSUSE image
- mark CRIS as deprecated
- re-enable the TCG plugin tests
- use select for semihosting
- implement syscall catching in gdbstub

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmXGZtQACgkQ+9DbCVqe
# KkTegAgAg7Kkd0Pa2cgkPfNPYR5yT4hYurjVSfi/69cOpj/Vadsav4WWFsuUiQMI
# FfKWCNDo5lmNcWIPKgC0oeWVwxal4IhqhO8f9lRIYqg9z4bRkZbdsrvh8J52Q6Xh
# Bu9UAEk5KBGrMfEdsAwHnVDg435c7IGdJZnE/iKBK1aKljS5LOiX1J6ZxrqUoMsJ
# keTAcdXyvs/BIz68c87AHrW/HKO9KKLgHA2n7T/l2N5KJdoa3p8La9py+v1SGUh8
# 6JlDRYR1H16mITS8tm6ZffPqcOpfHXp7DRquu7obVS5+CVTJ2H9w8TICw56rqMg7
# cVnysNLhdS18cMNKD2Jx3zgd5Nq/cg==
# =deHm
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 09 Feb 2024 17:54:28 GMT
# gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-maintainer-updates-090224-1' of https://gitlab.com/stsquad/qemu:
tests/tcg: Add the syscall catchpoint gdbstub test
gdbstub: Implement catching syscalls
gdbstub: Add syscall entry/return hooks
gdbstub: Allow specifying a reason in stop packets
gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way
kconfig: use "select" to enable semihosting
Revert "hw/elf_ops: Ignore loadable segments with zero size"
configure: run plugin TCG tests again
docs: mark CRIS support as deprecated
tests/docker: Add sqlite3 module to openSUSE Leap container

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

show more ...


/openbmc/qemu/.gitlab-ci.d/buildtest.yml
/openbmc/qemu/MAINTAINERS
/openbmc/qemu/accel/kvm/kvm-all.c
/openbmc/qemu/accel/stubs/kvm-stub.c
/openbmc/qemu/block.c
/openbmc/qemu/block/blkio.c
/openbmc/qemu/block/block-backend.c
/openbmc/qemu/block/crypto.c
/openbmc/qemu/block/crypto.h
/openbmc/qemu/block/qcow.c
/openbmc/qemu/block/qcow2.c
/openbmc/qemu/chardev/char-socket.c
/openbmc/qemu/configs/devices/m68k-softmmu/default.mak
/openbmc/qemu/configs/devices/mips-softmmu/common.mak
/openbmc/qemu/configs/devices/nios2-softmmu/default.mak
/openbmc/qemu/configs/devices/riscv32-softmmu/default.mak
/openbmc/qemu/configs/devices/riscv64-softmmu/default.mak
/openbmc/qemu/configs/devices/xtensa-softmmu/default.mak
/openbmc/qemu/configure
/openbmc/qemu/crypto/block-luks.c
/openbmc/qemu/crypto/block.c
/openbmc/qemu/crypto/blockpriv.h
/openbmc/qemu/crypto/cipher-gcrypt.c.inc
/openbmc/qemu/crypto/cipher-nettle.c.inc
/openbmc/qemu/crypto/cipher.c
/openbmc/qemu/docs/about/deprecated.rst
/openbmc/qemu/docs/system/cpu-models-x86-abi.csv
/openbmc/qemu/docs/system/cpu-models-x86.rst.inc
/openbmc/qemu/gdbstub/gdbstub.c
/openbmc/qemu/gdbstub/internals.h
/openbmc/qemu/gdbstub/user-target.c
/openbmc/qemu/gdbstub/user.c
/openbmc/qemu/hw/block/virtio-blk.c
/openbmc/qemu/hw/scsi/scsi-bus.c
/openbmc/qemu/hw/scsi/virtio-scsi.c
/openbmc/qemu/hw/usb/dev-storage-classic.c
/openbmc/qemu/hw/virtio/virtio.c
/openbmc/qemu/include/block/aio.h
/openbmc/qemu/include/crypto/block.h
/openbmc/qemu/include/gdbstub/user.h
/openbmc/qemu/include/hw/elf_ops.h
/openbmc/qemu/include/hw/scsi/scsi.h
/openbmc/qemu/include/hw/virtio/virtio-blk.h
/openbmc/qemu/include/sysemu/kvm.h
/openbmc/qemu/include/sysemu/os-posix.h
/openbmc/qemu/include/sysemu/os-win32.h
/openbmc/qemu/include/user/syscall-trace.h
/openbmc/qemu/io/channel-tls.c
/openbmc/qemu/io/trace-events
/openbmc/qemu/meson.build
/openbmc/qemu/migration/migration.c
/openbmc/qemu/migration/multifd-zlib.c
/openbmc/qemu/migration/multifd-zstd.c
/openbmc/qemu/migration/multifd.c
/openbmc/qemu/migration/multifd.h
/openbmc/qemu/migration/ram.c
/openbmc/qemu/migration/trace-events
/openbmc/qemu/os-posix.c
/openbmc/qemu/qapi/block-core.json
/openbmc/qemu/qapi/crypto.json
/openbmc/qemu/qapi/qmp-dispatch.c
/openbmc/qemu/scripts/cpu-x86-uarch-abi.py
/openbmc/qemu/system/vl.c
/openbmc/qemu/target/m68k/Kconfig
/openbmc/qemu/target/mips/Kconfig
/openbmc/qemu/target/nios2/Kconfig
Kconfig
/openbmc/qemu/target/xtensa/Kconfig
/openbmc/qemu/tests/docker/dockerfiles/opensuse-leap.docker
/openbmc/qemu/tests/lcitool/mappings.yml
/openbmc/qemu/tests/lcitool/projects/qemu.yml
/openbmc/qemu/tests/qemu-iotests/210.out
/openbmc/qemu/tests/qemu-iotests/check
/openbmc/qemu/tests/qemu-iotests/testenv.py
/openbmc/qemu/tests/qemu-iotests/tests/luks-detached-header
/openbmc/qemu/tests/qemu-iotests/tests/luks-detached-header.out
/openbmc/qemu/tests/qtest/migration-test.c
/openbmc/qemu/tests/tcg/multiarch/Makefile.target
/openbmc/qemu/tests/tcg/multiarch/catch-syscalls.c
/openbmc/qemu/tests/tcg/multiarch/gdbstub/catch-syscalls.py
/openbmc/qemu/tests/unit/test-crypto-block.c
/openbmc/qemu/tests/unit/test-crypto-cipher.c
/openbmc/qemu/ui/vnc.c
/openbmc/qemu/ui/vnc.h
2df1eb2707-Feb-2024 Paolo Bonzini <pbonzini@redhat.com>

kconfig: use "select" to enable semihosting

Just like all other dependencies, these can be expressed in Kconfig
files rather than in the default configurations.

Signed-off-by: Paolo Bonzini <pbonzi

kconfig: use "select" to enable semihosting

Just like all other dependencies, these can be expressed in Kconfig
files rather than in the default configurations.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20240129115809.1039924-1-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240207163812.3231697-10-alex.bennee@linaro.org>

show more ...


/openbmc/qemu/.gitlab-ci.d/buildtest.yml
/openbmc/qemu/accel/kvm/kvm-all.c
/openbmc/qemu/accel/stubs/kvm-stub.c
/openbmc/qemu/accel/tcg/cputlb.c
/openbmc/qemu/accel/tcg/ldst_common.c.inc
/openbmc/qemu/backends/hostmem.c
/openbmc/qemu/block/blkio.c
/openbmc/qemu/block/block-backend.c
/openbmc/qemu/configs/devices/m68k-softmmu/default.mak
/openbmc/qemu/configs/devices/mips-softmmu/common.mak
/openbmc/qemu/configs/devices/nios2-softmmu/default.mak
/openbmc/qemu/configs/devices/riscv32-softmmu/default.mak
/openbmc/qemu/configs/devices/riscv64-softmmu/default.mak
/openbmc/qemu/configs/devices/xtensa-softmmu/default.mak
/openbmc/qemu/configure
/openbmc/qemu/docs/about/deprecated.rst
/openbmc/qemu/docs/devel/docs.rst
/openbmc/qemu/docs/devel/tcg-ops.rst
/openbmc/qemu/docs/sphinx/hxtool.py
/openbmc/qemu/docs/system/arm/raspi.rst
/openbmc/qemu/docs/system/i386/xen.rst
/openbmc/qemu/hw/arm/Kconfig
/openbmc/qemu/hw/arm/bcm2835_peripherals.c
/openbmc/qemu/hw/arm/exynos4210.c
/openbmc/qemu/hw/arm/exynos4_boards.c
/openbmc/qemu/hw/arm/highbank.c
/openbmc/qemu/hw/arm/msf2-soc.c
/openbmc/qemu/hw/arm/msf2-som.c
/openbmc/qemu/hw/arm/musca.c
/openbmc/qemu/hw/arm/npcm7xx.c
/openbmc/qemu/hw/arm/npcm7xx_boards.c
/openbmc/qemu/hw/arm/strongarm.c
/openbmc/qemu/hw/arm/trace-events
/openbmc/qemu/hw/arm/vexpress.c
/openbmc/qemu/hw/arm/xen_arm.c
/openbmc/qemu/hw/arm/xilinx_zynq.c
/openbmc/qemu/hw/arm/z2.c
/openbmc/qemu/hw/block/virtio-blk.c
/openbmc/qemu/hw/core/bus.c
/openbmc/qemu/hw/hyperv/hv-balloon.c
/openbmc/qemu/hw/hyperv/vmbus.c
/openbmc/qemu/hw/input/adb.c
/openbmc/qemu/hw/mem/memory-device.c
/openbmc/qemu/hw/net/meson.build
/openbmc/qemu/hw/net/npcm_gmac.c
/openbmc/qemu/hw/net/trace-events
/openbmc/qemu/hw/pci-host/designware.c
/openbmc/qemu/hw/pci/pci.c
/openbmc/qemu/hw/ppc/spapr_cpu_core.c
/openbmc/qemu/hw/s390x/css-bridge.c
/openbmc/qemu/hw/scsi/lsi53c895a.c
/openbmc/qemu/hw/scsi/scsi-bus.c
/openbmc/qemu/hw/scsi/virtio-scsi.c
/openbmc/qemu/hw/ssi/Kconfig
/openbmc/qemu/hw/ssi/bcm2835_spi.c
/openbmc/qemu/hw/ssi/meson.build
/openbmc/qemu/hw/usb/dev-storage-classic.c
/openbmc/qemu/hw/virtio/virtio-mem.c
/openbmc/qemu/hw/virtio/virtio.c
/openbmc/qemu/hw/xen/trace-events
/openbmc/qemu/hw/xen/xen-hvm-common.c
/openbmc/qemu/hw/xen/xen-mapcache.c
/openbmc/qemu/include/block/aio.h
/openbmc/qemu/include/exec/cpu-all.h
/openbmc/qemu/include/exec/cpu-common.h
/openbmc/qemu/include/hw/arm/bcm2835_peripherals.h
/openbmc/qemu/include/hw/arm/msf2-soc.h
/openbmc/qemu/include/hw/arm/npcm7xx.h
/openbmc/qemu/include/hw/elf_ops.h
/openbmc/qemu/include/hw/net/npcm_gmac.h
/openbmc/qemu/include/hw/qdev-core.h
/openbmc/qemu/include/hw/scsi/scsi.h
/openbmc/qemu/include/hw/ssi/bcm2835_spi.h
/openbmc/qemu/include/hw/virtio/virtio-blk.h
/openbmc/qemu/include/qemu/osdep.h
/openbmc/qemu/include/sysemu/kvm.h
/openbmc/qemu/include/tcg/tcg-cond.h
/openbmc/qemu/linux-user/aarch64/vdso-be.so
/openbmc/qemu/linux-user/aarch64/vdso-le.so
/openbmc/qemu/linux-user/aarch64/vdso.S
/openbmc/qemu/linux-user/sparc/cpu_loop.c
/openbmc/qemu/linux-user/sparc/signal.c
/openbmc/qemu/meson.build
/openbmc/qemu/migration/migration.c
/openbmc/qemu/migration/multifd-zlib.c
/openbmc/qemu/migration/multifd-zstd.c
/openbmc/qemu/migration/multifd.c
/openbmc/qemu/migration/multifd.h
/openbmc/qemu/migration/ram.c
/openbmc/qemu/migration/trace-events
/openbmc/qemu/qapi/block-core.json
/openbmc/qemu/qapi/block-export.json
/openbmc/qemu/qapi/introspect.json
/openbmc/qemu/qapi/misc-target.json
/openbmc/qemu/qapi/qmp-dispatch.c
/openbmc/qemu/qemu-options.hx
/openbmc/qemu/qga/qapi-schema.json
/openbmc/qemu/qom/object.c
/openbmc/qemu/semihosting/uaccess.c
/openbmc/qemu/system/vl.c
/openbmc/qemu/target/alpha/translate.c
/openbmc/qemu/target/arm/cpu.c
/openbmc/qemu/target/arm/helper.c
/openbmc/qemu/target/arm/syndrome.h
/openbmc/qemu/target/cris/translate.c
/openbmc/qemu/target/hppa/mem_helper.c
/openbmc/qemu/target/hppa/op_helper.c
/openbmc/qemu/target/i386/tcg/translate.c
/openbmc/qemu/target/loongarch/cpu_helper.c
/openbmc/qemu/target/loongarch/tcg/tlb_helper.c
/openbmc/qemu/target/m68k/Kconfig
/openbmc/qemu/target/m68k/op_helper.c
/openbmc/qemu/target/m68k/translate.c
/openbmc/qemu/target/microblaze/helper.c
/openbmc/qemu/target/microblaze/mmu.c
/openbmc/qemu/target/microblaze/translate.c
/openbmc/qemu/target/mips/Kconfig
/openbmc/qemu/target/nios2/Kconfig
/openbmc/qemu/target/nios2/translate.c
/openbmc/qemu/target/openrisc/translate.c
/openbmc/qemu/target/ppc/cpu-models.c
Kconfig
/openbmc/qemu/target/s390x/cpu-dump.c
/openbmc/qemu/target/s390x/gdbstub.c
/openbmc/qemu/target/s390x/helper.c
/openbmc/qemu/target/s390x/helper.h
/openbmc/qemu/target/s390x/kvm/kvm.c
/openbmc/qemu/target/s390x/tcg/excp_helper.c
/openbmc/qemu/target/s390x/tcg/insn-data.h.inc
/openbmc/qemu/target/s390x/tcg/int_helper.c
/openbmc/qemu/target/s390x/tcg/misc_helper.c
/openbmc/qemu/target/s390x/tcg/translate.c
/openbmc/qemu/target/sparc/cpu.c
/openbmc/qemu/target/sparc/cpu.h
/openbmc/qemu/target/sparc/fop_helper.c
/openbmc/qemu/target/sparc/gdbstub.c
/openbmc/qemu/target/sparc/helper.h
/openbmc/qemu/target/sparc/ldst_helper.c
/openbmc/qemu/target/sparc/machine.c
/openbmc/qemu/target/sparc/mmu_helper.c
/openbmc/qemu/target/sparc/translate.c
/openbmc/qemu/target/tricore/helper.c
/openbmc/qemu/target/tricore/translate.c
/openbmc/qemu/target/xtensa/Kconfig
/openbmc/qemu/target/xtensa/mmu_helper.c
/openbmc/qemu/tcg/aarch64/tcg-target-con-set.h
/openbmc/qemu/tcg/aarch64/tcg-target-con-str.h
/openbmc/qemu/tcg/aarch64/tcg-target.c.inc
/openbmc/qemu/tcg/aarch64/tcg-target.h
/openbmc/qemu/tcg/arm/tcg-target.c.inc
/openbmc/qemu/tcg/arm/tcg-target.h
/openbmc/qemu/tcg/i386/tcg-target-con-set.h
/openbmc/qemu/tcg/i386/tcg-target-con-str.h
/openbmc/qemu/tcg/i386/tcg-target.c.inc
/openbmc/qemu/tcg/i386/tcg-target.h
/openbmc/qemu/tcg/loongarch64/tcg-target.c.inc
/openbmc/qemu/tcg/loongarch64/tcg-target.h
/openbmc/qemu/tcg/mips/tcg-target.c.inc
/openbmc/qemu/tcg/mips/tcg-target.h
/openbmc/qemu/tcg/optimize.c
/openbmc/qemu/tcg/ppc/tcg-target-con-set.h
/openbmc/qemu/tcg/ppc/tcg-target-con-str.h
/openbmc/qemu/tcg/ppc/tcg-target.c.inc
/openbmc/qemu/tcg/ppc/tcg-target.h
/openbmc/qemu/tcg/riscv/tcg-target.c.inc
/openbmc/qemu/tcg/riscv/tcg-target.h
/openbmc/qemu/tcg/s390x/tcg-target-con-set.h
/openbmc/qemu/tcg/s390x/tcg-target-con-str.h
/openbmc/qemu/tcg/s390x/tcg-target.c.inc
/openbmc/qemu/tcg/s390x/tcg-target.h
/openbmc/qemu/tcg/sparc64/tcg-target.c.inc
/openbmc/qemu/tcg/sparc64/tcg-target.h
/openbmc/qemu/tcg/tcg-internal.h
/openbmc/qemu/tcg/tcg.c
/openbmc/qemu/tcg/tci.c
/openbmc/qemu/tcg/tci/tcg-target.c.inc
/openbmc/qemu/tcg/tci/tcg-target.h
/openbmc/qemu/tests/docker/dockerfiles/opensuse-leap.docker
/openbmc/qemu/tests/lcitool/mappings.yml
/openbmc/qemu/tests/lcitool/projects/qemu.yml
/openbmc/qemu/tests/qemu-iotests/check
/openbmc/qemu/tests/qemu-iotests/testenv.py
/openbmc/qemu/tests/qtest/meson.build
/openbmc/qemu/tests/qtest/migration-test.c
/openbmc/qemu/tests/qtest/npcm_gmac-test.c
/openbmc/qemu/tests/qtest/xlnx-versal-trng-test.c
/openbmc/qemu/tests/tcg/aarch64/sysregs.c
/openbmc/qemu/tests/tcg/multiarch/gdbstub/prot-none.py
/openbmc/qemu/tests/tcg/s390x/Makefile.target
/openbmc/qemu/tests/tcg/s390x/cvb.c
/openbmc/qemu/tests/tcg/s390x/cvd.c
/openbmc/qemu/tests/unit/test-util-filemonitor.c
/openbmc/qemu/tests/vm/basevm.py
/openbmc/qemu/tests/vm/freebsd
/openbmc/qemu/util/meson.build
/openbmc/qemu/util/oslib-posix.c
/openbmc/qemu/util/oslib-win32.c
deb0ff0c22-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv: add rv32i, rv32e and rv64e CPUs

A bare bones 32 bit RVI CPU, rv32i, will make users lives easier when a
full customized 32 bit CPU is desired, and users won't need to disable
defaults

target/riscv: add rv32i, rv32e and rv64e CPUs

A bare bones 32 bit RVI CPU, rv32i, will make users lives easier when a
full customized 32 bit CPU is desired, and users won't need to disable
defaults by hand as they would with the rv32 CPU. [1] has an example of
a situation that would be avoided with rv32i.

In fact, add bare bones CPUs for RVE as well. Trying to use RVE in QEMU
requires one to disable every single default extension, including RVI,
and then add the desirable extension set. Adding rv32e/rv64e makes it
more pleasant to use embedded CPUs in QEMU.

[1] https://lore.kernel.org/qemu-riscv/258be47f-97be-4308-bed5-dc34ef7ff954@Spark/

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122123348.973288-3-dbarboza@ventanamicro.com>
[ Changes by AF:
- Rebase on latest changes
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

b077aec922-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/cpu.c: add riscv_bare_cpu_init()

Next patch will add more bare CPUs. Their cpu_init() functions would be
glorified copy/pastes of rv64i_bare_cpu_init(), differing only by a
riscv_cpu_se

target/riscv/cpu.c: add riscv_bare_cpu_init()

Next patch will add more bare CPUs. Their cpu_init() functions would be
glorified copy/pastes of rv64i_bare_cpu_init(), differing only by a
riscv_cpu_set_misa() call.

Add a new .instance_init for the TYPE_RISCV_BARE_CPU typ to avoid this
code repetition. While we're at it, add a better explanation on why
we're disabling the timing extensions for bare CPUs.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122123348.973288-2-dbarboza@ventanamicro.com>
[ Changes by AF:
- Rebase on latest changes
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

a65d517003-Feb-2024 LIU Zhiwei <zhiwei_liu@linux.alibaba.com>

target/riscv: Enable xtheadsync under user mode

According to xtheadsync[1][2] documentation, it can be used in user mode and
the behavior is same with other priviledges.

[1]:https://github.com/T-he

target/riscv: Enable xtheadsync under user mode

According to xtheadsync[1][2] documentation, it can be used in user mode and
the behavior is same with other priviledges.

[1]:https://github.com/T-head-Semi/thead-extension-spec/blob/master/xtheadsync/sync.adoc
[2]:https://github.com/T-head-Semi/thead-extension-spec/blob/master/xtheadsync/sync_i.adoc

Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240204055228.900-1-zhiwei_liu@linux.alibaba.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

1c8e491c24-Jan-2024 Conor Dooley <conor.dooley@microchip.com>

target/riscv: support new isa extension detection devicetree properties

A few months ago I submitted a patch to various lists, deprecating
"riscv,isa" with a lengthy commit message [0] that is now c

target/riscv: support new isa extension detection devicetree properties

A few months ago I submitted a patch to various lists, deprecating
"riscv,isa" with a lengthy commit message [0] that is now commit
aeb71e42caae ("dt-bindings: riscv: deprecate riscv,isa") in the Linux
kernel tree. Primarily, the goal was to replace "riscv,isa" with a new
set of properties that allowed for strictly defining the meaning of
various extensions, where "riscv,isa" was tied to whatever definitions
inflicted upon us by the ISA manual, which have seen some variance over
time.

Two new properties were introduced: "riscv,isa-base" and
"riscv,isa-extensions". The former is a simple string to communicate the
base ISA implemented by a hart and the latter an array of strings used
to communicate the set of ISA extensions supported, per the definitions
of each substring in extensions.yaml [1]. A beneficial side effect was
also the ability to define vendor extensions in a more "official" way,
as the ISA manual and other RVI specifications only covered the format
for vendor extensions in the ISA string, but not the meaning of vendor
extensions, for obvious reasons.

Add support for setting these two new properties in the devicetrees for
the various devicetree platforms supported by QEMU for RISC-V. The Linux
kernel already supports parsing ISA extensions from these new
properties, and documenting them in the dt-binding is a requirement for
new extension detection being added to the kernel.

A side effect of the implementation is that the meaning for elements in
"riscv,isa" and in "riscv,isa-extensions" are now tied together as they
are constructed from the same source. The same applies to the ISA string
provided in ACPI tables, but there does not appear to be any strict
definitions of meanings in ACPI land either.

Link: https://lore.kernel.org/qemu-riscv/20230702-eats-scorebook-c951f170d29f@spud/ [0]
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/riscv/extensions.yaml [1]
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20240124-unvarying-foothold-9dde2aaf95d4@spud>
[ Changes by AF:
- Rebase on recent changes
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

afa42c2124-Jan-2024 Conor Dooley <conor.dooley@microchip.com>

target/riscv: use misa_mxl_max to populate isa string rather than TARGET_LONG_BITS

A cpu may not have the same xlen as the compile time target, and
misa_mxl_max is the source of truth for what the h

target/riscv: use misa_mxl_max to populate isa string rather than TARGET_LONG_BITS

A cpu may not have the same xlen as the compile time target, and
misa_mxl_max is the source of truth for what the hart supports.

The conversion from misa_mxl_max to xlen already has one user, so
introduce a helper and use that to populate the isa string.

Link: https://lore.kernel.org/qemu-riscv/20240108-efa3f83dcd3997dc0af458d7@orel/
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20240124-swear-monthly-56c281f809a6@spud>
[ Changes by AF:
- Convert to use RISCVCPUClass *mcc
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

79b50e2c23-Jan-2024 Rob Bradford <rbradford@rivosinc.com>

target/riscv: Expose Zaamo and Zalrsc extensions

Expose the newly added extensions to the guest and allow their control
through the CPU properties.

Signed-off-by: Rob Bradford <rbradford@rivosinc.c

target/riscv: Expose Zaamo and Zalrsc extensions

Expose the newly added extensions to the guest and allow their control
through the CPU properties.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20240123111030.15074-4-rbradford@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

4f75d81223-Jan-2024 Rob Bradford <rbradford@rivosinc.com>

target/riscv: Check 'A' and split extensions for atomic instructions

Following the pattern for 'M' and Zmmul check if either the 'A'
extension is enabled or the appropriate split extension for the
i

target/riscv: Check 'A' and split extensions for atomic instructions

Following the pattern for 'M' and Zmmul check if either the 'A'
extension is enabled or the appropriate split extension for the
instruction.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20240123111030.15074-3-rbradford@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

8caeda5b23-Jan-2024 Rob Bradford <rbradford@rivosinc.com>

target/riscv: Add Zaamo and Zalrsc extension infrastructure

These extensions represent the atomic operations from A (Zaamo) and the
Load-Reserved/Store-Conditional operations from A (Zalrsc)

Signed

target/riscv: Add Zaamo and Zalrsc extension infrastructure

These extensions represent the atomic operations from A (Zaamo) and the
Load-Reserved/Store-Conditional operations from A (Zalrsc)

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20240123111030.15074-2-rbradford@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

a5cb044c30-Jan-2024 LIU Zhiwei <zhiwei_liu@linux.alibaba.com>

target/riscv: Use RISCVException as return type for all csr ops

The real return value type has been converted to RISCVException,
but some function declarations still not. This patch makes all
csr op

target/riscv: Use RISCVException as return type for all csr ops

The real return value type has been converted to RISCVException,
but some function declarations still not. This patch makes all
csr operation declarations use RISCVExcetion.

Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20240130110844.437-1-zhiwei_liu@linux.alibaba.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

ac8c8b6d30-Jan-2024 LIU Zhiwei <zhiwei_liu@linux.alibaba.com>

target/riscv: FCSR doesn't contain vxrm and vxsat

vxrm and vxsat have been moved into a special register vcsr since
RVV v1.0. So remove them from FCSR for vector 1.0.

Signed-off-by: LIU Zhiwei <zhi

target/riscv: FCSR doesn't contain vxrm and vxsat

vxrm and vxsat have been moved into a special register vcsr since
RVV v1.0. So remove them from FCSR for vector 1.0.

Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20240130110945.486-1-zhiwei_liu@linux.alibaba.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

1563cdb403-Feb-2024 Akihiko Odaki <akihiko.odaki@daynix.com>

target/riscv: Validate misa_mxl_max only once

misa_mxl_max is now a class member and initialized only once for each
class. This also moves the initialization of gdb_core_xml_file which
will be refer

target/riscv: Validate misa_mxl_max only once

misa_mxl_max is now a class member and initialized only once for each
class. This also moves the initialization of gdb_core_xml_file which
will be referenced before realization in the future.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240203-riscv-v11-3-a23f4848a628@daynix.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

742cc26903-Feb-2024 Akihiko Odaki <akihiko.odaki@daynix.com>

target/riscv: Move misa_mxl_max to class

misa_mxl_max is common for all instances of a RISC-V CPU class so they
are better put into class.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Re

target/riscv: Move misa_mxl_max to class

misa_mxl_max is common for all instances of a RISC-V CPU class so they
are better put into class.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240203-riscv-v11-2-a23f4848a628@daynix.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

0e350c1a03-Feb-2024 Akihiko Odaki <akihiko.odaki@daynix.com>

target/riscv: Remove misa_mxl validation

It is initialized with a simple assignment and there is little room for
error. In fact, the validation is even more complex.

Signed-off-by: Akihiko Odaki <a

target/riscv: Remove misa_mxl validation

It is initialized with a simple assignment and there is little room for
error. In fact, the validation is even more complex.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240203-riscv-v11-1-a23f4848a628@daynix.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

6f4a624823-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/kvm: get/set vector vregs[]

vregs[] have variable size that depends on the current vlenb set by the
host, meaning we can't use our regular kvm_riscv_reg_id() to retrieve
it.

Create a g

target/riscv/kvm: get/set vector vregs[]

vregs[] have variable size that depends on the current vlenb set by the
host, meaning we can't use our regular kvm_riscv_reg_id() to retrieve
it.

Create a generic kvm_encode_reg_size_id() helper to encode any given
size in bytes into a given kvm reg id. kvm_riscv_vector_reg_id() will
use it to encode vlenb into a given vreg ID.

kvm_riscv_(get|set)_vector() can then get/set all 32 vregs.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240123161714.160149-4-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

d4ff3da823-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/kvm: initialize 'vlenb' via get-reg-list

KVM will check for the correct 'reg_size' when accessing the vector
registers, erroring with EINVAL if we encode the wrong size in reg ID.
Vecto

target/riscv/kvm: initialize 'vlenb' via get-reg-list

KVM will check for the correct 'reg_size' when accessing the vector
registers, erroring with EINVAL if we encode the wrong size in reg ID.
Vector registers varies in size with the vector length in bytes, or
'vlenb'. This means that we need the current 'vlenb' being used by the
host, otherwise we won't be able to fetch all vector regs.

We'll deal with 'vlenb' first. Its support was added in Linux 6.8 as a
get-reg-list register. We'll read 'vlenb' via get-reg-list and mark the
register as 'supported'. All 'vlenb' ops via kvm_arch_get_registers()
and kvm_arch_put_registers() will only be done if the reg is supported,
i.e. we fetched it in get-reg-list during init.

If the user sets a new vlenb value using the 'vlen' property, throw an
error if the user value differs from the host.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240123161714.160149-3-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

fafb0dc423-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/kvm: change kvm_reg_id to uint64_t

The field isn't big enough to hold an uint64_t kvm register and Vector
registers will end up overflowing it.

Signed-off-by: Daniel Henrique Barboza <

target/riscv/kvm: change kvm_reg_id to uint64_t

The field isn't big enough to hold an uint64_t kvm register and Vector
registers will end up overflowing it.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240123161714.160149-2-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

4f6d036c22-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/cpu.c: remove cpu->cfg.vlen

There is no need to keep both 'vlen' and 'vlenb'. All existing code
that requires 'vlen' is retrieving it via 'vlenb << 3'.

Signed-off-by: Daniel Henrique B

target/riscv/cpu.c: remove cpu->cfg.vlen

There is no need to keep both 'vlen' and 'vlenb'. All existing code
that requires 'vlen' is retrieving it via 'vlenb << 3'.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122161107.26737-14-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

25669d2722-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

trans_rvv.c.inc: use vext_get_vlmax() in trans_vrgather_v*()

Use the helper instead of calculating vlmax by hand.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Ali

trans_rvv.c.inc: use vext_get_vlmax() in trans_vrgather_v*()

Use the helper instead of calculating vlmax by hand.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122161107.26737-13-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

cd21576d22-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv: change vext_get_vlmax() arguments

We'll re-use the logic froim vext_get_vlmax() in 2 other occurrences in
the next patch, but first we need to make it independent of both 'cpu'
and 'vt

target/riscv: change vext_get_vlmax() arguments

We'll re-use the logic froim vext_get_vlmax() in 2 other occurrences in
the next patch, but first we need to make it independent of both 'cpu'
and 'vtype'. To do that, add 'vlenb', 'vsew' and 'lmul' as parameters
instead.

Adapt the two existing callers. In cpu_get_tb_cpu_state(), rename 'sew'
to 'vsew' to be less ambiguous about what we're encoding into *pflags.

In HELPER(vsetvl) the following changes were made:

- add a 'vsew' var to store vsew. Use it in the shift to get 'sew';
- the existing 'lmul' var was renamed to 'vlmul';
- add a new 'lmul' var to store 'lmul' encoded like DisasContext:lmul.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122161107.26737-12-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

24a6aeec22-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax()

Rename the existing 'sew' variable to 'vsew' for extra clarity.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: A

target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax()

Rename the existing 'sew' variable to 'vsew' for extra clarity.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122161107.26737-11-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

bd2c822822-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ()

Calculate the maximum vector size possible, 'max_sz', which is the size
in bytes 'vlenb' multiplied by the max value of LMUL (LMUL = 8

target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ()

Calculate the maximum vector size possible, 'max_sz', which is the size
in bytes 'vlenb' multiplied by the max value of LMUL (LMUL = 8, when
s->lmul = 3).

'max_sz' is then shifted right by 'scale', expressed as '3 - s->lmul',
which is clearer than doing 'scale = lmul - 3' and then using '-scale'
in the shift right.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122161107.26737-10-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

7aa4d51922-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/vector_helper.c: use vlenb in HELPER(vsetvl)

Use the new 'vlenb' CPU config to validate fractional LMUL. The original
comparison is done with 'vlen' and 'sew', both in bits. Adjust the

target/riscv/vector_helper.c: use vlenb in HELPER(vsetvl)

Use the new 'vlenb' CPU config to validate fractional LMUL. The original
comparison is done with 'vlen' and 'sew', both in bits. Adjust the shift
to use vlenb.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122161107.26737-9-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

58bc906322-Jan-2024 Daniel Henrique Barboza <dbarboza@ventanamicro.com>

target/riscv/vector_helper.c: use 'vlenb'

Use 'cpu->cfg.vlenb' instead of 'cpu->cfg.vlen >> 3'.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <ri

target/riscv/vector_helper.c: use 'vlenb'

Use 'cpu->cfg.vlenb' instead of 'cpu->cfg.vlen >> 3'.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122161107.26737-8-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

12345678910>>...71