From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56712 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGqdu-0004YW-9d for qemu-devel@nongnu.org; Tue, 25 May 2010 05:41:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGqdp-00031O-Fu for qemu-devel@nongnu.org; Tue, 25 May 2010 05:41:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7443) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGqdp-00031B-7n for qemu-devel@nongnu.org; Tue, 25 May 2010 05:41:41 -0400 Message-ID: <4BFB9B49.9080503@redhat.com> Date: Tue, 25 May 2010 11:41:29 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/2] ioport: add function to check whenever a port is assigned or not References: <1274262857-31964-1-git-send-email-kraxel@redhat.com> <201005241332.51768.paul@codesourcery.com> In-Reply-To: <201005241332.51768.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On 05/24/10 14:32, Paul Brook wrote: >> +int is_ioport_assigned(pio_addr_t addr) > > Shouldn't we move this into register_ioport_{read,write}, and have that fail > if the port has already been assigned? It already checks and fails with hw_error(). Problem with that is that this kills qemu in case you try to pci hot-plug a vga card. So I've added a way to check before-hand, so we can fail gracefully in the few places where we need it (see second patch of the series). cheers, Gerd