• Amit Shah's avatar
    virtio: console: Store each console's size in the console structure · 9778829c
    Amit Shah authored
    
    
    With support for multiple consoles, just using one {rows,cols} pair in
    the config space is not going to suffice.
    
    Store each console's size as part of the console struct.
    
    This changes the behaviour for one case when multiport is not enabled:
    when notifier_add_vio() is called, the console size is taken from that
    of the last config-space update instead of fetching it afresh from the
    config space.
    
    Also add a helper to update the size in the console struct as we'll need
    to use the same code to update the size via control messages when
    multiport support is enabled.
    Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
    CC: Christian Borntraeger <borntraeger@de.ibm.com>
    CC: linuxppc-dev@ozlabs.org
    CC: Kusanagi Kouichi <slash@ac.auone-net.jp>
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    9778829c
virtio_console.c 38.6 KB