
Am 26.01.2011 13:41, schrieb Daniel P. Berrange:
On Tue, Jan 25, 2011 at 08:34:03PM +0100, Patrick Siegl wrote:
A few more details for s390x: why you can't set param '-S' and need '-chardev vc,id=cons -device virtio-serial-s390 -device virtconsole,chardev=cons' on s390x:
1) qemu-system-s390x -M s390-virtio -vnc :0 -enable-kvm -smp 1 -m 1024 -k de -kernel /boot/image-2.6.34-tue01 -initrd /boot/initrd-2.6.34-tue01_GUEST -drive file=/data/sle11.img -append "root=/dev/vda1 rw"
=> screenshot 1
2) qemu-system-s390x -S -M s390-virtio -vnc :0 -enable-kvm -smp 1 -m 1024 -k de -kernel /boot/image-2.6.34-tue01 -initrd /boot/initrd-2.6.34-tue01_GUEST -drive file=/data/sle11.img -append "root=/dev/vda1 rw"
=> screenshot 2 3) qemu-system-s390x -M s390-virtio -vnc :0 -enable-kvm -smp 1 -m 1024 -k de -kernel /boot/image-2.6.34-tue01 -initrd /boot/initrd-2.6.34-tue01_GUEST -drive file=/data/sle11.img -append "root=/dev/vda1 rw" -chardev vc,id=cons -device virtio-serial-s390 -device virtconsole,chardev=cons
=> RUN
4) qemu-system-s390x -S -M s390-virtio -vnc :0 -enable-kvm -smp 1 -m 1024 -k de -kernel /boot/image-2.6.34-tue01 -initrd /boot/initrd-2.6.34-tue01_GUEST -drive file=/data/sle11.img -append "root=/dev/vda1 rw" -chardev vc,id=cons -device virtio-serial-s390 -device virtconsole,chardev=cons
=> screenshot 4 These screenshots are all showing the same thing, but for different reasons.
IIUC, there is no 'VGA' graphics adapter in s390 world, hence you need some form of text console. This is what virtio-serial-s390 is providing for you. This does not need to be hardcoded in the QEMU arg generator. You can set this in the XML
<console type='vc'> <target type='virtio'/> </console>
When you add the '-S' argument this tells QEMU to launch the binary but *NOT* run the guest. When libvirt uses '-S', it launches QEMU runs some monitor commands, and then runs 'cont' to start the guest running. When you're running QEMU manually in your demo above, I assume you never told QEMU to start the CPUs, hence you see the screenshot 4. If you had issued 'cont' on the monitor it would run normally as per example 3.
Regards, Daniel -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
I have overhauled my last patch (for libvirt KVM support on s390x). You will find the new one as attachment. There is only one problem, which I can't get fixed. You wrote following: "This is expected change, since s390 isn't PCI based, but what addressing scheme is used for s390 devices to uniquely and stablly identify them. eg, we need to make sure that qemu -drive AAA -drive BBB -drive CCC (monitor) drive_del BBB results except same guest visible ABI as qemu -drive AAA -drive CCC" This is a small problem under s390x, because if you try to add ',addr=' to a device, qemu prints: "Property '<device>.addr' not found". There are a few more details: - netdev isn't supported, because netdev needs param 'bus='. If you try to run this with BUS s390-virtio, netdev prints, that this is not supported. (everything should work with virtio, so if you enable '<model type="virtio"/>', it works fine) - You have to set 'ports' for the controller. If you don't do this, the virtual machine doesn't find VDA and so you can't start it. Maybe this is because of the flags '-nodefconfig' and '-nodefaults'. The maximum count of ports is 31 (the qemu implementation kills everything which is higher than 32). - Also 'vectors' aren't supported for the controller. If you therefor try to set a value, the virtual machine doesn't start. - It is not very nice within the libvirt implementation ('qemu_command.c') when every device gets PCI as address type (the only way to fix this in a relative moderat time, is to overwrite it with s390-virtio, if it runs on s390x). - The last point is that I haven't found a way for parsing the cpu MHz count. Within the patch there is some comment about it. Everything which I recognized for building an virtual machine on s390x is written into the XML file. Regards, Patrick Siegl