Received: from [140.186.70.92] (port=49365 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OENRa-00079O-8M for qemu-devel@nongnu.org; Tue, 18 May 2010 10:06:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OENRY-0004MZ-9S for qemu-devel@nongnu.org; Tue, 18 May 2010 10:06:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39516) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OENRY-0004MH-0c for qemu-devel@nongnu.org; Tue, 18 May 2010 10:06:48 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4IE6lN8017375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 May 2010 10:06:47 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 2/2] all vga: fail graicefully when vga ports are taken References: <1273610601-12805-1-git-send-email-kraxel@redhat.com> <1273610601-12805-2-git-send-email-kraxel@redhat.com> <4BF28BF4.4070602@redhat.com> Date: Tue, 18 May 2010 16:06:45 +0200 In-Reply-To: <4BF28BF4.4070602@redhat.com> (Gerd Hoffmann's message of "Tue, 18 May 2010 14:45:40 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Gerd Hoffmann writes: > On 05/18/10 14:33, Markus Armbruster wrote: >> Gerd Hoffmann 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.