Skip to content

PCI Device firmware=false is not passed to qemu #2836

@stek29

Description

@stek29

Is there an existing issue for this?

  • There is no existing issue for this bug

Is this happening on an up to date version of Incus?

  • This is happening on a supported version of Incus

Incus system details

n/a, version is the latest stable 6.20.0

Instance details

# incus config device show testvm
satactl:
  address: "0000:01:00.0"
  firmware: "false"
  type: pci

Instance log

No response

Current behavior

Incus 6.19 (should) have added an option firmware to pci devices, which could be used to pass rombar=0 to qemu -- see #2698 and #2542.

when a pci device is created with firmware=false option – it should start the vm with rombar=0 passed to qemu for this device.
however, this it not a case right now – firmware option doesn't affect generated qemu config files at all.

for the given example (instance testvm device satactl):

$ sudo grep -A6 satactl /run/incus/testvm/qemu.conf
# PCI card ("satactl" device)
[device "dev-incus_satactl"]
driver = "vfio-pci"
bus = "qemu_pcie5"
addr = "00.0"
multifunction = "on"
host = "0000:01:00.0"

notice how the rombar isn't there even though firmware=false is set on the device.

Expected behavior

rombar=0 is passed to qemu:

$ sudo grep -A6 satactl /run/incus/testvm/qemu.conf
# PCI card ("satactl" device)
[device "dev-incus_satactl"]
addr = "00.0"
multifunction = "on"
host = "0000:01:00.0"
rombar = "0"
driver = "vfio-pci"
bus = "qemu_pcie5"

Steps to reproduce

  1. create an incus vm instance and add a pci device to it with firmware=false
  2. start the vm
  3. check qemu.conf -- rombar=0 won't be in the config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions