From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4wT8-0002pP-PJ for qemu-devel@nongnu.org; Fri, 24 Aug 2012 12:10:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4wT4-0005wS-IP for qemu-devel@nongnu.org; Fri, 24 Aug 2012 12:10:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44072 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4wT4-0005va-4c for qemu-devel@nongnu.org; Fri, 24 Aug 2012 12:10:42 -0400 Message-ID: <5037A77C.3070607@suse.de> Date: Fri, 24 Aug 2012 18:10:36 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <76c2fcb7375a3b75f2b46fb24f4902d77df2600a.1345549695.git.julien.grall@citrix.com> In-Reply-To: <76c2fcb7375a3b75f2b46fb24f4902d77df2600a.1345549695.git.julien.grall@citrix.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V5 1/8] isa: add isa_address_space_io List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Julien Grall Cc: Jan Kiszka , Stefano.Stabellini@eu.citrix.com, Gerd Hoffmann , qemu-devel@nongnu.org, avi@redhat.com Am 22.08.2012 14:27, schrieb Julien Grall: > This function permits to retrieve ISA IO address space. > It will be usefull when we need to pass IO address space as argument. >=20 > Signed-off-by: Julien Grall > --- > hw/isa-bus.c | 5 +++++ > hw/isa.h | 1 + > 2 files changed, 6 insertions(+), 0 deletions(-) >=20 > diff --git a/hw/isa-bus.c b/hw/isa-bus.c > index f9b2373..662c86b 100644 > --- a/hw/isa-bus.c > +++ b/hw/isa-bus.c > @@ -244,4 +244,9 @@ MemoryRegion *isa_address_space(ISADevice *dev) > return get_system_memory(); > } > =20 > +MemoryRegion *isa_address_space_io(ISADevice *dev) > +{ > + return get_system_io(); > +} Unlike the address_space above, there's an address_space_io field in ISABus, so I guess the implementation of this function should rather obtain the device's BusState via isa_bus_from_device(dev) and return its field rather than hardcoding get_system_io() here. For x86 it shouldn't make a difference but I think on PReP there's two different runtime-switchable I/O space configurations or so... Regards, Andreas > + > type_init(isabus_register_types) > diff --git a/hw/isa.h b/hw/isa.h > index dc97052..3891c1f 100644 > --- a/hw/isa.h > +++ b/hw/isa.h > @@ -43,6 +43,7 @@ void isa_bus_irqs(ISABus *bus, qemu_irq *irqs); > qemu_irq isa_get_irq(ISADevice *dev, int isairq); > void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq); > MemoryRegion *isa_address_space(ISADevice *dev); > +MemoryRegion *isa_address_space_io(ISADevice *dev); > ISADevice *isa_create(ISABus *bus, const char *name); > ISADevice *isa_try_create(ISABus *bus, const char *name); > ISADevice *isa_create_simple(ISABus *bus, const char *name); --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg