mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
S390: Do not generate a default USB controller
For s390 we don't want to have a default USB device generated even if QEMU is silently tolerating -usb on the command line. This may change in the future. Another reason to avoid the USB controller is that it implies a PCI bus which might cause a regression at some later point in time. The following change will set the USB controller model to 'none' unless a model or address has been specified, which can be the case if a legacy definition is loaded or the XML writer knows what she/he's doing. Requiring the user to explicitly disable USB on systems not supporting it seems cumbersome. Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
parent
3e82b5ccda
commit
3a82f628a9
@ -784,6 +784,14 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
||||
(def->os.arch == VIR_ARCH_S390 || def->os.arch == VIR_ARCH_S390X))
|
||||
dev->data.chr->targetType = VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO;
|
||||
|
||||
/* set the default USB model to none for s390 unless an address is found */
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER &&
|
||||
dev->data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
|
||||
dev->data.controller->model == -1 &&
|
||||
dev->data.controller->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
|
||||
(def->os.arch == VIR_ARCH_S390 || def->os.arch == VIR_ARCH_S390X))
|
||||
dev->data.controller->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE;
|
||||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
|
@ -2,7 +2,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
|
||||
s390-virtio -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev \
|
||||
socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon \
|
||||
chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 -device \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 -device \
|
||||
virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0 \
|
||||
-chardev pty,id=charconsole0 \
|
||||
-device sclpconsole,chardev=charconsole0,id=console0
|
||||
|
@ -3,7 +3,7 @@ s390-ccw -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev \
|
||||
socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon \
|
||||
chardev=charmonitor,id=monitor,mode=readline -no-acpi \
|
||||
-device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0001 \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
|
||||
-chardev pty,id=charconsole0 \
|
||||
-device virtconsole,chardev=charconsole0,id=console0 \
|
||||
|
@ -3,7 +3,7 @@ s390-virtio -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev \
|
||||
socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon \
|
||||
chardev=charmonitor,id=monitor,mode=readline -no-acpi \
|
||||
-device virtio-serial-s390,id=virtio-serial0 \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
|
||||
-chardev pty,id=charconsole0 \
|
||||
-device virtconsole,chardev=charconsole0,id=console0
|
||||
|
@ -1,7 +1,7 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \
|
||||
-M s390-ccw -m 214 -smp 1 -nographic -nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-ccw,devno=0.0.0007,drive=drive-virtio-disk0,id=virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest4,if=none,id=drive-virtio-disk1 \
|
||||
-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk1,id=virtio-disk1 \
|
||||
|
@ -1,7 +1,7 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \
|
||||
-M s390-ccw -m 214 -smp 1 -nographic -nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,id=virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-virtio-disk1 \
|
||||
-device virtio-blk-ccw,devno=0.0.0007,drive=drive-virtio-disk1,id=virtio-disk1 \
|
||||
|
@ -1,5 +1,5 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \
|
||||
-M s390-virtio -m 214 -smp 1 -nographic -nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0
|
||||
|
@ -2,7 +2,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \
|
||||
-M s390-ccw -m 214 -smp 1 -nographic -nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||
-device virtio-scsi-ccw,id=scsi0,devno=fe.0.0001 \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,id=virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-scsi0-0-4-0 \
|
||||
-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=4,lun=0,drive=drive-scsi0-0-4-0,id=scsi0-0-4-0 \
|
||||
|
@ -1,7 +1,7 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \
|
||||
-M s390-ccw -m 214 -smp 1 -nographic -nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||
-usb -device virtio-net-ccw,vlan=0,id=net0,mac=00:11:22:33:44:55,devno=fe.0.0001 \
|
||||
-device virtio-net-ccw,vlan=0,id=net0,mac=00:11:22:33:44:55,devno=fe.0.0001 \
|
||||
-net user,vlan=0,name=hostnet0 \
|
||||
-device virtio-net-ccw,vlan=1,id=net1,mac=00:11:22:33:44:54,devno=fe.0.0000 \
|
||||
-net user,vlan=1,name=hostnet1 \
|
||||
|
@ -1,5 +1,5 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \
|
||||
-M s390-virtio -m 214 -smp 1 -nographic -nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||
-device virtio-net-s390,vlan=0,id=net0,mac=00:11:22:33:44:55 \
|
||||
-net user,vlan=0,name=hostnet0
|
||||
|
@ -3,7 +3,7 @@ s390-ccw -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev \
|
||||
socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon \
|
||||
chardev=charmonitor,id=monitor,mode=readline -no-acpi \
|
||||
-device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0001 \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
|
||||
-chardev pty,id=charconsole0 \
|
||||
-device virtconsole,chardev=charconsole0,id=console0 \
|
||||
|
Loading…
Reference in New Issue
Block a user