[libvirt] [PATCH v3 0/9] RISC-V Guest Support

Lubomir Rintel posted 9 patches 5 years, 8 months ago
Only 8 patches received!
docs/news.xml                                 |     8 +
docs/schemas/basictypes.rng                   |     2 +
src/qemu/qemu_capabilities.c                  |     6 +-
src/qemu/qemu_command.c                       |     4 +-
src/qemu/qemu_domain.c                        |    46 +-
src/qemu/qemu_domain.h                        |     9 +-
src/qemu/qemu_domain_address.c                |    34 +-
src/util/virarch.c                            |     5 +-
src/util/virarch.h                            |     8 +-
tests/capabilityschemadata/caps-qemu-kvm.xml  |    36 +
.../caps_3.0.0.riscv32.replies                | 14819 ++++++++++++++++
.../caps_3.0.0.riscv32.xml                    |   118 +
.../caps_3.0.0.riscv64.replies                | 14819 ++++++++++++++++
.../caps_3.0.0.riscv64.xml                    |   118 +
tests/qemucapabilitiestest.c                  |     2 +
tests/qemuxml2argvdata/riscv64-virt.args      |    30 +
tests/qemuxml2argvdata/riscv64-virt.xml       |    32 +
tests/qemuxml2argvtest.c                      |     3 +
.../riscv64-virt.xml                          |    42 +
tests/qemuxml2xmloutdata/riscv64-virt.xml     |    36 +
tests/qemuxml2xmltest.c                       |     2 +
tests/testutilsqemu.c                         |    72 +
tests/vircapstest.c                           |     6 +
23 files changed, 30232 insertions(+), 25 deletions(-)
create mode 100644 tests/qemucapabilitiesdata/caps_3.0.0.riscv32.replies
create mode 100644 tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
create mode 100644 tests/qemucapabilitiesdata/caps_3.0.0.riscv64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_3.0.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
create mode 100644 tests/qemuxml2xmloutdata/riscv64-virt.xml
[libvirt] [PATCH v3 0/9] RISC-V Guest Support
Posted by Lubomir Rintel 5 years, 8 months ago
Hi.

Third iteration of RISC-V guest support. I believe I addressed all
points of Andrea's review. Tested with: images from [1]:

  virt-install \
    --import --name riscv64 \
    --arch riscv64 --machine virt \
    --memory 2048 \
    --rng /dev/urandom \
    --disk /var/lib/libvirt/images/stage4-disk.img,bus=virtio  \
    --boot kernel=/var/lib/libvirt/images/bbl,kernel_args="console=ttyS0 ro root=/dev/vda"

[1] https://fedorapeople.org/groups/risc-v/disk-images/

Note that the large test suite changes that touch the '*.replies' files
seem to upset the mail server, thus you're unlikely to receive them from
the list. You can get them straight from my repository instead:

  git pull https://github.com/lkundrak/libvirt.git lr/riscv-v3

Changes since v2:
 * Regenerated cap test data with QEMU 3.0.0
 * Squashed the tests together
 * Folded "docs/schemas: add RISC-V architectures" into "util: add RISC-V architectures"
 * Streamlined the Virtio MMIO address assignment
 * Added qemuDomainIsRISCVVirt() and qemuDomainMachineIsRISCVVirt()
 * Cosmetic changes to "util: add RISC-V architectures"
 * New commits:
    qemu: add qemuDomainAssignVirtioMMIOAddresses()
    qemu: add qemuDomainIsRISCVVirt() and qemuDomainMachineIsRISCVVirt()
    qemu: RISC-V machines have no PCI
    news: Add a mention of RISC-V guest support
 * Dropped:
    qemu: no USB by default on RISC-V machines
    (not sure why I thought this was needed)

Lubomir Rintel (9):
  qemu: rename qemuDomainMachineIsVirt()
  qemu: rename qemuDomainArmVirt()
  util: add RISC-V architectures
  qemu: RISC-V machines have no PCI
  qemu: add qemuDomainIsRISCVVirt() and qemuDomainMachineIsRISCVVirt()
  qemu: add qemuDomainAssignVirtioMMIOAddresses()
  qemu: assign addresses to virtio devices on RISC-V
  tests: Add RISC-V architectures
  news: Add a mention of RISC-V guest support

 docs/news.xml                                 |     8 +
 docs/schemas/basictypes.rng                   |     2 +
 src/qemu/qemu_capabilities.c                  |     6 +-
 src/qemu/qemu_command.c                       |     4 +-
 src/qemu/qemu_domain.c                        |    46 +-
 src/qemu/qemu_domain.h                        |     9 +-
 src/qemu/qemu_domain_address.c                |    34 +-
 src/util/virarch.c                            |     5 +-
 src/util/virarch.h                            |     8 +-
 tests/capabilityschemadata/caps-qemu-kvm.xml  |    36 +
 .../caps_3.0.0.riscv32.replies                | 14819 ++++++++++++++++
 .../caps_3.0.0.riscv32.xml                    |   118 +
 .../caps_3.0.0.riscv64.replies                | 14819 ++++++++++++++++
 .../caps_3.0.0.riscv64.xml                    |   118 +
 tests/qemucapabilitiestest.c                  |     2 +
 tests/qemuxml2argvdata/riscv64-virt.args      |    30 +
 tests/qemuxml2argvdata/riscv64-virt.xml       |    32 +
 tests/qemuxml2argvtest.c                      |     3 +
 .../riscv64-virt.xml                          |    42 +
 tests/qemuxml2xmloutdata/riscv64-virt.xml     |    36 +
 tests/qemuxml2xmltest.c                       |     2 +
 tests/testutilsqemu.c                         |    72 +
 tests/vircapstest.c                           |     6 +
 23 files changed, 30232 insertions(+), 25 deletions(-)
 create mode 100644 tests/qemucapabilitiesdata/caps_3.0.0.riscv32.replies
 create mode 100644 tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
 create mode 100644 tests/qemucapabilitiesdata/caps_3.0.0.riscv64.replies
 create mode 100644 tests/qemucapabilitiesdata/caps_3.0.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
 create mode 100644 tests/qemuxml2xmloutdata/riscv64-virt.xml

-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/9] RISC-V Guest Support
Posted by Andrea Bolognani 5 years, 8 months ago
On Wed, 2018-08-22 at 11:15 +0200, Lubomir Rintel wrote:
[...]
>  * Dropped:
>     qemu: no USB by default on RISC-V machines
>     (not sure why I thought this was needed)

I won't hold up the series because of it - in fact I intend to
push it as soon as you have given me feedback for the few trivial
questions I've raised during review - but I think this decision
should be reverted.

I've noticed that the generated command line contains -usb, which
is the legacy syntax for USB support: these days guests are
supposed to use -device instead, hopefully with a virt-friendly
USB controller such as qemu-xhci. All those controllers are PCI,
though, so they won't be usable on RISC-V until the architecture
grows PCI support in QEMU...

Still, we have spent a long time moving away from -usb and I
don't think we should be introducing any more uses of it, so we
should write a follow-up patch that gets rid of that in addition
to getting patch 5/11 from v2 in.

It's not like RISC-V guests would have much use for a USB
controller anyway...

  $ qemu-system-riscv64 -device help 2>&1 | grep -i usb
  name "usb-redir", bus usb-bus
  $

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list