* [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD
@ 2014-01-10 7:20 Alexey Kardashevskiy
2014-01-15 8:01 ` Michael S. Tsirkin
2014-01-15 11:59 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2014-01-10 7:20 UTC (permalink / raw)
To: qemu-devel; +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 <mst@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD
2014-01-10 7:20 [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD Alexey Kardashevskiy
@ 2014-01-15 8:01 ` Michael S. Tsirkin
2014-01-15 11:59 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2014-01-15 8:01 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: qemu-devel, 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 <mst@redhat.com>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD
2014-01-10 7:20 [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD Alexey Kardashevskiy
2014-01-15 8:01 ` Michael S. Tsirkin
@ 2014-01-15 11:59 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-01-15 11:59 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: Michael S. Tsirkin, qemu-devel, Alexander Graf
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 <mst@redhat.com>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-15 11:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-10 7:20 [Qemu-devel] [PATCH] KVM: fix addr type for KVM_IOEVENTFD Alexey Kardashevskiy
2014-01-15 8:01 ` Michael S. Tsirkin
2014-01-15 11:59 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).