From: Richard Henderson <rth@twiddle.net>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 21/24] isa: add isa_address_space()
Date: Wed, 10 Aug 2011 09:24:05 -0700 [thread overview]
Message-ID: <4E42B0A5.1010005@twiddle.net> (raw)
In-Reply-To: <1312823229-12822-22-git-send-email-avi@redhat.com>
On 08/08/2011 10:07 AM, Avi Kivity wrote:
> A helper that returns the address space used by ISA devices. Useful
> for getting rid of isa_mem_base, multiple ISA buses, or ISA buses behind
> bridges.
>
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
> hw/isa-bus.c | 6 ++++++
> hw/isa.h | 1 +
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/hw/isa-bus.c b/hw/isa-bus.c
> index 2765543..1cb497f 100644
> --- a/hw/isa-bus.c
> +++ b/hw/isa-bus.c
> @@ -20,6 +20,7 @@
> #include "monitor.h"
> #include "sysbus.h"
> #include "isa.h"
> +#include "exec-memory.h"
>
> struct ISABus {
> BusState qbus;
> @@ -202,4 +203,9 @@ static char *isabus_get_fw_dev_path(DeviceState *dev)
> return strdup(path);
> }
>
> +MemoryRegion *isa_address_space(ISADevice *dev)
> +{
> + return get_system_memory();
> +}
> +
This does not help get rid of isa_mem_base, as far as I can see.
All this is going to do is the equivalent of isa_mem_base == 0.
Did you have a plan beyond this?
The simplest replacement, as far as I can see, is to replace one
global variable with another:
MemoryRegion *isa_address_space;
Define that this variable *must* be set by any platform that
wants to use ISA. It can be set to the address_space_mem
parameter (i.e. the copy of get_system_memory() that the
platforms receive as a parameter).
For Alpha, I can set this to the sub-region that I pass off to
the PCI subsystem.
For those other non-x86 platforms that currently set isa_mem_base
to a non-zero value, they either re-use an otherwise existing
memory region or create a new sub-region properly placed.
Of course, as far as I can see, this variable is only used by
the VGA devices. Surely we can arrange to pass down some address
space during setup of the VGA?
r~
next prev parent reply other threads:[~2011-08-10 16:24 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-08 17:06 [PATCH 00/24] Memory API batch 4: more conversions Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 01/24] apb_pci: convert to memory API Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 02/24] apic: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 03/24] arm_gic: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 04/24] arm_sysctl: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 05/24] arm_timer: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 06/24] armv7m: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 07/24] gt64xxx.c: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 08/24] tusb6010: move declarations to new file tusb6010.h Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-09 7:51 ` Peter Maydell
2011-08-09 7:51 ` [Qemu-devel] " Peter Maydell
2011-08-09 9:02 ` [PATCH v1.1 " Avi Kivity
2011-08-09 9:02 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 09/24] omap_gpmc/nseries/tusb6010: convert to memory API Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:43 ` Peter Maydell
2011-08-09 6:34 ` Avi Kivity
2011-08-09 7:37 ` Peter Maydell
2011-08-09 7:41 ` Avi Kivity
2011-08-09 8:07 ` Peter Maydell
2011-08-09 8:44 ` Avi Kivity
2011-08-09 8:56 ` Avi Kivity
2011-08-09 8:56 ` [Qemu-devel] " Avi Kivity
2011-08-09 9:02 ` [PATCH v1.1 " Avi Kivity
2011-08-09 9:02 ` [Qemu-devel] " Avi Kivity
2011-08-09 9:23 ` Peter Maydell
2011-08-09 9:23 ` [Qemu-devel] " Peter Maydell
2011-08-09 9:26 ` Avi Kivity
2011-08-09 9:26 ` [Qemu-devel] " Avi Kivity
2011-08-09 9:41 ` Peter Maydell
2011-08-09 12:56 ` Avi Kivity
2011-08-09 13:06 ` [PATCH v1.2 " Avi Kivity
2011-08-09 13:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 10/24] onenand: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 11/24] pcie_host: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 12/24] ppc405_uc: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 13/24] ppc4xx_sdram: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:06 ` [PATCH 14/24] stellaris_enet: " Avi Kivity
2011-08-08 17:06 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 15/24] sysbus: add a variant of sysbus_init_mmio_cb with an unmap callback Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 16/24] sh_pci: convert to memory API Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 17/24] arm11mpcore: use sysbus_init_mmio_cb2 Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-12 13:23 ` Peter Maydell
2011-08-14 18:45 ` Avi Kivity
2011-08-14 18:45 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 18/24] versatile_pci: convert to memory API Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-11 16:20 ` Peter Maydell
2011-08-11 16:20 ` [Qemu-devel] " Peter Maydell
2011-08-11 16:26 ` Avi Kivity
2011-08-11 16:29 ` [PATCH v1.1 " Avi Kivity
2011-08-11 16:29 ` [Qemu-devel] " Avi Kivity
2011-08-11 21:53 ` Peter Maydell
2011-08-11 21:53 ` [Qemu-devel] " Peter Maydell
2011-08-14 18:31 ` Avi Kivity
2011-08-14 18:31 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 19/24] ppce500_pci: convert to sysbus_init_mmio_cb2() Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 20/24] sysbus: remove sysbus_init_mmio_cb() Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 21/24] isa: add isa_address_space() Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-10 16:24 ` Richard Henderson [this message]
2011-08-10 16:26 ` Richard Henderson
2011-08-10 16:35 ` Avi Kivity
2011-08-10 16:38 ` Avi Kivity
2011-08-10 18:44 ` Avi Kivity
2011-08-10 16:32 ` Avi Kivity
2011-08-08 17:07 ` [PATCH 22/24] pci: add pci_address_space() Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 23/24] vga: drop get_system_memory() from vga devices and derivatives Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
2011-08-08 17:07 ` [PATCH 24/24] 440fx: fix PAM, PCI holes Avi Kivity
2011-08-08 17:07 ` [Qemu-devel] " Avi Kivity
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=4E42B0A5.1010005@twiddle.net \
--to=rth@twiddle.net \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--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.