* [Qemu-devel] [PULL] Memory API fixes - rom/device
@ 2011-08-28 15:52 Avi Kivity
2011-08-29 9:06 ` Avi Kivity
2011-08-29 14:52 ` Anthony Liguori
0 siblings, 2 replies; 3+ messages in thread
From: Avi Kivity @ 2011-08-28 15:52 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel
Anthony, please pull from
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/core
to receive fixes for the rom/device API - initialize ->ops and a new
->opaque.
Avi Kivity (2):
memory: fix memory_region_init_rom_device() not initializing ->ops
memory: add opaque parameter to memory_region_init_rom_device()
memory.c | 3 +++
memory.h | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/memory.c b/memory.c
index 8e9ac46..1491a39 100644
--- a/memory.c
+++ b/memory.c
@@ -962,11 +962,14 @@ void memory_region_init_alias(MemoryRegion *mr,
void memory_region_init_rom_device(MemoryRegion *mr,
const MemoryRegionOps *ops,
+ void *opaque,
DeviceState *dev,
const char *name,
uint64_t size)
{
memory_region_init(mr, name, size);
+ mr->ops = ops;
+ mr->opaque = opaque;
mr->terminates = true;
mr->destructor = memory_region_destructor_rom_device;
mr->ram_addr = qemu_ram_alloc(dev, name, size);
diff --git a/memory.h b/memory.h
index 0553cc7..06b83ae 100644
--- a/memory.h
+++ b/memory.h
@@ -235,6 +235,7 @@ void memory_region_init_alias(MemoryRegion *mr,
*/
void memory_region_init_rom_device(MemoryRegion *mr,
const MemoryRegionOps *ops,
+ void *opaque,
DeviceState *dev, /* FIXME: layering violation */
const char *name,
uint64_t size);
--
error compiling committee.c: too many arguments to function
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL] Memory API fixes - rom/device
2011-08-28 15:52 [Qemu-devel] [PULL] Memory API fixes - rom/device Avi Kivity
@ 2011-08-29 9:06 ` Avi Kivity
2011-08-29 14:52 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2011-08-29 9:06 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel
On 08/28/2011 06:52 PM, Avi Kivity wrote:
> Anthony, please pull from
>
> git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/core
>
> to receive fixes for the rom/device API - initialize ->ops and a new
> ->opaque.
>
> Avi Kivity (2):
> memory: fix memory_region_init_rom_device() not initializing ->ops
> memory: add opaque parameter to memory_region_init_rom_device()
>
I tacked on a third commit:
commit b5fe14cc7efa4e3ef58f591728e69203287a9de4
Author: Avi Kivity <avi@redhat.com>
Date: Mon Aug 29 09:12:49 2011 +0300
memory: fix rom_device I/O mode
When adding a rom_device in I/O mode, we incorrectly masked off the low
bits, resulting in a pure RAM map. Fix my masking off the high
bits and
IO_MEM_ROMD, yielding a pure I/O map.
Signed-off-by: Avi Kivity <avi@redhat.com>
diff --git a/memory.c b/memory.c
index 1491a39..eb31fa8 100644
--- a/memory.c
+++ b/memory.c
@@ -304,7 +304,7 @@ static void as_memory_range_add(AddressSpace *as,
FlatRange *fr)
}
if (!fr->readable) {
- phys_offset &= TARGET_PAGE_MASK;
+ phys_offset &= ~TARGET_PAGE_MASK & ~IO_MEM_ROMD;
}
cpu_register_physical_memory_log(fr->addr.start,
--
error compiling committee.c: too many arguments to function
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL] Memory API fixes - rom/device
2011-08-28 15:52 [Qemu-devel] [PULL] Memory API fixes - rom/device Avi Kivity
2011-08-29 9:06 ` Avi Kivity
@ 2011-08-29 14:52 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2011-08-29 14:52 UTC (permalink / raw)
To: Avi Kivity; +Cc: qemu-devel
On 08/28/2011 10:52 AM, Avi Kivity wrote:
> Anthony, please pull from
>
> git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/core
>
> to receive fixes for the rom/device API - initialize ->ops and a new
> ->opaque.
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Avi Kivity (2):
> memory: fix memory_region_init_rom_device() not initializing ->ops
> memory: add opaque parameter to memory_region_init_rom_device()
>
> memory.c | 3 +++
> memory.h | 1 +
> 2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/memory.c b/memory.c
> index 8e9ac46..1491a39 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -962,11 +962,14 @@ void memory_region_init_alias(MemoryRegion *mr,
>
> void memory_region_init_rom_device(MemoryRegion *mr,
> const MemoryRegionOps *ops,
> + void *opaque,
> DeviceState *dev,
> const char *name,
> uint64_t size)
> {
> memory_region_init(mr, name, size);
> + mr->ops = ops;
> + mr->opaque = opaque;
> mr->terminates = true;
> mr->destructor = memory_region_destructor_rom_device;
> mr->ram_addr = qemu_ram_alloc(dev, name, size);
> diff --git a/memory.h b/memory.h
> index 0553cc7..06b83ae 100644
> --- a/memory.h
> +++ b/memory.h
> @@ -235,6 +235,7 @@ void memory_region_init_alias(MemoryRegion *mr,
> */
> void memory_region_init_rom_device(MemoryRegion *mr,
> const MemoryRegionOps *ops,
> + void *opaque,
> DeviceState *dev, /* FIXME: layering violation */
> const char *name,
> uint64_t size);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-29 14:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-28 15:52 [Qemu-devel] [PULL] Memory API fixes - rom/device Avi Kivity
2011-08-29 9:06 ` Avi Kivity
2011-08-29 14:52 ` Anthony Liguori
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.