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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions virtme/architectures.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ def serial_console_args() -> List[str]:
def qemu_nodisplay_args() -> List[str]:
return ['-vga', 'none', '-display', 'none']

@staticmethod
def qemu_serial_console_args() -> List[str]:
# We should be using the new-style -device serialdev,chardev=xyz,
# but many architecture-specific serial devices don't support that.
return ['-serial', 'chardev:console']

@staticmethod
def config_base() -> List[str]:
return []
Expand Down Expand Up @@ -281,14 +287,16 @@ def qemuargs(self, is_native):
# default console
ret.extend(['-nodefaults'])

ret.extend(['-device', 'sclpconsole,chardev=console'])

return ret

@staticmethod
def config_base():
return ['CONFIG_MARCH_Z900=y']

@staticmethod
def qemu_serial_console_args():
return ['-device', 'sclpconsole,chardev=console']

ARCHES = {arch.virtmename: arch for arch in [
Arch_x86('x86_64'),
Arch_x86('i386'),
Expand Down
4 changes: 1 addition & 3 deletions virtme/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,7 @@ def do_it() -> int:
qemuargs.extend(['-serial', 'none'])
qemuargs.extend(['-chardev', 'stdio,id=console,signal=off,mux=on'])

# We should be using the new-style -device serialdev,chardev=xyz,
# but many architecture-specific serial devices don't support that.
qemuargs.extend(['-serial', 'chardev:console'])
qemuargs.extend(arch.qemu_serial_console_args())

qemuargs.extend(['-mon', 'chardev=console'])

Expand Down