]> git.proxmox.com Git - mirror_qemu.git/commit
pseries: Add a routine to find a stable "default" vty and use it
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 12 Dec 2011 18:24:33 +0000 (18:24 +0000)
committerAlexander Graf <agraf@suse.de>
Tue, 3 Jan 2012 14:49:11 +0000 (15:49 +0100)
commit98331f8ad6a3e2cfbb402d72e6be47eac7706251
tree8f8b76da6554fc4edc2677b38b59d582b8430b11
parent05c194384f836240ea4c2da5fa3be43a54bff021
pseries: Add a routine to find a stable "default" vty and use it

In vty_lookup() we have a special case for supporting early debug in
the kernel. This accepts reg == 0 as a special case to mean "any vty".

We implement this by searching the vtys on the bus and returning the
first we find. This means that the vty we chose depends on the order
the vtys are specified on the QEMU command line - because that determines
the order of the vtys on the bus.

We'd rather the command line order was irrelevant, so instead return
the vty with the lowest reg value. This is still a guess as to what the
user really means, but it is at least stable WRT command line ordering.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
[agraf] fix braces
hw/spapr_vty.c