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

platforms: [qemu] Also use hvc0 for x86_64/aarch64 #2785

Closed
wants to merge 1 commit into from

Conversation

cgwalters
Copy link
Member

Pairs with coreos/coreos-assembler#3689

Basically hvc0 is faster and more modern, but requires us to opt-in specifically. We already had a few usages of hvc0 from cloud providers that default to this, no reason for us not to do it for our own qemu provider.

(One thing TODO here: I believe s390x qemu could do this too;
as of right now we don't have any references to s390x here)

Pairs with coreos/coreos-assembler#3689

Basically hvc0 is faster and more modern, but requires us to opt-in
specifically.  We already had a few usages of hvc0 from cloud
providers that default to this, no reason for us not to do it
for our own qemu provider.

(One thing TODO here: I believe s390x qemu could do this too;
 as of right now we don't have any references to s390x here)
@cgwalters
Copy link
Member Author

Draft since this needs some more testing...

@cgwalters
Copy link
Member Author

Ahh yes, Fedora (and c9s) currently uses
CONFIG_VIRTIO_CONSOLE=m
which I think is why I'm seeing the behavior that we only end up with console logging only after the initramfs has started if the hypervisor is only setting up a virtio console (as is done in coreos/coreos-assembler#3689 ).

In contrast...a quick check of opensuse Leap (kernel-kvmsmall-5.14.21-150500.55.39.1.x86_64) shows

$ grep VIRTIO_CONSOLE /boot/config-5.14.21-150500.55.39-kvmsmall 
CONFIG_VIRTIO_CONSOLE=y

Though Debian (linux-image-amd64 6.1.69-1) has it as a module too.

I'm pretty strongly of the opinion though that we should change this to be built-in; we already have CONFIG_VIRTIO=y (and some other virtio modules) built in.

@baude
Copy link

baude commented Jan 4, 2024

I agree it should be built-in. My old friend hvc :)

@dustymabe
Copy link
Member

so we just need to submit a PR to the kernel configs? or is it more complicated than that?

Comment on lines +55 to +57
kernel_arguments:
- console=hvc0
- console=ttyAMA0,115200
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this will change the behavior on aarch64 qemu today. Right now it autodetects. So will this change it so that VGA console isn't the primary console?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe so, yes. In our use cases we basically never use a graphical console (right?)

That said, honestly since podman is targeting applehv now as of recently it matters much less what we do with qemu. So I'm just going to close this for now.

It probably does make sense for us to switch to hvc for qemu, but doesn't seem worth the churn for now.

cgwalters added a commit to cgwalters/podman that referenced this pull request Jan 5, 2024
Motivated by making it easier to debug problems like
the applehv issues we're seeing today.  This is also
easy to do with qemu.

However note that in practice this really
wants coreos/fedora-coreos-config#2785
so that we can get the full console from the first
boot on applehv.

For now, this is just a debugging aid for us.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters closed this Jan 8, 2024
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.

3 participants