qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [4261] Errors while registering ioports are not fatal (


From: Glauber Costa
Subject: Re: [Qemu-devel] [4261] Errors while registering ioports are not fatal (Glauber Costa).
Date: Sat, 26 Apr 2008 17:45:05 -0300

On Sat, Apr 26, 2008 at 4:57 PM, Paul Brook <address@hidden> wrote:
> On Saturday 26 April 2008, Anthony Liguori wrote:
>  > Paul Brook wrote:
>  > > On Saturday 26 April 2008, Andrzej Zaborowski wrote:
>  > >> Revision: 4261
>  > >>           http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4261
>  > >> Author:   balrog
>  > >> Date:     2008-04-26 16:04:29 +0000 (Sat, 26 Apr 2008)
>  > >>
>  > >> Log Message:
>  > >> -----------
>  > >> Errors while registering ioports are not fatal (Glauber Costa).
>  > >
>  > > Why shouldn't they be fatal? How can this be anything other than a
>  > > serious bug in the device emulation?
>  >
>  > I think the idea is that the device should fail to initialize rather the
>  > VM being destroyed.  Consider the case of PCI hotplug.  It's a
>  > recoverable error if register ioport fails during hot add.
>
>  The errors that get suppressed aren't the sort of thing that should ever
>  happen. How exactly do you end up with an IO port that is not 1, 2 or 4 bytes
>  in size? If this ever happens I want qemu do die right there and then. This
>  isn't just a failure, it is an indication that something is broken beyond
>  hope.
>
>  Paul

Errors in size are not the thing we´re trying to catch here. If
preferred, they can still be fatal, which makes some sense.
Problem is that some devices might use an ioport that is already
registered. In the specific problem I had:

* qemu statically register an ide controller, (can´t recall specific
port numbers now)
* kvm wants to passthrough a device, choosen by the user. It might be
the case that this device is an IDE controller, which will use the
same ports.

Would it be better to test it, and not even register the device in the
first place. Sure. I agree 120 % with this. But how?

You won´t have the conflicting ioport registered until it is too late
in the process, because all ports only get registered in
update_mappings(). But now that I got your attention, if there is a
better proposed solution for this case, I'll be happy to hear and
implement it.

>
>



-- 
Glauber Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]