Re: [PATCH] virtio: console: remove check for cpkt value when nominating console port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 23, 2022 at 11:46:54AM +0100, Amit Shah wrote:
> I think the backward compat concern I have here is that a really old
> hypervisor - one that doesn't do virtio-serial-ports yet, will not have
> any other messages sent from the host, but the original console setup
> messages.
> 
> The is_serial_port() check looks for whether hvc is initialized.  It's
> possible hvc may not have been initialized when some control message
> comes in.

I'm assuming you're talking about the is_console_port() check here (apologies
I'm not too familiar with the old virtio-serial), in which case I have no problem
with.

> > If this is correct I think a warning should be emitted here? Not setting the
> > value to 1 can exhibit undefined behaviour (at least when interpreting the
> > virtIO spec) and it would help hypervisor developers.
> 
> Did you actually run into some issue here?

Yes, while developing a hypervisor solution I found that console port setup
was unsuccessful when the control messages were involved. I found out later on
after reading the qemu and linux source that a value of 1 was needed for all
VIRTIO_CONSOLE_CONSOLE_PORT events, which wasn't exactly specified in the
spec.

Andy
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux