[PATCH 0/4] conf, qemu: add loader type='none'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Fedora Rawhide for RISC-V requires '-bios none' to properly boot
because its kernel is overwriting the default OpenSBI binary QEMU uses,
causing the following error:

$ sudo ./run tools/virsh start --console riscv-fedora 
error: Failed to start domain 'riscv-fedora'
error: internal error: process exited while connecting to monitor: 2023-03-20T17:31:02.650862Z qemu-system-riscv64: Some ROM regions are overlapping
These ROM regions might have been loaded by direct user request or by default.
They could be BIOS/firmware images, a guest kernel, initrd or some other file loaded into guest memory.
Check whether you intended to load all this guest code, and whether it has been built to load to the correct addresses.

Other archs, such as PPC64 pseries, also requires "-bios none" if the
user wants QEMU to not load any default firmware.

At this moment libvirt doesn't support this option in the official API,
meaning we need to go to the <qemu:commandline> route to allow the
domain to boot, tainting it. And with a chance of weird interactions
with firmware autoselect.

These patches add official XML support for '-bios none' for QEMU domains
using a XML as follows: 

<os>
  <loader type='none'/>
   (...)
</os>

The pre-conditions of this format are (1) no loader->path and (2) only
manual autoselect. Everything else is already covered by libvirt as
corner cases of existing firmware features.


Daniel Henrique Barboza (4):
  conf: add loader type 'none'
  qemu: handle bios 'none' case in qemuFirmwareFillDomain()
  qemu, tests: add -bios none command line
  docs: Document loader 'none' attribute

 docs/formatdomain.rst                         |  7 +++++
 src/conf/domain_conf.c                        |  5 +--
 src/conf/domain_validate.c                    |  2 +-
 src/conf/schemas/domaincommon.rng             |  1 +
 src/qemu/qemu_command.c                       |  6 ++++
 src/qemu/qemu_firmware.c                      | 10 ++++++
 .../firmware-bios-none.riscv64-latest.args    | 31 +++++++++++++++++++
 tests/qemuxml2argvdata/firmware-bios-none.xml | 18 +++++++++++
 tests/qemuxml2argvtest.c                      |  2 ++
 9 files changed, 79 insertions(+), 3 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/firmware-bios-none.riscv64-latest.args
 create mode 100644 tests/qemuxml2argvdata/firmware-bios-none.xml

-- 
2.39.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux