]> git.proxmox.com Git - 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>
Thu, 12 Jan 2012 17:30:50 +0000 (18:30 +0100)
commit447a3b347381162f9c2b1b7831643b6ee0e767ca
tree0012fa0eb6863090aebe988c38d0941c3bedd62b
parente295c31e25b044acba2a48f1e7292b9fbb896367
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
(cherry picked from commit 98331f8ad6a3e2cfbb402d72e6be47eac7706251)
hw/spapr_vty.c