From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1WOi-0004nD-2q for qemu-devel@nongnu.org; Fri, 10 Jan 2014 02:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1WOZ-00054s-RG for qemu-devel@nongnu.org; Fri, 10 Jan 2014 02:20:52 -0500 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:58832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1WOZ-00053Q-4p for qemu-devel@nongnu.org; Fri, 10 Jan 2014 02:20:43 -0500 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Jan 2014 17:20:31 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id F41712CE8052 for ; Fri, 10 Jan 2014 18:20:28 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0A7K8AP9306496 for ; Fri, 10 Jan 2014 18:20:16 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0A7KK1D003801 for ; Fri, 10 Jan 2014 18:20:20 +1100 From: Alexey Kardashevskiy Date: Fri, 10 Jan 2014 18:20:18 +1100 Message-Id: <1389338418-26244-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Alexander Graf , "Michael S. Tsirkin" The @addr here is a guest physical address and can easily be bigger than 4G. This changes uint32_t to hwaddr. Cc: Michael S. Tsirkin Signed-off-by: Alexey Kardashevskiy --- This was found during investigation why vhost is not always working on PPC64-spapr. It turned out that KVM_IOEVENTFD was called with a 32bit address while the actual guest physycal address for that PCI host bus was 0x100.0000.0000 and __kvm_io_bus_write() in the host kernel would never succeed. --- kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvm-all.c b/kvm-all.c index 3937754..dcd7cdd 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -519,7 +519,7 @@ int kvm_check_extension(KVMState *s, unsigned int extension) return ret; } -static int kvm_set_ioeventfd_mmio(int fd, uint32_t addr, uint32_t val, +static int kvm_set_ioeventfd_mmio(int fd, hwaddr addr, uint32_t val, bool assign, uint32_t size, bool datamatch) { int ret; -- 1.8.4.rc4