From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRrut-0005k6-Nw for qemu-devel@nongnu.org; Fri, 17 Jul 2009 14:12:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRrup-0005iI-2h for qemu-devel@nongnu.org; Fri, 17 Jul 2009 14:12:19 -0400 Received: from [199.232.76.173] (port=52336 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRruo-0005iD-SW for qemu-devel@nongnu.org; Fri, 17 Jul 2009 14:12:14 -0400 Received: from mail-ew0-f217.google.com ([209.85.219.217]:57844) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRruo-00010N-E2 for qemu-devel@nongnu.org; Fri, 17 Jul 2009 14:12:14 -0400 Received: by ewy17 with SMTP id 17so832172ewy.34 for ; Fri, 17 Jul 2009 11:12:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1247662614-12927-2-git-send-email-kraxel@redhat.com> References: <1247662614-12927-1-git-send-email-kraxel@redhat.com> <1247662614-12927-2-git-send-email-kraxel@redhat.com> Date: Fri, 17 Jul 2009 20:12:11 +0200 Message-ID: <5b31733c0907171112w73296a4fp12bf5dfc250aa241@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH 1/4] qdev/isa: add isa bus support to qdev. From: Filip Navara Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel 2009/7/15 Gerd Hoffmann : > +static struct BusInfo isa_bus_info =3D { > + =A0 =A0.name =A0=3D "ISA", > + =A0 =A0.size =A0=3D sizeof(ISABus), > + =A0 =A0.props =3D (Property[]) { > + =A0 =A0 =A0 =A0{ > + =A0 =A0 =A0 =A0 =A0 =A0.name =A0 =3D "iobase", > + =A0 =A0 =A0 =A0 =A0 =A0.info =A0 =3D &qdev_prop_hex32, > + =A0 =A0 =A0 =A0 =A0 =A0.offset =3D offsetof(ISADevice, iobase[0]), > + =A0 =A0 =A0 =A0 =A0 =A0.defval =3D (uint32_t[]) { -1 }, > + =A0 =A0 =A0 =A0},{ > + =A0 =A0 =A0 =A0 =A0 =A0.name =A0 =3D "iobase2", > + =A0 =A0 =A0 =A0 =A0 =A0.info =A0 =3D &qdev_prop_hex32, > + =A0 =A0 =A0 =A0 =A0 =A0.offset =3D offsetof(ISADevice, iobase[1]), > + =A0 =A0 =A0 =A0 =A0 =A0.defval =3D (uint32_t[]) { -1 }, > + =A0 =A0 =A0 =A0}, > + =A0 =A0 =A0 =A0{/* end of list */} > + =A0 =A0} > +}; Why exactly two IO bases? That sounds like bad design to me. IMHO it should be handled more like sysbus_init_mmio (or sysbus_init_mmio_cb) and sysbus_mmio_map and the number of IO bases should be virtually unlimited (something like QDEV_MAX_MMIO is acceptable). Best regards, Filip Navara