From patchwork Wed Oct 7 11:19:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 52250 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n97BUXoM030759 for ; Wed, 7 Oct 2009 11:30:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758993AbZJGLVu (ORCPT ); Wed, 7 Oct 2009 07:21:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758994AbZJGLVu (ORCPT ); Wed, 7 Oct 2009 07:21:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62575 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758992AbZJGLVu (ORCPT ); Wed, 7 Oct 2009 07:21:50 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97BLOtd014216 for ; Wed, 7 Oct 2009 07:21:24 -0400 Received: from redhat.com (vpn-10-3.str.redhat.com [10.32.10.3]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n97BLMaV000754; Wed, 7 Oct 2009 07:21:23 -0400 Date: Wed, 7 Oct 2009 13:19:22 +0200 From: "Michael S. Tsirkin" To: avi@redhat.com, kvm@vger.kernel.org Subject: [PATCH 2/3] qemu-kvm: fix build on 32 bit Message-ID: <20091007111922.GC20835@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/qemu-kvm.c b/qemu-kvm.c index a4a90ed..62ca050 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -588,7 +588,7 @@ int kvm_register_phys_mem(kvm_context_t kvm, struct kvm_userspace_memory_region memory = { .memory_size = len, .guest_phys_addr = phys_start, - .userspace_addr = (unsigned long) (intptr_t) userspace_addr, + .userspace_addr = (unsigned long) (uintptr_t) userspace_addr, .flags = log ? KVM_MEM_LOG_DIRTY_PAGES : 0, }; int r; @@ -1554,7 +1554,8 @@ static void sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo, CPUState *cenv; /* Hope we are lucky for AO MCE */ - if (do_qemu_ram_addr_from_host((void *)siginfo->ssi_addr, &paddr)) { + if (do_qemu_ram_addr_from_host((void *)(intptr_t)siginfo->ssi_addr, + &paddr)) { fprintf(stderr, "Hardware memory error for memory used by " "QEMU itself instead of guest system!: %llx\n", (unsigned long long)siginfo->ssi_addr);