[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] all vga: fail graicefully when vga ports ar
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] all vga: fail graicefully when vga ports are taken |
Date: |
Tue, 18 May 2010 16:06:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Gerd Hoffmann <address@hidden> writes:
> On 05/18/10 14:33, Markus Armbruster wrote:
>> Gerd Hoffmann<address@hidden> writes:
>>
>>> Try to pci hotplug a vga card, watch qemu die with hw_error().
>>> This patch fixes it.
>>
>> Looks good.
>>
>> Are there any other hot-pluggable devices that acquire single-use
>> resources such as fixed I/O ports?
>
> Any PCI device doing ISA compatibility stuff I'd guess, which makes
> IDE a candidate. Checking ...
>
> Yes (hw/ide/piix.c):
>
> ide_init_ioport(&d->bus[0], 0x1f0, 0x3f6);
> ide_init_ioport(&d->bus[1], 0x170, 0x376);
>
> Those are tagged with "no-user" though due to being hard-coded in
> pc.c, so any attempt to hot-plug one of those should fail way before
> it attempts to grab the I/O ports.
So a more general mechanism than you ad hoc is_ioport_assigned() check
doesn't seem to be justified.