Hello,
here's patches I've used in order to be able to run RISC-V guests with
libvirtd. In case you're interested in having RISC-V support you may
want to have a look.
There are some problems I am aware of, though not really able to
address. I might be wrong about some points -- whoever is more familiar
with QEMU, RISC-V or libvirt please correct me:
* Essentially only the "virt" machine is useful, because others don't
seem to support storage or network (as of qemu-2.12). It is not
default though, so creating a reasonable guest configuration is not
intuitive.
* The serial port used by the "virt" machine is NS16550A connected to
the platform bus, but it doesn't seem to appear in the QEMU device
model. I hardcoded it in qemuChrIsPlatformDevice() and
qemuDomainChrDefPostParse() so that we end up defaulting to the
correct one for the virt machine.
* The tests were in a large part cargo-culted. I made some effort
to cover what I thought was important, but it likely needs a better
pair of eyes than mine. More in the idividual patches.
In any case, I am able to boot Fedora and things seem to work well in
general. I'll be thankful for feedback (and even more thankful if anyone
more familiar with libvirtd picks up the patchset :).
Hope this is useful,
Lubo
Diffstat follows.
Lubomir Rintel (9):
conf: add an option to specify a NS16550A serial port
qemu: enable GIC only on AArch64
qemu: rename qemuDomainAssignARMVirtioMMIOAddresses()
util: add RISC-V support
tests/capabilitiestest: add RISC-V capability tests
tests/util: add RISC-V capabilities
tests/captest: check RISC-V capabilities lookup
tests/qemuxml2argvtest: test RISC-V virt machine arguments
tests/virschematest: add RISC-V to capabilityschemadata/caps-qemu-kvm
docs/schemas/basictypes.rng | 2 +
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 1 +
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 17 +-
src/qemu/qemu_domain.c | 24 +-
src/qemu/qemu_domain_address.c | 27 +-
src/util/virarch.c | 3 +
src/util/virarch.h | 6 +
tests/capabilityschemadata/caps-qemu-kvm.xml | 36 +
.../caps_2.12.0.riscv32.replies | 14420 ++++++++++++++++
.../caps_2.12.0.riscv32.xml | 119 +
.../caps_2.12.0.riscv64.replies | 14420 ++++++++++++++++
.../caps_2.12.0.riscv64.xml | 119 +
tests/qemucapabilitiestest.c | 2 +
tests/qemuxml2argvdata/riscv64-virt.args | 29 +
tests/qemuxml2argvdata/riscv64-virt.xml | 34 +
tests/qemuxml2argvtest.c | 2 +
.../riscv64-virt.xml | 37 +
tests/testutilsqemu.c | 72 +
tests/vircapstest.c | 6 +
21 files changed, 29354 insertions(+), 24 deletions(-)
create mode 100644 tests/qemucapabilitiesdata/caps_2.12.0.riscv32.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.12.0.riscv32.xml
create mode 100644 tests/qemucapabilitiesdata/caps_2.12.0.riscv64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.12.0.riscv64.xml
create mode 100644 tests/qemuxml2argvdata/riscv64-virt.args
create mode 100644 tests/qemuxml2argvdata/riscv64-virt.xml
create mode 100644 tests/qemuxml2startupxmloutdata/riscv64-virt.xml
--
2.17.0