[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel]  Fix character devices after DisplayState refacto
Re: [Qemu-devel]  Fix character devices after DisplayState refactoring
Mon, 19 Jan 2009 16:11:39 -0600
Thunderbird 18.104.22.168 (X11/20090105)
Stefano Stabellini wrote:
Anthony Liguori wrote:
Date: 2009-01-16 20:23:27 +0000 (Fri, 16 Jan 2009)
Fix character devices after DisplayState refactoring
The DisplayState refactoring changed the machine init function to create a
DisplayState for each VGA device instead of being passed an existing
DisplayState. This change is critical to enable multiple graphics device
Unfortunately, the serial/parallel/console code is structured today to run
before machine init to fill out the CharDriverState table which the machine
init function uses to determine whether to create the required devices.
Since a 'vc' is a type of CharDriverState, the CharDriverState code requires
that a DisplayState exist before it runs creating a circular dependency.
To fix this, this splits the creation of the initial CharDriverState from
the initialization of the text console. We can then in a second step associate
a DisplayState with all TextConsoles. This allows us to create the
CharDriverState's first, machine init, then associate the TextConsoles with
This code screams for more cleanup.
I am sorry for this.
No worries. What I meant about more cleanup was that this patch series
demonstrated a fundamental flaw in the CharDriverState abstraction.
That is, we really ought to separate the creation of a CharDriverState
front-end from the creation of the back-end.
We should then attach a front-end to a back-end. This would make it
easy to dynamically change the back-end of any given CharDriverState
which is something I've liked to see for a while now.
While I was testing the patch series I was expecting many rendering
issues or console switching issues: once I saw that both the serial and
parallel port consoles were present I didn't check they were actually