s390 - Parts of console output lost
diff mbox

Message ID 2D923BAD-813F-41F9-A6BF-48D0D8C8195A@suse.de
State New
Headers show

Commit Message

Alexander Graf April 5, 2010, 6:04 p.m. UTC
On 05.04.2010, at 16:45, Bastian Blank wrote:

> Hi
> 116348def2bb446d972bdc2f44bd77ff631f85de works on s390/kvm, but on startup
> parts of the console output is lost. The used kernel is a standard Debian
> distribution kernel.
> | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable-kvm -kernel /boot/vmlinuz-2.6.32-4-s390x -initrd /boot/initrd.img-2.6.32-4-s390x -append "break=premount"
> | [    0.583078] cio: Channel measurement facility initialized using format basic (mode autodetected)
> | [    0.585475] TCP cubic registered
> Everything up to the first line is lost on the virtio console. This
> could be also a kernel problem as this kernel includes two drivers
> responsible for hvc, virtio and iucv. The last line in the kernel log
> before the properly shown ones is:
> | [    0.592667] hvc_iucv: The z/VM IUCV HVC device driver cannot be used without z/VM

KVM for S390 does early printk using a special hypervisor callback. The patch to inject input from there into virtio-console was rejected upstream, because people believed it to be better to create a mux of an early and a real console device. While I agree that that approach would be superior I didn't get around to it yet and instead just carry this patch for personal development:


diff mbox

diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index ad3386f..37d6c64 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -95,7 +99,10 @@  int s390_virtio_hypercall(CPUState *env)
         } else {
             /* Early printk */
+            uint8_t *p = (uint8_t *)qemu_get_ram_ptr(mem);
+            printf("%s", p);
     case KVM_S390_VIRTIO_RESET: