public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Explicit type conversion to avoid compilation failure
@ 2010-09-26  9:37 Hai Shan
  2010-09-29 21:17 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Hai Shan @ 2010-09-26  9:37 UTC (permalink / raw)
  To: kvm; +Cc: Shan Hai

From: Shan Hai <haishan.bai@gmail.com>

The compilation failed using GCC-4.4.1 on mismatched types
---
 qemu-kvm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index d747ed8..e33fe17 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1145,7 +1145,7 @@ static void sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo,
         /* Hope we are lucky for AO MCE */
         vaddr = (void *)(intptr_t)siginfo->ssi_addr;
         if (do_qemu_ram_addr_from_host(vaddr, &ram_addr) ||
-            !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, &paddr)) {
+            !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, (target_phys_addr_t *)&paddr)) {
             fprintf(stderr, "Hardware memory error for memory used by "
                     "QEMU itself instead of guest system!: %llx\n",
                     (unsigned long long)siginfo->ssi_addr);
@@ -1354,7 +1354,7 @@ static void kvm_on_sigbus(CPUState *env, siginfo_t *siginfo)
         }
         vaddr = (void *)siginfo->si_addr;
         if (do_qemu_ram_addr_from_host(vaddr, &ram_addr) ||
-            !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, &paddr)) {
+            !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, (target_phys_addr_t *)&paddr)) {
             fprintf(stderr, "Hardware memory error for memory used by "
                     "QEMU itself instaed of guest system!\n");
             /* Hope we are lucky for AO MCE */
-- 
1.7.0.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Explicit type conversion to avoid compilation failure
  2010-09-26  9:37 [PATCH] Explicit type conversion to avoid compilation failure Hai Shan
@ 2010-09-29 21:17 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-09-29 21:17 UTC (permalink / raw)
  To: Hai Shan; +Cc: kvm

On Sun, Sep 26, 2010 at 05:37:53PM +0800, Hai Shan wrote:
> From: Shan Hai <haishan.bai@gmail.com>
> 
> The compilation failed using GCC-4.4.1 on mismatched types
> ---
>  qemu-kvm.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-30  5:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-26  9:37 [PATCH] Explicit type conversion to avoid compilation failure Hai Shan
2010-09-29 21:17 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox