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: Paul Brook
Subject: Re: [Qemu-devel] [4261] Errors while registering ioports are not fatal (Glauber Costa).
Date: Sat, 26 Apr 2008 21:54:06 +0100
User-agent: KMail/1.9.9

> > I fail to see how hotplugging or proxing has anything to do with it. IO
> > port registration is not something that can reasonably fail.
> >
> > If the real problem is that we can't cope with multiple devices
> > registering the same IO port than you need to fix that. Blindly punting
> > to the caller to
>
> There is no fix for that.  You can't have two devices that use the same
> IO port.

You probably can't meaningfully access the IO port. However I think the 
registration itself should be allowed.

The device shouldn't have to handle this. Just like real hardware doesn't. 
If you configure two devices with the same IO port I'd expect writes to go to 
one or both of them, or cause a CPU fault. Just like when you have 
overlapping memory ranges. The device doesn't suddenly disappear in a puff of 
smoke because the OS assigned overlapping IO ranges.

> > cope is IMHO not an acceptable solution, especially when none of the
> > callers check the return value.
>
> IO port range conflicts can still happen even with PCI devices.  Two PCI
> IDE controllers would conflict with each other for instance.  It's much
> more likely with ISA of course but it's still possible.  register_ioport
> really should have a return code and callers should actively be checking
> it.

This is why bouncing the error to the device is the wrong thing to do. 
Once the OS resolves the conflict I'd expect the remaining device to just 
work.

Paul




reply via email to

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