Skip to content

Panic in mmio_pci_bar_handler when starting zone1 on qemu-gicv3 in release mode #234

@li041

Description

@li041

Description:

When starting zone1 in release mode, hvisor panics in mmio_pci_bar_handler. The same zone works fine in debug mode. The panic occurs at the line where panic! is explicitly called, reporting the PCI BAR MMIO address.

How to reproduce

  1. build hvisor in release mode and start qemu: make BID=aarch64/qemu-gicv3 MODE=release LOG=info run
  2. then start zone1 as usual

Observed behavior:

[ERROR 3] (hvisor::panic:24) panic occurred: PanicInfo {
    payload: Any { .. },
    message: Some(
        mmio pci bar: 0x8100004014,
    ),
    location: Location {
        file: "src/pci/pci.rs",
        line: 447,
        col: 5,
    },
    can_unwind: true,
    force_no_backtrace: false,
} 

Additional information:

  • Panic occurs in the following function:
pub fn mmio_pci_bar_handler(mmio: &mut MMIOAccess, base: usize) -> HvResult {
    panic!("mmio pci bar: {:#x}", mmio.address + base);
    mmio_perform_access(base, mmio);
    Ok(())
}
  • It seems related to PCI BAR MMIO access, and this function call panic explicitly.

Environment:

  • Hvisor commit: 2c14ab4
  • Architecture: aarch64
  • platform: qemu-gicv3

Suggested investigation:

  • Why mmio_pci_bar_handler is triggered in release mode but not debug mode.
  • Potential differences in memory layout, optimization, or uninitialized variables.

Metadata

Metadata

Assignees

Labels

aarch64bugSomething isn't workingciGithub CIquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions