All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Julien Grall <julien.grall@citrix.com>
Cc: qemu-devel@nongnu.org, jan.kiszka@siemens.com, kraxel@redhat.com,
	avi@redhat.com, Stefano.Stabellini@eu.citrix.com
Subject: Re: [Qemu-devel] [PATCH V10 1/8] isa: add isa_address_space_io
Date: Sun, 25 Nov 2012 13:39:19 +0100	[thread overview]
Message-ID: <50B21177.6010107@suse.de> (raw)
In-Reply-To: <35452e244b3dd7f3ebc972d39406a2f2b4ab2718.1348052498.git.julien.grall@citrix.com>

Am 19.09.2012 13:50, 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.
> 
> Signed-off-by: Julien Grall <julien.grall@citrix.com>

Reviewed-by: Andreas Färber <afaerber@suse.de>

A note below:

> ---
>  hw/isa-bus.c |    9 +++++++++
>  hw/isa.h     |    1 +
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/isa-bus.c b/hw/isa-bus.c
> index f9b2373..c1d8309 100644
> --- a/hw/isa-bus.c
> +++ b/hw/isa-bus.c
> @@ -244,4 +244,13 @@ MemoryRegion *isa_address_space(ISADevice *dev)
>      return get_system_memory();
>  }
>  
> +MemoryRegion *isa_address_space_io(ISADevice *dev)
> +{
> +    if (dev) {
> +        return isa_bus_from_device(dev)->address_space_io;

This assumes that the device is attached to an ISABus already...

> +    }
> +
> +    return isabus->address_space_io;

...and that the ISABus has been set globally, which I think is an
assumption we make elsewhere as well, i.e. it cannot be used at
instance_init time but in qdev initfn/realizefn.

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);
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-11-25 12:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 11:50 [Qemu-devel] [PATCH V10 0/8] memory: unify ioport registration Julien Grall
2012-09-19 11:50 ` [Qemu-devel] [PATCH V10 1/8] isa: add isa_address_space_io Julien Grall
2012-11-25 12:39   ` Andreas Färber [this message]
2012-09-19 11:50 ` [Qemu-devel] [PATCH V10 2/8] hw/apm.c: replace register_ioport* Julien Grall
2012-11-25 12:51   ` Andreas Färber
2012-11-27  0:10   ` Andreas Färber
2012-11-27 20:46     ` Jason Baron
2012-12-03 16:29       ` Julien Grall
2012-09-19 11:50 ` [Qemu-devel] [PATCH V10 3/8] smb: replace_register_ioport* Julien Grall
2012-09-19 11:50 ` [Qemu-devel] [PATCH V10 4/8] hw/acpi_piix4.c: replace register_ioport* Julien Grall
2012-09-19 11:50 ` [Qemu-devel] [PATCH V10 5/8] hw/cirrus_vga.c: " Julien Grall
2012-09-19 11:50 ` [Qemu-devel] [PATCH V10 6/8] hw/serial.c: " Julien Grall
2012-09-19 11:50 ` [Qemu-devel] [PATCH V10 7/8] hw/pc.c: " Julien Grall
2012-09-19 11:50 ` [Qemu-devel] [PATCH V10 8/8] hw/dma.c: " Julien Grall
2012-10-08 16:53 ` [Qemu-devel] [PATCH V10 0/8] memory: unify ioport registration Julien Grall
2012-11-24  1:09   ` Julien Grall
2012-11-25  9:10     ` Avi Kivity
2012-11-25  9:10 ` Avi Kivity
2012-11-25 12:42   ` Andreas Färber
2012-11-25 12:44     ` Avi Kivity
2012-11-25 15:01   ` Andreas Färber
2012-11-25 15:40     ` Avi Kivity
2012-11-25 16:00       ` Jan Kiszka
2012-11-25 22:33     ` Julien Grall
2012-11-26 14:25     ` Gerd Hoffmann
2012-11-27  1:14       ` Andreas Färber
2012-11-30 16:28         ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B21177.6010107@suse.de \
    --to=afaerber@suse.de \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=julien.grall@citrix.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.