Skip to content

s390x: Override serial console arguments for qemu #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsitnicki
Copy link

As Alice Frosi reported (PR #58), passing

-device sclpconsole,chardev=console

together with

-serial chardev:console

to qemu-system-s390x is not supported.

Following Andrew Lutomirski's suggestion, use the latter as the default for
configuring the serial console on all architectures but s390x, where we
override it in favor of sclpconsole.

Signed-off-by: Jakub Sitnicki [email protected]

As Alice Frosi reported (PR amluto#58), passing

    -device sclpconsole,chardev=console

together with

    -serial chardev:console

to qemu-system-s390x is not supported.

Following Andrew Lutomirski's suggestion, use the latter as the default for
configuring the serial console on all architectures but s390x, where we
override it in favor of sclpconsole.

Signed-off-by: Jakub Sitnicki <[email protected]>
@jsitnicki
Copy link
Author

I've been using this patch when recently testing BPF fixes for s390x.

Quick check against Fedora 35 VM image also confirms that console works:

$ guestmount --add Fedora-Cloud-Base-35-1.2.s390x.img --mount /dev/sda5 ./sys-root/
$ virtme-run --arch s390x --kimg sys-root/root/usr/lib/modules/5.14.10-300.fc35.s390x/vmlinuz --root sys-root/root/ --memory 4G --cpu 4 --show-command
/usr/bin/qemu-system-s390x -fsdev local,id=virtfs1,path=sys-root/root/,security_model=none,readonly,multidevs=remap -device virtio-9p-ccw,fsdev=virtfs1,mount_tag=/dev/root -fsdev local,id=virtfs5,path=/home/jkbs/src/virtme/virtme/guest,security_model=none,readonly,multidevs=remap -device virtio-9p-ccw,fsdev=virtfs5,mount_tag=virtme.guesttools -M s390-ccw-virtio -nodefaults -parallel none -net none -echr 1 -serial none -chardev stdio,id=console,signal=off,mux=on -device sclpconsole,chardev=console -mon chardev=console -vga none -display none -m 4G -smp 4 -kernel sys-root/root/usr/lib/modules/5.14.10-300.fc35.s390x/vmlinuz -append 'psmouse.proto=exps "virtme_stty_con=rows 55 cols 237 iutf8" TERM=screen-256color rootfstype=9p rootflags=version=9p2000.L,trans=virtio,access=any raid=noautodetect ro init=/bin/sh -- -c "mount -t tmpfs run /run;mkdir -p /run/virtme/guesttools;/bin/mount -n -t 9p -o ro,version=9p2000.L,trans=virtio,access=any virtme.guesttools /run/virtme/guesttools;exec /run/virtme/guesttools/virtme-init"'
qemu-system-s390x: -fsdev local,id=virtfs1,path=sys-root/root/,security_model=none,readonly,multidevs=remap: warning: short-form boolean option 'readonly' deprecated
Please use readonly=on instead
qemu-system-s390x: -fsdev local,id=virtfs5,path=/home/jkbs/src/virtme/virtme/guest,security_model=none,readonly,multidevs=remap: warning: short-form boolean option 'readonly' deprecated
Please use readonly=on instead
KASLR disabled: CPU has no PRNG
[    0.341931] Linux version 5.14.10-300.fc35.s390x ([email protected]) (gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1), GNU ld version 2.37-10.fc35) #1 SMP Thu Oct 7 20:30:59 UTC 2021
…

@marcosps
Copy link
Contributor

@jsitnicki Just tested the patch, and it solved the problem for me too.

@amluto would you mind checking this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants