Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-10-20 Thread Avi Kivity
On 10/20/2009 10:28 PM, Alexander Graf wrote: compat_ioctl, and being more careful in the future. So I'll include Arnd's patch in my patchset instead? Send it independently and Marcelo or myself will apply it. -- I have a truly marvellous patch that fixes the bug which this signature is too

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-10-20 Thread Alexander Graf
On 20.10.2009, at 15:23, Avi Kivity wrote: On 10/20/2009 07:09 PM, Alexander Graf wrote: On 30.09.2009, at 15:29, Avi Kivity wrote: On 09/30/2009 03:17 PM, Avi Kivity wrote: { struct page *page[1]; @@ -2331,7 +2374,7 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-10-20 Thread Avi Kivity
On 10/20/2009 07:09 PM, Alexander Graf wrote: On 30.09.2009, at 15:29, Avi Kivity wrote: On 09/30/2009 03:17 PM, Avi Kivity wrote: { struct page *page[1]; @@ -2331,7 +2374,7 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct *vma) static struct file_operations kvm_vm_

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-10-20 Thread Alexander Graf
On 30.09.2009, at 15:29, Avi Kivity wrote: On 09/30/2009 03:17 PM, Avi Kivity wrote: { struct page *page[1]; @@ -2331,7 +2374,7 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct *vma) static struct file_operations kvm_vm_fops = { .release= kvm_vm_release

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-30 Thread Avi Kivity
On 09/30/2009 03:17 PM, Avi Kivity wrote: { struct page *page[1]; @@ -2331,7 +2374,7 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct *vma) static struct file_operations kvm_vm_fops = { .release= kvm_vm_release, .unlocked_ioctl = kvm_vm_ioctl, -

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-30 Thread Avi Kivity
On 09/30/2009 02:04 PM, Arnd Bergmann wrote: On Tuesday 29 September 2009, Avi Kivity wrote: r = -EINVAL; if (log->slot>= KVM_MEMORY_SLOTS) @@ -718,8 +719,15 @@ int kvm_get_dirty_log(struct kvm *kvm, for (i = 0; !any&& i< n/sizeof(long); ++i) any

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-30 Thread Arnd Bergmann
On Tuesday 29 September 2009, Avi Kivity wrote: > > > > r = -EINVAL; > > if (log->slot >= KVM_MEMORY_SLOTS) > > @@ -718,8 +719,15 @@ int kvm_get_dirty_log(struct kvm *kvm, > > for (i = 0; !any && i < n/sizeof(long); ++i) > > any = memslot->dirty_bitmap[i]; >

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
On 29.09.2009, at 18:42, Avi Kivity wrote: On 09/29/2009 06:29 PM, Alexander Graf wrote: How about this one? (broken whitespace!) From c3864a2c5e1fccff7839e47f12c09d9739ca441e Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 23 Jul 2009 21:05:57 +0200 Subject: [PATCH] Enable 32bi

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Avi Kivity
On 09/29/2009 06:29 PM, Alexander Graf wrote: How about this one? (broken whitespace!) From c3864a2c5e1fccff7839e47f12c09d9739ca441e Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 23 Jul 2009 21:05:57 +0200 Subject: [PATCH] Enable 32bit dirty log pointers on 64bit host With big endi

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
On 29.09.2009, at 15:25, Avi Kivity wrote: On 09/29/2009 11:17 AM, Alexander Graf wrote: On 29.09.2009, at 11:14, Avi Kivity wrote: On 09/29/2009 10:18 AM, Alexander Graf wrote: With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted>> 32) or 64 bit when we rea

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
Am 29.09.2009 um 06:25 schrieb Avi Kivity : On 09/29/2009 11:17 AM, Alexander Graf wrote: On 29.09.2009, at 11:14, Avi Kivity wrote: On 09/29/2009 10:18 AM, Alexander Graf wrote: With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted>> 32) or 64 bit when we re

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Avi Kivity
On 09/29/2009 11:17 AM, Alexander Graf wrote: On 29.09.2009, at 11:14, Avi Kivity wrote: On 09/29/2009 10:18 AM, Alexander Graf wrote: With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted>> 32) or 64 bit when we read a 64 bit pointer. This is what happens with

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
On 29.09.2009, at 11:14, Avi Kivity wrote: On 09/29/2009 10:18 AM, Alexander Graf wrote: With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted>> 32) or 64 bit when we read a 64 bit pointer. This is what happens with dirty logging. To get the pointer interpret

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Avi Kivity
On 09/29/2009 10:18 AM, Alexander Graf wrote: With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted>> 32) or 64 bit when we read a 64 bit pointer. This is what happens with dirty logging. To get the pointer interpreted correctly, I just make it bounce twice, but a

[PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted >> 32) or 64 bit when we read a 64 bit pointer. This is what happens with dirty logging. To get the pointer interpreted correctly, I just make it bounce twice, but admittedly that is not ideal. I'm open for sugge