From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50786 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAOgV-00053e-Jr for qemu-devel@nongnu.org; Mon, 25 Oct 2010 11:10:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAOdT-00064n-1I for qemu-devel@nongnu.org; Mon, 25 Oct 2010 11:06:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAOdS-00064d-Q7 for qemu-devel@nongnu.org; Mon, 25 Oct 2010 11:06:54 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9PF6rwE026650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 25 Oct 2010 11:06:53 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 1/2] Keep track of ISA ports ISA device is using in qdev. References: <1287928933-11423-1-git-send-email-gleb@redhat.com> <1287928933-11423-2-git-send-email-gleb@redhat.com> Date: Mon, 25 Oct 2010 17:06:51 +0200 In-Reply-To: <1287928933-11423-2-git-send-email-gleb@redhat.com> (Gleb Natapov's message of "Sun, 24 Oct 2010 16:02:12 +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: Gleb Natapov Cc: qemu-devel@nongnu.org Gleb Natapov writes: > Prevent two devices from claiming the same io port. Really? Your new check for double-claim is in the new isa_init_ioport(), which is for ISADevice only. Thus, only qdevified ISA devices can opt for this protection, by calling isa_init_ioport(). It doesn't protect from devices who don't or can't opt in, such as PCI devices. Anyway, we already check for double-claim in register_ioport_{read,write}(). The check has issues --- hw_error() is wrong there for hot plug. But it's where the check should be, isn't it?