Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Richard Henderson
On 07/17/2013 12:56 PM, Paolo Bonzini wrote: > It is: > > cpu_outb > -> address_space_write > -> address_space_rw > -> io_mem_write > -> memory_region_dispatch_write > -> access_with_adjusted_size > > memory_access_size is just returning a length that makes sense when > passed to io_mem_write and

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 21:28, Richard Henderson ha scritto: > On 07/17/2013 11:57 AM, Paolo Bonzini wrote: >> I'm still not sure what the bug is (so what the FIXME comment would >> be)... except of course that there may be bug in access_with_adjusted_size. > > The code here in exec.c is not using access_wi

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Richard Henderson
On 07/17/2013 11:57 AM, Paolo Bonzini wrote: > I'm still not sure what the bug is (so what the FIXME comment would > be)... except of course that there may be bug in access_with_adjusted_size. The code here in exec.c is not using access_with_adjusted_size. Unfortunately, access_with_adjusted_size

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 20:26, Richard Henderson ha scritto: > On 07/17/2013 10:32 AM, Paolo Bonzini wrote: >> My patch works. > > You patch doesn't crash for this device, which isn't quite the same thing. > > But it's certainly no worse than we had before my patch, so I'll not object so > long as a fixme

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Anthony Liguori
Paolo Bonzini writes: > Il 17/07/2013 17:50, Anthony Liguori ha scritto: >> Paolo Bonzini writes: >> >>> Il 17/07/2013 11:50, Markus Armbruster ha scritto: Richard Henderson writes: > Honor the implementation maximum access size, and at least check > the minimum access size.

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Richard Henderson
On 07/17/2013 10:32 AM, Paolo Bonzini wrote: > My patch works. You patch doesn't crash for this device, which isn't quite the same thing. But it's certainly no worse than we had before my patch, so I'll not object so long as a fixme sort of comment is installed too. r~

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 17:50, Anthony Liguori ha scritto: > Paolo Bonzini writes: > >> Il 17/07/2013 11:50, Markus Armbruster ha scritto: >>> Richard Henderson writes: >>> Honor the implementation maximum access size, and at least check the minimum access size. Reviewed-by: Paolo Bonz

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Anthony Liguori
Paolo Bonzini writes: > Il 17/07/2013 11:50, Markus Armbruster ha scritto: >> Richard Henderson writes: >> >>> Honor the implementation maximum access size, and at least check >>> the minimum access size. >>> >>> Reviewed-by: Paolo Bonzini >>> Signed-off-by: Richard Henderson >> >> Fails for

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 16:29, Richard Henderson ha scritto: > On 07/17/2013 06:45 AM, Paolo Bonzini wrote: >>> NAK. >>> >>> If you remove the check here, you're just trading it for one in the device. >>> The device told you that it can't support a 1 byte read. (Either that, or >>> the >>> device incorrect

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Richard Henderson
On 07/17/2013 06:45 AM, Paolo Bonzini wrote: >> NAK. >> >> If you remove the check here, you're just trading it for one in the device. >> The device told you that it can't support a 1 byte read. (Either that, or >> the >> device incorrectly reported what it can actually do.) > > There are two pa

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 15:23, Richard Henderson ha scritto: > On 07/17/2013 04:09 AM, Paolo Bonzini wrote: >>> >>> Fails for me: >>> >>> qemu-system-x86_64: /work/armbru/qemu/exec.c:1927: memory_access_size: >>> Assertion `l >= access_size_min' failed. >> >> This: >> >> unsigned access_size_min = mr->o

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Richard Henderson
On 07/17/2013 04:09 AM, Paolo Bonzini wrote: >> >> Fails for me: >> >> qemu-system-x86_64: /work/armbru/qemu/exec.c:1927: memory_access_size: >> Assertion `l >= access_size_min' failed. > > This: > > unsigned access_size_min = mr->ops->impl.min_access_size; > unsigned access_size_max = m

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 11:50, Markus Armbruster ha scritto: > Richard Henderson writes: > >> Honor the implementation maximum access size, and at least check >> the minimum access size. >> >> Reviewed-by: Paolo Bonzini >> Signed-off-by: Richard Henderson > > Fails for me: > > qemu-system-x86_64: /work

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Markus Armbruster
Richard Henderson writes: > Honor the implementation maximum access size, and at least check > the minimum access size. > > Reviewed-by: Paolo Bonzini > Signed-off-by: Richard Henderson Fails for me: qemu-system-x86_64: /work/armbru/qemu/exec.c:1927: memory_access_size: Assertion `l >= acces

[Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-14 Thread Richard Henderson
Honor the implementation maximum access size, and at least check the minimum access size. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- exec.c | 68 ++ 1 file changed, 56 insertions(+), 12 deletions(-) diff --git