summaryrefslogtreecommitdiffstats
path: root/hw/riscv/virt.c
diff options
context:
space:
mode:
authorAnup Patel2020-02-02 14:42:17 +0100
committerPalmer Dabbelt2020-02-27 22:46:37 +0100
commit5f3616ccceb5d5c49f99838c78498e581fb42fc5 (patch)
treed44d99603f2329c984d4d9d2ba3ffccab382b50a /hw/riscv/virt.c
parenttarget/riscv: Emulate TIME CSRs for privileged mode (diff)
downloadqemu-5f3616ccceb5d5c49f99838c78498e581fb42fc5.tar.gz
qemu-5f3616ccceb5d5c49f99838c78498e581fb42fc5.tar.xz
qemu-5f3616ccceb5d5c49f99838c78498e581fb42fc5.zip
hw/riscv: Provide rdtime callback for TCG in CLINT emulation
This patch extends CLINT emulation to provide rdtime callback for TCG. This rdtime callback will be called wheneven TIME CSRs are read in privileged modes. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'hw/riscv/virt.c')
-rw-r--r--hw/riscv/virt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 5d175d5c9e..85ec9e22aa 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -593,7 +593,7 @@ static void riscv_virt_board_init(MachineState *machine)
memmap[VIRT_PLIC].size);
sifive_clint_create(memmap[VIRT_CLINT].base,
memmap[VIRT_CLINT].size, smp_cpus,
- SIFIVE_SIP_BASE, SIFIVE_TIMECMP_BASE, SIFIVE_TIME_BASE);
+ SIFIVE_SIP_BASE, SIFIVE_TIMECMP_BASE, SIFIVE_TIME_BASE, true);
sifive_test_create(memmap[VIRT_TEST].base);
for (i = 0; i < VIRTIO_COUNT; i++) {