* [PATCH] libkvm: fix stack underflow in MMIO read write calls
@ 2007-12-28 4:37 Carlo Marcelo Arenas Belon
2007-12-30 12:31 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Carlo Marcelo Arenas Belon @ 2007-12-28 4:37 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
This patch complement 6eabe2ba30a673c4280df75b28520e0e1f4a2171 so that
all callbacks used for MMIO read/write use the ABI exported in libkvm.h.
This fixes the following warnings was reported at compile time :
main.c:392: warning: initialization from incompatible pointer type
main.c:393: warning: initialization from incompatible pointer type
qemu/qemu-kvm.c:532: warning: initialization from incompatible pointer type
qemu/qemu-kvm.c:533: warning: initialization from incompatible pointer type
Signed-off-by: Carlo Marcelo Arenas Belon <carenas-kLeDWSohozoJb6fo7hG9ng@public.gmane.org>
---
qemu/qemu-kvm.c | 6 ++----
user/main.c | 4 ++--
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index a61b95c..9aee903 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -483,15 +483,13 @@ static int kvm_outl(void *opaque, uint16_t addr, uint32_t data)
return 0;
}
-static int kvm_mmio_read(void *opaque, uint64_t addr,
- uint8_t *data, int len, int is_write)
+static int kvm_mmio_read(void *opaque, uint64_t addr, uint8_t *data, int len)
{
cpu_physical_memory_rw(addr, data, len, 0);
return 0;
}
-static int kvm_mmio_write(void *opaque, uint64_t addr,
- uint8_t *data, int len, int is_write)
+static int kvm_mmio_write(void *opaque, uint64_t addr, uint8_t *data, int len)
{
cpu_physical_memory_rw(addr, data, len, 1);
return 0;
diff --git a/user/main.c b/user/main.c
index 4d870fa..a2d6b8b 100644
--- a/user/main.c
+++ b/user/main.c
@@ -366,7 +366,7 @@ static int test_pre_kvm_run(void *opaque, int vcpu)
return 0;
}
-static int test_mem_read(void *opaque, uint64_t addr, void *data, unsigned len)
+static int test_mem_read(void *opaque, uint64_t addr, uint8_t *data, int len)
{
if (addr < IORAM_BASE_PHYS || addr + len > IORAM_BASE_PHYS + IORAM_LEN)
return 1;
@@ -374,7 +374,7 @@ static int test_mem_read(void *opaque, uint64_t addr, void *data, unsigned len)
return 0;
}
-static int test_mem_write(void *opaque, uint64_t addr, void *data, unsigned len)
+static int test_mem_write(void *opaque, uint64_t addr, uint8_t *data, int len)
{
if (addr < IORAM_BASE_PHYS || addr + len > IORAM_BASE_PHYS + IORAM_LEN)
return 1;
--
1.5.2.5
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libkvm: fix stack underflow in MMIO read write calls
2007-12-28 4:37 [PATCH] libkvm: fix stack underflow in MMIO read write calls Carlo Marcelo Arenas Belon
@ 2007-12-30 12:31 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-12-30 12:31 UTC (permalink / raw)
To: Carlo Marcelo Arenas Belon; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Carlo Marcelo Arenas Belon wrote:
> This patch complement 6eabe2ba30a673c4280df75b28520e0e1f4a2171 so that
> all callbacks used for MMIO read/write use the ABI exported in libkvm.h.
>
> This fixes the following warnings was reported at compile time :
>
> main.c:392: warning: initialization from incompatible pointer type
> main.c:393: warning: initialization from incompatible pointer type
> qemu/qemu-kvm.c:532: warning: initialization from incompatible pointer type
> qemu/qemu-kvm.c:533: warning: initialization from incompatible pointer type
>
Applied, thanks (though that's just a signature mismatch, not a stack
underflow).
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-30 12:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-28 4:37 [PATCH] libkvm: fix stack underflow in MMIO read write calls Carlo Marcelo Arenas Belon
2007-12-30 12:31 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox