From: Carlo Marcelo Arenas Belon <carenas-kLeDWSohozoJb6fo7hG9ng@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] libkvm: fix stack underflow in MMIO read write calls
Date: Thu, 27 Dec 2007 22:37:24 -0600 [thread overview]
Message-ID: <20071228043724.GB22639@tapir> (raw)
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/
next reply other threads:[~2007-12-28 4:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-28 4:37 Carlo Marcelo Arenas Belon [this message]
2007-12-30 12:31 ` [PATCH] libkvm: fix stack underflow in MMIO read write calls 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=20071228043724.GB22639@tapir \
--to=carenas-kledwsohozojb6fo7hg9ng@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox