[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD |
Date: |
Wed, 15 Jan 2014 12:59:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 10/01/2014 08:20, Alexey Kardashevskiy ha scritto:
> 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 <address@hidden>
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
> ---
>
> 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;
>
Applied to uq/master, thanks.
Paolo