kernkonzept / uvmm

Virtual machine monitor for L4Re
27 stars 6 forks source link

uvmm/server/src/arm/gic.h: 814: Gic::Irq_array::Const_irq Gic::Dist::spi(unsigned int) const: Assertion `spi < _spis.size()' failed #2

Closed chiaqi closed 10 months ago

chiaqi commented 1 year ago

Hardware Pass Through a device, the device interrupt number is 625,The following errors appeared during the startup process: MOE: rwfs name space cap -> [C:105000] BOOTFS: [6219d000-62276048] [C:107000] uvmm BOOTFS: [62277000-62295180] [C:109000] l4re BOOTFS: [62296000-62311980] [C:10b000] ned BOOTFS: [62312000-62312ec6] [C:10d000] virt-arm_virt-64.dtb BOOTFS: [62313000-62427ec9] [C:10f000] ramdisk-armv8-64.cpio.gz BOOTFS: [62428000-62428fb1] [C:111000] vmm.lua BOOTFS: [62429000-624292a1] [C:113000] uvmm-io.ned BOOTFS: [6242a000-6454a200] [C:115000] Image.gz BOOTFS: [6454b000-64592360] [C:117000] cons BOOTFS: [64593000-647d84e0] [C:119000] io BOOTFS: [647d9000-647d94fd] [C:11b000] io.cfg BOOTFS: [647da000-647da47e] [C:11d000] vm_hw.vbus MOE: cmdline: moe rom/uvmm-io.ned MOE: Starting: rom/ned rom/uvmm-io.ned MOE: loading 'rom/ned' Ned says: Hi World! Ned: loading file: 'rom/uvmm-io.ned' Console Server cons> Created vcon channel: io [420010] cons> Created vcon channel: vm1 [421010] cons> Created vcon channel: mon1 [422010] cons> io | Io service io | Verboseness level: 7 io | unused physical memory space: io | [00000000000000-00000060ffffff] io | [00000080000000-ffffffffffffffff] io | no 'iommu' capability found, using CPU-phys for DMA io | Loading: config 'rom/io.cfg' io | Loading: config 'rom/vm_hw.vbus' vm1 | VMM[GIC]: create ARM GICv3, tnlines:16 io | Add IRQ resources to vbus: IRQ [0000000000028c-0000000000028c 1] level high (align=0 flags=300001) vm1 | VMM[-Irq_array]: irqs:512 io | Add IRQ resources to vbus: IRQ [00000000000292-00000000000292 1] none (align=0 flags=1) io | Add IRQ resources to vbus: IRQ [00000000000297-00000000000297 1] none (align=0 flags=1) io | Add IRQ resources to vbus: IRQ [00000000000291-00000000000291 1] none (align=0 flags=1) io | vm_hw: [N12_GLOBAL__N_112Virtual_sbusE] io | Resources: ==== start ==== io | Resources: ===== end ===== io | L4ICU: [N2Vi6Sw_icuE] io | Resources: ==== start ==== io | Resources: ===== end ===== io | crg_clk: [N2Vi9Proxy_devE] io | Resources: ==== start ==== io | IOMEM [00000058100000-000000581fffff 100000] 32-bit non-pref (align=fffff flags=300002) io | IOMEM [00000032070000-0000003207ffff 10000] 32-bit non-pref (align=ffff flags=300002) io | IOMEM [0000005c3f0000-0000005c3fffff 10000] 32-bit non-pref (align=ffff flags=300002) io | IOMEM [000000e6d80000-000000e6d80fff 1000] 32-bit non-pref (align=fff flags=300002) io | Resources: ===== end ===== io | dwc_usb3: [N2Vi9Proxy_devE] io | Resources: ==== start ==== io | IOMEM [000000e7490000-000000e749ffff 10000] 32-bit non-pref (align=ffff flags=300002) io | IRQ [0000000000028c-0000000000028c 1] level high (align=0 flags=300001) io | Resources: ===== end ===== io | usb3_phy: [N2Vi9Proxy_devE] io | Resources: ==== start ==== io | IOMEM [000000e74a0000-000000e74dffff 40000] 32-bit non-pref (align=3ffff flags=300002) io | Resources: ===== end ===== io | smmu_usb3: [N2Vi9Proxy_devE] io | Resources: ==== start ==== io | IOMEM [000000e7400000-000000e747ffff 80000] 32-bit non-pref (align=7ffff flags=300002) io | IRQ [00000000000292-00000000000292 1] none (align=0 flags=1) io | IRQ [00000000000297-00000000000297 1] none (align=0 flags=1) io | IRQ [00000000000291-00000000000291 1] none (align=0 flags=1) io | Resources: ===== end ===== io | dwc_usb3_jy: [N2Vi9Proxy_devE] io | Resources: ==== start ==== io | Resources: ===== end ===== io | Real Hardware ----------------------------------- io | System Bus: io | Resources: ==== start ==== io | DMADOM [00000000000000-00000000000000 1] (align=0 flags=6) io | Resources: ===== end ===== io | crg_clk: io | compatible= { "jy-crg-clock" } io | Clients: ===== start ==== io | crg_clk: [N2Vi9Proxy_devE] io | Clients: ===== end ==== io | Resources: ==== start ==== io | IOMEM [00000058100000-000000581fffff 100000] 32-bit non-pref (align=fffff flags=300002) io | IOMEM [00000032070000-0000003207ffff 10000] 32-bit non-pref (align=ffff flags=300002) io | IOMEM [0000005c3f0000-0000005c3fffff 10000] 32-bit non-pref (align=ffff flags=300002) io | IOMEM [000000e6d80000-000000e6d80fff 1000] 32-bit non-pref (align=fff flags=300002) io | Resources: ===== end ===== io | dwc_usb3: io | compatible= { "snps,dwc3" } io | Clients: ===== start ==== io | dwc_usb3: [N2Vi9Proxy_devE] io | Clients: ===== end ==== io | Resources: ==== start ==== io | IOMEM [000000e7490000-000000e749ffff 10000] 32-bit non-pref (align=ffff flags=300002) io | IRQ [0000000000028c-0000000000028c 1] level high (align=0 flags=300001) io | Resources: ===== end ===== io | usb3_phy: io | compatible= { "usb3-phy" } io | Clients: ===== start ==== io | usb3_phy: [N2Vi9Proxy_devE] io | Clients: ===== end ==== io | Resources: ==== start ==== io | IOMEM [000000e74a0000-000000e74dffff 40000] 32-bit non-pref (align=3ffff flags=300002) io | Resources: ===== end ===== io | dwc_usb3_jy: io | compatible= { "jy-dwusb31" } io | Clients: ===== start ==== io | dwc_usb3_jy: [N2Vi9Proxy_devE] io | Clients: ===== end ==== io | Resources: ==== start ==== io | Resources: ===== end ===== io | smmu_usb3: io | compatible= { "arm,smmu-v3" } io | Clients: ===== start ==== io | smmu_usb3: [N2Vi9Proxy_devE] io | Clients: ===== end ==== io | Resources: ==== start ==== io | IOMEM [000000e7400000-000000e747ffff 80000] 32-bit non-pref (align=7ffff flags=300002) io | IRQ [00000000000292-00000000000292 1] none (align=0 flags=1) io | IRQ [00000000000297-00000000000297 1] none (align=0 flags=1) io | IRQ [00000000000291-00000000000291 1] none (align=0 flags=1) io | Resources: ===== end ===== io | warning: could not register control interface at cap 'platform_ctl' io | Ready. Waiting for request. io | vbus vm_hw does not support a global DMA domain vm1 | VMM[main]: Hello out there. vm1 | VMM[]: virtio_net@10000.l4vmm,virtiocap: capability net is invalid. vm1 | VMM[vm]: Device creation for virtual device virtio_net@10000 failed. Disabling device. vm1 | rom/uvmm: /fiasco-l4/src/l4/pkg/uvmm/server/src/arm/gic.h: 814: Gic::Irq_array::Const_irq Gic::Dist::spi(unsigned int) const: Assertion `spi < _spis.size()' failed.

I found that it was because the _spis size was set to tnlines 32 during initialization, and tnlines = 16 "Dist::Dist(unsigned tnlines, unsigned max_cpus) : gicd_trace(Dbg::Irq, Dbg::Trace, "GICD"), ctlr(0), tnlines(tnlines), _cpu(max_cpus), _spis(tnlines 32)"

Irq_array::Const_irq spi(unsigned spi) const { assert (spi < _spis.size()); // 625 > 512 //tnlines*32 halt here return _spis[spi]; }

alacko commented 1 year ago

Thx!