History log of /openbmc/qemu/target/riscv/ (Results 726 – 750 of 1666)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
a42bd00109-Sep-2022 Frank Chang <frank.chang@sifive.com>

target/riscv: debug: Determine the trigger type from tdata1.type

Current RISC-V debug assumes that only type 2 trigger is supported.
To allow more types of triggers to be supported in the future
(e.

target/riscv: debug: Determine the trigger type from tdata1.type

Current RISC-V debug assumes that only type 2 trigger is supported.
To allow more types of triggers to be supported in the future
(e.g. type 6 trigger, which is similar to type 2 trigger with additional
functionality), we should determine the trigger type from tdata1.type.

RV_MAX_TRIGGERS is also introduced in replacement of TRIGGER_TYPE2_NUM.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
[bmeng: fixed MXL_RV128 case, and moved macros to the following patch]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20220909134215.1843865-2-bmeng.cn@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

9e37653b18-Sep-2022 Frank Chang <frank.chang@sifive.com>

target/riscv: Check the correct exception cause in vector GDB stub

After RISCVException enum is introduced, riscv_csrrw_debug() returns
RISCV_EXCP_NONE to indicate there's no error. RISC-V vector GD

target/riscv: Check the correct exception cause in vector GDB stub

After RISCVException enum is introduced, riscv_csrrw_debug() returns
RISCV_EXCP_NONE to indicate there's no error. RISC-V vector GDB stub
should check the result against RISCV_EXCP_NONE instead of value 0.
Otherwise, 'E14' packet would be incorrectly reported for vector CSRs
when using "info reg vector" GDB command.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Jim Shu <jim.shu@sifive.com>
Reviewed-by: Tommy Wu <tommy.wu@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Message-Id: <20220918083245.13028-1-frank.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

277b210d14-Sep-2022 Alistair Francis <alistair.francis@wdc.com>

target/riscv: Set the CPU resetvec directly

Instead of using our properties to set a config value which then might
be used to set the resetvec (depending on your timing), let's instead
just set the

target/riscv: Set the CPU resetvec directly

Instead of using our properties to set a config value which then might
be used to set the resetvec (depending on your timing), let's instead
just set the resetvec directly in the env struct.

This allows us to set the reset vec from the command line with:
-global driver=riscv.hart_array,property=resetvec,value=0x20000400

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220914101108.82571-2-alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

94452ac431-Aug-2022 Andrew Burgess <aburgess@redhat.com>

target/riscv: remove fflags, frm, and fcsr from riscv-*-fpu.xml

While testing some changes to GDB's handling for the RISC-V registers
fcsr, fflags, and frm, I spotted that QEMU includes these regist

target/riscv: remove fflags, frm, and fcsr from riscv-*-fpu.xml

While testing some changes to GDB's handling for the RISC-V registers
fcsr, fflags, and frm, I spotted that QEMU includes these registers
twice in the target description it sends to GDB, once in the fpu
feature, and once in the csr feature.

Right now things basically work OK, QEMU maps these registers onto two
different register numbers, e.g. fcsr maps to both 68 and 73, and GDB
can use either of these to access the register.

However, GDB's target descriptions don't really work this way, each
register should appear just once in a target description, mapping the
register name onto the number GDB should use when accessing the
register on the target. Duplicate register names actually result in
duplicate registers on the GDB side, however, as the registers have
the same name, the user can only access one of these registers.

Currently GDB has a hack in place, specifically for RISC-V, to spot
the duplicate copies of these three registers, and hide them from the
user, ensuring the user only ever sees a single copy of each.

In this commit I propose fixing this issue on the QEMU side, and in
the process, simplify the fpu register handling a little.

I think we should, remove fflags, frm, and fcsr from the two (32-bit
and 64-bit) fpu feature xml files. These files will only contain the
32 core floating point register f0 to f31. The fflags, frm, and fcsr
registers will continue to be advertised in the csr feature as they
currently are.

With that change made, I will simplify riscv_gdb_get_fpu and
riscv_gdb_set_fpu, removing the extra handling for the 3 status
registers.

Signed-off-by: Andrew Burgess <aburgess@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <0fbf2a5b12e3210ff3867d5cf7022b3f3462c9c8.1661934573.git.aburgess@redhat.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

a412829417-Aug-2022 Weiwei Li <liweiwei@iscas.ac.cn>

target/riscv: fix csr check for cycle{h}, instret{h}, time{h}, hpmcounter3-31{h}

- modify check for mcounteren to work in all less-privilege mode
- modify check for scounteren to work only when S mo

target/riscv: fix csr check for cycle{h}, instret{h}, time{h}, hpmcounter3-31{h}

- modify check for mcounteren to work in all less-privilege mode
- modify check for scounteren to work only when S mode is enabled
- distinguish the exception type raised by check for scounteren between U
and VU mode

Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn>
Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220817083756.12471-1-liweiwei@iscas.ac.cn>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

513eb43724-Aug-2022 Rahul Pathak <rpathak@ventanamicro.com>

target/riscv: Remove sideleg and sedeleg

sideleg and sedeleg csrs are not part of riscv isa spec
anymore, these csrs were part of N extension which
is removed from the riscv isa specification.

Thes

target/riscv: Remove sideleg and sedeleg

sideleg and sedeleg csrs are not part of riscv isa spec
anymore, these csrs were part of N extension which
is removed from the riscv isa specification.

These commits removed all traces of these csrs from
riscv spec (https://github.com/riscv/riscv-isa-manual) -

commit f8d27f805b65 ("Remove or downgrade more references to N extension (#674)")
commit b6cade07034d ("Remove N extension chapter for now")

Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220824145255.400040-1-rpathak@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...


/openbmc/qemu/.gitlab-ci.d/cirrus.yml
/openbmc/qemu/.gitlab-ci.d/cirrus/freebsd-12.vars
/openbmc/qemu/.gitlab-ci.d/cirrus/freebsd-13.vars
/openbmc/qemu/.gitlab-ci.d/container-core.yml
/openbmc/qemu/.gitlab-ci.d/container-cross.yml
/openbmc/qemu/.gitlab-ci.d/containers.yml
/openbmc/qemu/.gitlab-ci.d/crossbuild-template.yml
/openbmc/qemu/.gitlab-ci.d/crossbuilds.yml
/openbmc/qemu/.gitlab-ci.d/custom-runners.yml
/openbmc/qemu/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml
/openbmc/qemu/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml
/openbmc/qemu/.gitlab-ci.d/windows.yml
/openbmc/qemu/MAINTAINERS
/openbmc/qemu/Makefile
/openbmc/qemu/accel/kvm/kvm-all.c
/openbmc/qemu/audio/audio.c
/openbmc/qemu/audio/audio.h
/openbmc/qemu/backends/tpm/tpm_emulator.c
/openbmc/qemu/backends/tpm/tpm_ioctl.h
/openbmc/qemu/backends/tpm/trace-events
/openbmc/qemu/chardev/baum.c
/openbmc/qemu/configure
/openbmc/qemu/disas/riscv.c
/openbmc/qemu/docs/about/build-platforms.rst
/openbmc/qemu/docs/about/deprecated.rst
/openbmc/qemu/docs/devel/testing.rst
/openbmc/qemu/docs/interop/qemu-ga.rst
/openbmc/qemu/docs/system/arm/emulation.rst
/openbmc/qemu/docs/system/arm/virt.rst
/openbmc/qemu/docs/system/riscv/virt.rst
/openbmc/qemu/hmp-commands-info.hx
/openbmc/qemu/hmp-commands.hx
/openbmc/qemu/hw/acpi/generic_event_device.c
/openbmc/qemu/hw/arm/armv7m.c
/openbmc/qemu/hw/arm/aspeed.c
/openbmc/qemu/hw/arm/microbit.c
/openbmc/qemu/hw/arm/mps2-tz.c
/openbmc/qemu/hw/arm/mps2.c
/openbmc/qemu/hw/arm/msf2-som.c
/openbmc/qemu/hw/arm/musca.c
/openbmc/qemu/hw/arm/netduino2.c
/openbmc/qemu/hw/arm/netduinoplus2.c
/openbmc/qemu/hw/arm/stellaris.c
/openbmc/qemu/hw/arm/stm32vldiscovery.c
/openbmc/qemu/hw/arm/virt.c
/openbmc/qemu/hw/i386/multiboot.c
/openbmc/qemu/hw/intc/xics.c
/openbmc/qemu/hw/loongarch/Kconfig
/openbmc/qemu/hw/loongarch/acpi-build.c
/openbmc/qemu/hw/loongarch/fw_cfg.c
/openbmc/qemu/hw/loongarch/virt.c
/openbmc/qemu/hw/microblaze/boot.c
/openbmc/qemu/hw/misc/bcm2835_property.c
/openbmc/qemu/hw/net/can/xlnx-zynqmp-can.c
/openbmc/qemu/hw/net/e1000e_core.c
/openbmc/qemu/hw/net/lan9118.c
/openbmc/qemu/hw/pci-host/pnv_phb3.c
/openbmc/qemu/hw/pci-host/pnv_phb4.c
/openbmc/qemu/hw/ppc/pnv.c
/openbmc/qemu/hw/ppc/spapr.c
/openbmc/qemu/hw/ppc/spapr_pci.c
/openbmc/qemu/hw/ppc/spapr_pci_nvlink2.c
/openbmc/qemu/hw/smbios/smbios.c
/openbmc/qemu/hw/ssi/ibex_spi_host.c
/openbmc/qemu/hw/tpm/tpm_crb.c
/openbmc/qemu/hw/usb/hcd-ohci.c
/openbmc/qemu/include/hw/arm/boot.h
/openbmc/qemu/include/hw/loongarch/virt.h
/openbmc/qemu/include/hw/pci-host/ls7a.h
/openbmc/qemu/include/hw/ppc/spapr.h
/openbmc/qemu/io/channel-websock.c
/openbmc/qemu/meson.build
/openbmc/qemu/monitor/hmp.c
/openbmc/qemu/monitor/misc.c
/openbmc/qemu/qemu-options.hx
/openbmc/qemu/qga/commands-posix.c
/openbmc/qemu/qga/commands-win32.c
/openbmc/qemu/qga/guest-agent-core.h
/openbmc/qemu/qga/main.c
/openbmc/qemu/qga/qapi-schema.json
/openbmc/qemu/roms/qboot
/openbmc/qemu/scripts/coverity-scan/COMPONENTS.md
/openbmc/qemu/softmmu/vl.c
/openbmc/qemu/target/arm/cpu.h
/openbmc/qemu/target/arm/cpu64.c
/openbmc/qemu/target/arm/cpu_tcg.c
/openbmc/qemu/target/arm/helper.c
/openbmc/qemu/target/arm/internals.h
/openbmc/qemu/target/arm/kvm64.c
/openbmc/qemu/target/arm/m_helper.c
/openbmc/qemu/target/arm/ptw.c
/openbmc/qemu/target/arm/tlb_helper.c
/openbmc/qemu/target/arm/translate-neon.c
/openbmc/qemu/target/hexagon/imported/encode_pp.def
/openbmc/qemu/target/i386/ops_sse.h
/openbmc/qemu/target/i386/ops_sse_header.h
/openbmc/qemu/target/i386/tcg/excp_helper.c
/openbmc/qemu/target/i386/tcg/helper-tcg.h
/openbmc/qemu/target/i386/tcg/sysemu/excp_helper.c
/openbmc/qemu/target/i386/tcg/tcg-cpu.c
/openbmc/qemu/target/i386/tcg/translate.c
/openbmc/qemu/target/i386/tcg/user/excp_helper.c
/openbmc/qemu/target/m68k/cpu.c
/openbmc/qemu/target/m68k/cpu.h
/openbmc/qemu/target/m68k/helper.c
/openbmc/qemu/target/m68k/op_helper.c
/openbmc/qemu/target/m68k/translate.c
/openbmc/qemu/target/ppc/cpu.h
/openbmc/qemu/target/ppc/cpu_init.c
/openbmc/qemu/target/ppc/dfp_helper.c
/openbmc/qemu/target/ppc/excp_helper.c
/openbmc/qemu/target/ppc/fpu_helper.c
/openbmc/qemu/target/ppc/helper.h
/openbmc/qemu/target/ppc/insn32.decode
/openbmc/qemu/target/ppc/int_helper.c
/openbmc/qemu/target/ppc/translate.c
/openbmc/qemu/target/ppc/translate/fixedpoint-impl.c.inc
/openbmc/qemu/target/ppc/translate/fp-impl.c.inc
/openbmc/qemu/target/ppc/translate/fp-ops.c.inc
cpu_bits.h
/openbmc/qemu/tests/avocado/avocado_qemu/__init__.py
/openbmc/qemu/tests/avocado/boot_linux.py
/openbmc/qemu/tests/avocado/boot_linux_console.py
/openbmc/qemu/tests/avocado/machine_aspeed.py
/openbmc/qemu/tests/data/test-qga-config
/openbmc/qemu/tests/docker/Makefile.include
/openbmc/qemu/tests/docker/docker.py
/openbmc/qemu/tests/docker/dockerfiles/debian-all-test-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-alpha-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-amd64-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-hexagon-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-hppa-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-loongarch-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-m68k-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-mips-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-mips64-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-riscv64-test-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-sh4-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-sparc64-cross.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-toolchain.docker
/openbmc/qemu/tests/docker/dockerfiles/opensuse-leap.docker
/openbmc/qemu/tests/docker/dockerfiles/ubuntu2004.docker
/openbmc/qemu/tests/lcitool/libvirt-ci
/openbmc/qemu/tests/lcitool/refresh
/openbmc/qemu/tests/qtest/bios-tables-test.c
/openbmc/qemu/tests/qtest/e1000-test.c
/openbmc/qemu/tests/qtest/es1370-test.c
/openbmc/qemu/tests/qtest/fuzz-lsi53c895a-test.c
/openbmc/qemu/tests/qtest/fuzz-sb16-test.c
/openbmc/qemu/tests/qtest/intel-hda-test.c
/openbmc/qemu/tests/qtest/npcm7xx_emc-test.c
/openbmc/qemu/tests/tcg/hexagon/usr.c
/openbmc/qemu/tests/tcg/i386/Makefile.target
/openbmc/qemu/tests/tcg/i386/test-3dnow.c
/openbmc/qemu/tests/tcg/i386/test-avx.py
/openbmc/qemu/tests/tcg/i386/test-i386.c
/openbmc/qemu/tests/tcg/i386/test-mmx.c
/openbmc/qemu/tests/tcg/i386/test-mmx.py
/openbmc/qemu/tests/tcg/i386/x86.csv
/openbmc/qemu/tests/tcg/x86_64/Makefile.target
/openbmc/qemu/tests/unit/check-block-qdict.c
/openbmc/qemu/tests/unit/test-io-channel-command.c
/openbmc/qemu/tests/unit/test-qga.c
/openbmc/qemu/tests/unit/test-visitor-serialization.c
/openbmc/qemu/tests/unit/test-vmstate.c
/openbmc/qemu/tests/vm/Makefile.include
/openbmc/qemu/tests/vm/netbsd
/openbmc/qemu/ui/curses.c
7d7fb11622-Aug-2022 Peter Maydell <peter.maydell@linaro.org>

target/riscv: Honour -semihosting-config userspace=on and enable=on

The riscv target incorrectly enabled semihosting always, whether the
user asked for it or not. Call semihosting_enabled() passing

target/riscv: Honour -semihosting-config userspace=on and enable=on

The riscv target incorrectly enabled semihosting always, whether the
user asked for it or not. Call semihosting_enabled() passing the
correct value to the is_userspace argument, which fixes this and also
handles the userspace=on argument. Because we do this at translate
time, we no longer need to check the privilege level in
riscv_cpu_do_interrupt().

Note that this is a behaviour change: we used to default to
semihosting being enabled, and now the user must pass
"-semihosting-config enable=on" if they want it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220822141230.3658237-8-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

f055156024-Aug-2022 Atish Patra <atishp@rivosinc.com>

target/riscv: Update the privilege field for sscofpmf CSRs

The sscofpmf extension was ratified as a part of priv spec v1.12.
Mark the csr_ops accordingly.

Reviewed-by: Weiwei Li <liweiwei@iscas.ac.

target/riscv: Update the privilege field for sscofpmf CSRs

The sscofpmf extension was ratified as a part of priv spec v1.12.
Mark the csr_ops accordingly.

Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221701.41932-6-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

abd9a20624-Aug-2022 Atish Patra <atishp@rivosinc.com>

hw/riscv: virt: Add PMU DT node to the device tree

Qemu virt machine can support few cache events and cycle/instret counters.
It also supports counter overflow for these events.

Add a DT node so th

hw/riscv: virt: Add PMU DT node to the device tree

Qemu virt machine can support few cache events and cycle/instret counters.
It also supports counter overflow for these events.

Add a DT node so that OpenSBI/Linux kernel is aware of the virt machine
capabilities. There are some dummy nodes added for testing as well.

Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221701.41932-5-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

892320fa24-Aug-2022 Atish Patra <atish.patra@wdc.com>

target/riscv: Add few cache related PMU events

Qemu can monitor the following cache related PMU events through
tlb_fill functions.

1. DTLB load/store miss
3. ITLB prefetch miss

Increment the PMU c

target/riscv: Add few cache related PMU events

Qemu can monitor the following cache related PMU events through
tlb_fill functions.

1. DTLB load/store miss
3. ITLB prefetch miss

Increment the PMU counter in tlb_fill function.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221701.41932-4-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

ade445ef24-Aug-2022 Atish Patra <atishp@rivosinc.com>

target/riscv: Simplify counter predicate function

All the hpmcounters and the fixed counters (CY, IR, TM) can be represented
as a unified counter. Thus, the predicate function doesn't need handle ea

target/riscv: Simplify counter predicate function

All the hpmcounters and the fixed counters (CY, IR, TM) can be represented
as a unified counter. Thus, the predicate function doesn't need handle each
case separately.

Simplify the predicate function so that we just handle things differently
between RV32/RV64 and S/HS mode.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221701.41932-3-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

1466448324-Aug-2022 Atish Patra <atishp@rivosinc.com>

target/riscv: Add sscofpmf extension support

The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions,
and 'cofpmf' for Count OverFlow and Privilege Mode Filtering)
extension allows th

target/riscv: Add sscofpmf extension support

The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions,
and 'cofpmf' for Count OverFlow and Privilege Mode Filtering)
extension allows the perf to handle overflow interrupts and filtering
support. This patch provides a framework for programmable
counters to leverage the extension. As the extension doesn't have any
provision for the overflow bit for fixed counters, the fixed events
can also be monitoring using programmable counters. The underlying
counters for cycle and instruction counters are always running. Thus,
a separate timer device is programmed to handle the overflow.

Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221701.41932-2-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

3ec0fe1824-Aug-2022 Atish Patra <atishp@rivosinc.com>

target/riscv: Add vstimecmp support

vstimecmp CSR allows the guest OS or to program the next guest timer
interrupt directly. Thus, hypervisor no longer need to inject the
timer interrupt to the gues

target/riscv: Add vstimecmp support

vstimecmp CSR allows the guest OS or to program the next guest timer
interrupt directly. Thus, hypervisor no longer need to inject the
timer interrupt to the guest if vstimecmp is used. This was ratified
as a part of the Sstc extension.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221357.41070-4-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

43888c2f24-Aug-2022 Atish Patra <atishp@rivosinc.com>

target/riscv: Add stimecmp support

stimecmp allows the supervisor mode to update stimecmp CSR directly
to program the next timer interrupt. This CSR is part of the Sstc
extension which was ratified

target/riscv: Add stimecmp support

stimecmp allows the supervisor mode to update stimecmp CSR directly
to program the next timer interrupt. This CSR is part of the Sstc
extension which was ratified recently.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221357.41070-3-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

7cbcc53824-Aug-2022 Atish Patra <atishp@rivosinc.com>

hw/intc: Move mtimer/mtimecmp to aclint

Historically, The mtime/mtimecmp has been part of the CPU because
they are per hart entities. However, they actually belong to aclint
which is a MMIO device.

hw/intc: Move mtimer/mtimecmp to aclint

Historically, The mtime/mtimecmp has been part of the CPU because
they are per hart entities. However, they actually belong to aclint
which is a MMIO device.

Move them to the ACLINT device. This also emulates the real hardware
more closely.

Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221357.41070-2-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

dc9acc9c19-Aug-2022 Anup Patel <apatel@ventanamicro.com>

target/riscv: Use official extension names for AIA CSRs

The arch review of AIA spec is completed and we now have official
extension names for AIA: Smaia (M-mode AIA CSRs) and Ssaia (S-mode
AIA CSRs)

target/riscv: Use official extension names for AIA CSRs

The arch review of AIA spec is completed and we now have official
extension names for AIA: Smaia (M-mode AIA CSRs) and Ssaia (S-mode
AIA CSRs).

Refer, section 1.6 of the latest AIA v0.3.1 stable specification at
https://github.com/riscv/riscv-aia/releases/download/0.3.1-draft.32/riscv-interrupts-032.pdf)

Based on above, we update QEMU RISC-V to:
1) Have separate config options for Smaia and Ssaia extensions
which replace RISCV_FEATURE_AIA in CPU features
2) Not generate AIA INTC compatible string in virt machine

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20220820042958.377018-1-apatel@ventanamicro.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

e0dea2f515-Aug-2022 Rahul Pathak <rpathak@ventanamicro.com>

target/riscv: Add xicondops in ISA entry

XVentanaCondOps is Ventana custom extension. Add
its extension entry in the ISA Ext array

Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Reviewed-by

target/riscv: Add xicondops in ISA entry

XVentanaCondOps is Ventana custom extension. Add
its extension entry in the ISA Ext array

Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20220816045408.1231135-1-rpathak@ventanamicro.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

240b363616-Aug-2022 Atish Patra <atishp@rivosinc.com>

target/riscv: Remove additional priv version check for mcountinhibit

With .min_priv_version, additiona priv version check is uncessary
for mcountinhibit read/write functions.

Reviewed-by: Heiko Stu

target/riscv: Remove additional priv version check for mcountinhibit

With .min_priv_version, additiona priv version check is uncessary
for mcountinhibit read/write functions.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220816232321.558250-7-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

eacaf44003-Aug-2022 Weiwei Li <liweiwei@iscas.ac.cn>

target/riscv: Fix priority of csr related check in riscv_csrrw_check

Normally, riscv_csrrw_check is called when executing Zicsr instructions.
And we can only do access control for existed CSRs. So t

target/riscv: Fix priority of csr related check in riscv_csrrw_check

Normally, riscv_csrrw_check is called when executing Zicsr instructions.
And we can only do access control for existed CSRs. So the priority of
CSR related check, from highest to lowest, should be as follows:
1) check whether Zicsr is supported: raise RISCV_EXCP_ILLEGAL_INST if not
2) check whether csr is existed: raise RISCV_EXCP_ILLEGAL_INST if not
3) do access control: raise RISCV_EXCP_ILLEGAL_INST or RISCV_EXCP_VIRT_
INSTRUCTION_FAULT if not allowed

The predicates contain parts of function of both 2) and 3), So they need
to be placed in the middle of riscv_csrrw_check

Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn>
Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220803123652.3700-1-liweiwei@iscas.ac.cn>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

4696f0ab24-Jul-2022 Dao Lu <daolu@rivosinc.com>

target/riscv: Add Zihintpause support

Added support for RISC-V PAUSE instruction from Zihintpause extension,
enabled by default.

Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Alistair Fr

target/riscv: Add Zihintpause support

Added support for RISC-V PAUSE instruction from Zihintpause extension,
enabled by default.

Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Dao Lu <daolu@rivosinc.com>
Message-Id: <20220725034728.2620750-2-daolu@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

1ad3f9bd20-Jun-2022 eopXD <eop.chen@sifive.com>

target/riscv: rvv: Add option 'rvv_ma_all_1s' to enable optional mask agnostic behavior

According to v-spec, mask agnostic behavior can be either kept as
undisturbed or set elements' bits to all 1s.

target/riscv: rvv: Add option 'rvv_ma_all_1s' to enable optional mask agnostic behavior

According to v-spec, mask agnostic behavior can be either kept as
undisturbed or set elements' bits to all 1s. To distinguish the
difference of mask policies, QEMU should be able to simulate the mask
agnostic behavior as "set mask elements' bits to all 1s".

There are multiple possibility for agnostic elements according to
v-spec. The main intent of this patch-set tries to add option that
can distinguish between mask policies. Setting agnostic elements to
all 1s allows QEMU to express this.

This commit adds option 'rvv_ma_all_1s' is added to enable the
behavior, it is default as disabled.

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <165570784143.17634.35095816584573691-10@git.sr.ht>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

edabcd0e20-Jun-2022 Yueh-Ting (eop) Chen <eop.chen@sifive.com>

target/riscv: rvv: Add mask agnostic for vector permutation instructions

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <liwei

target/riscv: rvv: Add mask agnostic for vector permutation instructions

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <165570784143.17634.35095816584573691-9@git.sr.ht>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

35f2d79520-Jun-2022 Yueh-Ting (eop) Chen <eop.chen@sifive.com>

target/riscv: rvv: Add mask agnostic for vector mask instructions

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <liweiwei@isc

target/riscv: rvv: Add mask agnostic for vector mask instructions

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <165570784143.17634.35095816584573691-8@git.sr.ht>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

5b448f4420-Jun-2022 Yueh-Ting (eop) Chen <eop.chen@sifive.com>

target/riscv: rvv: Add mask agnostic for vector floating-point instructions

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <li

target/riscv: rvv: Add mask agnostic for vector floating-point instructions

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <165570784143.17634.35095816584573691-7@git.sr.ht>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

72e17a9f20-Jun-2022 Yueh-Ting (eop) Chen <eop.chen@sifive.com>

target/riscv: rvv: Add mask agnostic for vector fix-point arithmetic instructions

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei

target/riscv: rvv: Add mask agnostic for vector fix-point arithmetic instructions

Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <165570784143.17634.35095816584573691-6@git.sr.ht>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

show more ...

1...<<21222324252627282930>>...67