[libvirt] [PATCH] qemu: Don't use legacy USB for RISC-V guests

Andrea Bolognani posted 1 patch 5 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180824120322.21707-1-abologna@redhat.com
Test syntax-check passed
src/qemu/qemu_command.c                  | 4 +++-
tests/qemuxml2argvdata/riscv64-virt.args | 1 -
2 files changed, 3 insertions(+), 2 deletions(-)
[libvirt] [PATCH] qemu: Don't use legacy USB for RISC-V guests
Posted by Andrea Bolognani 5 years, 8 months ago
The architecture is new enough that we don't need to
concern ourselves with backwards compatibility in any
capacity.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
Requires

  https://www.redhat.com/archives/libvir-list/2018-June/msg01223.html

to be applied (and test data to be refreshed in the process).

 src/qemu/qemu_command.c                  | 4 +++-
 tests/qemuxml2argvdata/riscv64-virt.args | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 88d698e262..bac7c938ab 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3046,7 +3046,8 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd,
             if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
                 cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT &&
                 !qemuDomainIsQ35(def) &&
-                !qemuDomainIsARMVirt(def)) {
+                !qemuDomainIsARMVirt(def) &&
+                !qemuDomainIsRISCVVirt(def)) {
 
                 /* An appropriate default USB controller model should already
                  * have been selected in qemuDomainDeviceDefPostParse(); if
@@ -3085,6 +3086,7 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd,
     if (usbcontroller == 0 &&
         !qemuDomainIsQ35(def) &&
         !qemuDomainIsARMVirt(def) &&
+        !qemuDomainIsRISCVVirt(def) &&
         !ARCH_IS_S390(def->os.arch)) {
         /* We haven't added any USB controller yet, but we haven't been asked
          * not to add one either. Add a legacy USB controller, unless we're
diff --git a/tests/qemuxml2argvdata/riscv64-virt.args b/tests/qemuxml2argvdata/riscv64-virt.args
index 0e103a6755..a373ff2b92 100644
--- a/tests/qemuxml2argvdata/riscv64-virt.args
+++ b/tests/qemuxml2argvdata/riscv64-virt.args
@@ -21,7 +21,6 @@ server,nowait \
 -no-shutdown \
 -kernel /var/lib/libvirt/images/bbl \
 -append 'console=ttyS0 ro root=/dev/vda' \
--usb \
 -drive file=/var/lib/libvirt/images/stage4-disk.img,format=raw,if=none,\
 id=drive-virtio-disk0 \
 -device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Don't use legacy USB for RISC-V guests
Posted by Ján Tomko 5 years, 8 months ago
On Fri, Aug 24, 2018 at 02:03:22PM +0200, Andrea Bolognani wrote:
>The architecture is new enough that we don't need to
>concern ourselves with backwards compatibility in any
>capacity.
>
>Signed-off-by: Andrea Bolognani <abologna@redhat.com>
>---
>Requires
>
>  https://www.redhat.com/archives/libvir-list/2018-June/msg01223.html
>
>to be applied (and test data to be refreshed in the process).

With the above conditions satisfied:


Reviewed-by: Ján Tomko <jtomko@redhat.com>

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