Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread 'main' panicked at 'unexpected value for VIRTIO_MMIO_INTERRUPT_ACK: 0x0', src/devices/virtio_blk.rs:333:21 #9

Open
ghost opened this issue Feb 12, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 12, 2021

Hi..

I get a "thread 'main' panicked' error when I try to run the provided linux binary.. I can run a backtrace if requested.

~/projects/rvemu$ ./target/release/rvemu-cli -k bin/linux/bbl.bin -f bin/linux/busybear.bin
bbl loader
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv
rr vvvvvvvvvvvvvvvvvvvvvv
rr vvvvvvvvvvvvvvvvvvvvvvvv rr
rrrr vvvvvvvvvvvvvvvvvvvvvvvvvv rrrr
rrrrrr vvvvvvvvvvvvvvvvvvvvvv rrrrrr
rrrrrrrr vvvvvvvvvvvvvvvvvv rrrrrrrr
rrrrrrrrrr vvvvvvvvvvvvvv rrrrrrrrrr
rrrrrrrrrrrr vvvvvvvvvv rrrrrrrrrrrr
rrrrrrrrrrrrrr vvvvvv rrrrrrrrrrrrrr
rrrrrrrrrrrrrrrr vv rrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr

   INSTRUCTION SETS WANT TO BE FREE

[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 4.19.0-rc3 (asami@blue) (gcc version 9.2.0 (GCC)) #181 SMP Sat Dec 5 10:27:09 JST 2020
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] Initial ramdisk at: 0x(ptrval) (512 bytes)
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 empty
[ 0.000000] Normal [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] software IO TLB: mapped [mem 0x83e3e000-0x87e3e000] (64MB)
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s25496 r8192 d31848 u65536
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 31815
[ 0.000000] Kernel command line: root=/dev/vda ro console=ttyS0
[ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Memory: 55720K/129024K available (3210K kernel code, 214K rwdata, 939K rodata, 148K init, 762K bss, 73304K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 53 interrupts to 1 (out of 2) handlers.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[ 0.004000] Console: colour dummy device 80x25
[ 0.004000] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=40000)
[ 0.008000] pid_max: default: 32768 minimum: 301
[ 0.012000] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.016000] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.056000] rcu: Hierarchical SRCU implementation.
[ 0.084000] smp: Bringing up secondary CPUs ...
[ 0.084000] smp: Brought up 1 node, 1 CPU
[ 0.096000] devtmpfs: initialized
[ 0.128000] random: get_random_u32 called from bucket_table_alloc+0x74/0x16a with crng_init=0
[ 0.136000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.140000] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.152000] NET: Registered protocol family 16
[ 0.348000] vgaarb: loaded
[ 0.372000] clocksource: Switched to clocksource riscv_clocksource
[ 0.624000] NET: Registered protocol family 2
[ 0.656000] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes)
[ 0.660000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.664000] TCP bind hash table entries: 1024 (order: 2, 16384 bytes)
[ 0.664000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.668000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.672000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.680000] NET: Registered protocol family 1
[ 0.692000] Unpacking initramfs...
[ 0.716000] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[ 1.168000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[ 1.168000] io scheduler noop registered
[ 1.172000] io scheduler deadline registered
[ 1.180000] io scheduler cfq registered (default)
[ 1.180000] io scheduler mq-deadline registered
[ 1.180000] io scheduler kyber registered
[ 2.712000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 2.756000] console [ttyS0] disabled
[ 2.760000] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 10, base_baud = 230400) is a 16550A
▒[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 4.19.0-rc3 (asami@blue) (gcc version 9.2.0 (GCC)) #181 SMP Sat Dec 5 10:27:09 JST 2020
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] Initial ramdisk at: 0x(ptrval) (512 bytes)
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 empty
[ 0.000000] Normal [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] software IO TLB: mapped [mem 0x83e3e000-0x87e3e000] (64MB)
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s25496 r8192 d31848 u65536
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 31815
[ 0.000000] Kernel command line: root=/dev/vda ro console=ttyS0
[ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Memory: 55720K/129024K available (3210K kernel code, 214K rwdata, 939K rodata, 148K init, 762K bss, 73304K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 53 interrupts to 1 (out of 2) handlers.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[ 0.004000] Console: colour dummy device 80x25
[ 0.004000] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=40000)
[ 0.008000] pid_max: default: 32768 minimum: 301
[ 0.012000] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.016000] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.056000] rcu: Hierarchical SRCU implementation.
[ 0.084000] smp: Bringing up secondary CPUs ...
[ 0.084000] smp: Brought up 1 node, 1 CPU
[ 0.096000] devtmpfs: initialized
[ 0.128000] random: get_random_u32 called from bucket_table_alloc+0x74/0x16a with crng_init=0
[ 0.136000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.140000] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.152000] NET: Registered protocol family 16
[ 0.348000] vgaarb: loaded
[ 0.372000] clocksource: Switched to clocksource riscv_clocksource
[ 0.624000] NET: Registered protocol family 2
[ 0.656000] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes)
[ 0.660000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.664000] TCP bind hash table entries: 1024 (order: 2, 16384 bytes)
[ 0.664000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.668000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.672000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.680000] NET: Registered protocol family 1
[ 0.692000] Unpacking initramfs...
[ 0.716000] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[ 1.168000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[ 1.168000] io scheduler noop registered
[ 1.172000] io scheduler deadline registered
[ 1.180000] io scheduler cfq registered (default)
[ 1.180000] io scheduler mq-deadline registered
[ 1.180000] io scheduler kyber registered
[ 2.712000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 2.756000] console [ttyS0] disabled
[ 2.760000] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 10, base_baud = 230400) is a 16550A
[ 6.388000] console [ttyS0] enabled
[ 6.388000] console [ttyS0] enabled
[ 6.668000] loop: module loaded
[ 6.668000] loop: module loaded
[ 6.732000] virtio_blk virtio0: [vda] 0 512-byte logical blocks (0 B/0 B)
[ 6.732000] virtio_blk virtio0: [vda] 0 512-byte logical blocks (0 B/0 B)
[ 6.864000] NET: Registered protocol family 10
[ 6.864000] NET: Registered protocol family 10
[ 6.952000] Segment Routing with IPv6
[ 6.952000] Segment Routing with IPv6
[ 7.016000] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 7.016000] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 7.104000] NET: Registered protocol family 17
[ 7.104000] NET: Registered protocol family 17
[ 7.176000] bootconsole [early0] uses init memory and must be disabled even before the real one is ready
[ 7.176000] bootconsole [early0] uses init memory and must be disabled even before the real one is ready
[ 7.236000] bootconsole [early0] disabled
[ 7.236000] bootconsole [early0] disabled
▒thread 'main' panicked at 'unexpected value for VIRTIO_MMIO_INTERRUPT_ACK: 0x0', src/devices/virtio_blk.rs:333:21
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

@ghost ghost changed the title hread 'main' panicked at 'unexpected value for VIRTIO_MMIO_INTERRUPT_ACK: 0x0', src/devices/virtio_blk.rs:333:21 thread 'main' panicked at 'unexpected value for VIRTIO_MMIO_INTERRUPT_ACK: 0x0', src/devices/virtio_blk.rs:333:21 Feb 12, 2021
@d0iasm
Copy link
Owner

d0iasm commented Feb 21, 2021

Thank you for filing the issue!

This is an expected failure because the implementation of virtio_blk has a problem for running Linux yet. I'm trying to fix this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant