OpenXiangShan / NEMU

Other
236 stars 90 forks source link

Xvisor hangs when RVV is enabled #405

Closed shinezyy closed 3 months ago

shinezyy commented 3 months ago

Here is my config:

diff .config configs/riscv64-rvh_defconfig
20,21c20
< # CONFIG_RV_ZICOND is not set
< CONFIG_RVV=y
---
> # CONFIG_RVV is not set
26,29d24
< # CONFIG_RV_AIA is not set
< # CONFIG_RV_ZICNTR is not set
< # CONFIG_RV_ZIHPM is not set
< # CONFIG_RV_CSR_MCOUNTINHIBIT is not set
37,40d31
<
< #
< # PMP Check Disabled when enabling PERF_OPT
< #
42,43d32
< # CONFIG_RV_SSCOFPMF is not set
< # CONFIG_RV_SMSTATEEN is not set
49d37
< # CONFIG_RVV_AGNOSTIC is not set
111a100,101
> # CONFIG_HAS_UART_SNPS is not set
> CONFIG_HAS_PLIC=y
116,117d105
< # CONFIG_HAS_UART_SNPS is not set
< CONFIG_HAS_PLIC=y

My command:

./build/riscv64-nemu-interpreter -b /ci/test-home/xvisor

Additional infomation:

log of hanging:

[guest0/uart0] [ 0.465355] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages [guest0/uart0] [ 0.476465] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page [guest0/uart0] [ 0.505006] SCSI subsystem initialized [guest0/uart0] [ 0.519936] clocksource: Switched to clocksource riscv_clocksource [guest0/uart0] [ 0.815528] Unpacking initramfs... [guest0/uart0] [ 1.136904] workingset: timestamp_bits=46 max_order=16 bucket_order=0 [guest0/uart0] [ 1.313913] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [guest0/uart0] [ 1.325980] io scheduler mq-deadline registered [guest0/uart0] [ 1.333745] io scheduler kyber registered [guest0/uart0] [ 1.350324] simple-framebuffer 50000000.simplefb: framebuffer at 0x50000000, 0x1000000 bytes [guest0/uart0] [ 1.364524] simple-framebuffer 50000000.simplefb: format=a8r8g8b8, mode=1600x900x32, linelength=6400 [guest0/uart0] [ 1.672723] Console: switching to colour frame buffer device 200x56 [guest0/uart0] [ 11.422723] Freeing initrd memory: 16384K [guest0/uart0] [ 11.437981] simple-framebuffer 50000000.simplefb: fb0: simplefb registered! [guest0/uart0] [ 11.485607] virtio_rpmsg_bus virtio3: rpmsg host is online [guest0/uart0] [ 11.524775] input: Xvisor VirtIO Input as /devices/platform/smb/20004000.virtio_input/virtio4/input/input0 [guest0/uart0] [ 13.125953] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [guest0/uart0] [ 13.165678] printk: console [ttyS0] disabled [guest0/uart0] [ 13.175128] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 3, base_baud = 230400) is a 16550A [guest0/uart0] [ 13.189789] printk: console [ttyS0] enabled [guest0/uart0] [ 13.189789] printk: console [ttyS0] enabled [guest0/uart0] [ 13.204248] printk: bootconsole [uart8250] disabled [guest0/uart0] [ 13.204248] printk: bootconsole [uart8250] disabled [guest0/uart0] [ 13.401078] loop: module loaded [guest0/uart0] [ 13.409306] virtio_blk virtio1: 1/0/0 default/read/poll queues [guest0/uart0] [ 13.428143] virtio_blk virtio1: [vda] 0 512-byte logical blocks (0 B/0 B) [guest0/uart0] [ 13.469830] mousedev: PS/2 mouse device common for all mice [guest0/uart0] [ 13.489884] goldfish_rtc 10003000.rtc: registered as rtc0 [guest0/uart0] [ 13.499799] goldfish_rtc 10003000.rtc: setting system clock to 1970-01-01T00:00:15 UTC (15) [guest0/uart0] [ 13.523079] sdhci: Secure Digital Host Controller Interface driver [guest0/uart0] [ 13.533752] sdhci: Copyright(c) Pierre Ossman [guest0/uart0] [ 13.541572] sdhci-pltfm: SDHCI platform and OF driver helper [guest0/uart0] [ 13.666413] debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table helpers [guest0/uart0] [ 13.732509] Legacy PMU implementation is available [guest0/uart0] [ 13.778546] Freeing unused kernel image (initmem) memory: 2156K [guest0/uart0]

Full log is attached test.log

shinezyy commented 3 months ago

It is not related to RVV. It is because I miss this command: echo "#define CONFIG_DETERMINISTIC 1" >> ./include/generated/autoconf.h