Skip to content
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

Fix virtIO on some ppc64le and <12-SP2 machines #6404

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

pdostal
Copy link
Member

@pdostal pdostal commented Dec 13, 2018

This PR fixing issues with virtIO serial terminal on the PPC64le architecture.

  • Related ticket: poo#44696
  • Needles: No need
  • Verification run: In progress

This is a follow up of #6360, #6351 and #6295.

Copy link
Member

@mimi1vx mimi1vx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_serial_console from where is used ? missing use serial_terminal 'add_serial_console';

@pdostal
Copy link
Member Author

pdostal commented Dec 13, 2018

I'll test it later today.

@mimi1vx mimi1vx changed the title WIP: Fix virtIO on some ppc64le machines Fix virtIO on some ppc64le machines Dec 13, 2018
elsif (get_var('OFW')) {
add_serial_console('hvc1');
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

add_serial_console('hvc' . is_sle('<12-SP2') ? 0 : 1) if (get_var('VIRTIO_CONSOLE') && check_var('ARCH', 'ppc64le'));

or what should happen in the "else"-branch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before SLE12-SP2 we need to run agetty on /dev/hvc0 ourselves. After SP2 it is done automatically by systemd AFAIK.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okurz a week ago my if() { … } else { … } was 'too complex' and now you write this?

# poo#44699 Enable console on hvc1 to fix login issues on ppc64le
if (!check_var('VIRTIO_CONSOLE', 0)) {
if (is_sle('<12-SP2')) {
add_serial_console('hvc0');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will work, do we have that device available on all backends and architectures or only ppc64le?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the virtio serial driver always uses the "HVC" serial terminal driver. So it will always get a device called hvcN regardless of the platform.

If not then we need to introduce another variable, but I don't think it is necessary for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okurz only sligty misleading PR name

@mimi1vx mimi1vx changed the title Fix virtIO on some ppc64le machines Fix virtIO on some ppc64le and <12-SP2 machines Dec 17, 2018
@mimi1vx mimi1vx merged commit 721a504 into os-autoinst:master Dec 17, 2018
@pevik
Copy link
Contributor

pevik commented Jan 10, 2020

@pdostal FYI now we have very similar cleanup code in these modules:

tests/shutdown/cleanup_before_shutdown.pm
tests/console/system_prepare.pm
lib/wickedbase.pm
tests/kernel/install_ltp.pm

(well, unlike the others wicked is using hvc2 and hvc1).
I wonder if there is single place in the tests which this code could (and should) be added.
Maybe activate_console()?
@asmorodskyi topic, we were discussing few weeks ago.

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