From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Io0-0003kD-MO for qemu-devel@nongnu.org; Thu, 25 Jul 2013 06:29:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2Inz-0008CE-Ld for qemu-devel@nongnu.org; Thu, 25 Jul 2013 06:29:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Inz-0008Al-DV for qemu-devel@nongnu.org; Thu, 25 Jul 2013 06:29:55 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6PATsiF001276 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Jul 2013 06:29:54 -0400 Message-ID: <51F0FE20.7050302@redhat.com> Date: Thu, 25 Jul 2013 12:29:52 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1374681580-17439-1-git-send-email-mst@redhat.com> <1374681580-17439-13-git-send-email-mst@redhat.com> In-Reply-To: <1374681580-17439-13-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On 07/24/13 18:02, Michael S. Tsirkin wrote: > Add API to find pvpanic device and get its io port. > Will be used to fill in guest info structure. > +uint16_t pvpanic_port(void) > +{ > + Object *o = object_resolve_path_type("", TYPE_ISA_PVPANIC_DEVICE, NULL); > + PVPanicState *s; > + if (!o) { > + return 0; > + } return object_property_get_int(o, "ioport"); } Then you don't need PVPanicState access and can place the code into acpi-build.c. cheers, Gerd