From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3LQ7-0007NF-9J for qemu-devel@nongnu.org; Wed, 15 Jan 2014 03:01:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3LQ2-0000UI-94 for qemu-devel@nongnu.org; Wed, 15 Jan 2014 03:01:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3LQ2-0000UC-0K for qemu-devel@nongnu.org; Wed, 15 Jan 2014 03:01:46 -0500 Date: Wed, 15 Jan 2014 10:01:40 +0200 From: "Michael S. Tsirkin" Message-ID: <20140115080140.GA1078@redhat.com> References: <1389338418-26244-1-git-send-email-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1389338418-26244-1-git-send-email-aik@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-devel@nongnu.org, Alexander Graf On Fri, Jan 10, 2014 at 06:20:18PM +1100, Alexey Kardashevskiy wrote: > 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 Reviewed-by: Michael S. Tsirkin > --- > > 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 >