Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:59, Peter Crosthwaite wrote: > On Thu, Oct 25, 2012 at 11:50 PM, Peter Maydell > wrote: >> On 25 October 2012 14:41, Avi Kivity wrote: >>> wrt decode duplication, I've been thinking of a single ->service() >>> callback that accepts a Transaction argument, including all the

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 11:50 PM, Peter Maydell wrote: > On 25 October 2012 14:41, Avi Kivity wrote: >> On 10/25/2012 03:28 PM, Peter Maydell wrote: >>> On 25 October 2012 14:21, Avi Kivity wrote: You could easily have the top-level container have ->ops that generate an exception. >>>

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Avi Kivity
On 10/25/2012 03:50 PM, Peter Maydell wrote: > On 25 October 2012 14:41, Avi Kivity wrote: >> On 10/25/2012 03:28 PM, Peter Maydell wrote: >>> On 25 October 2012 14:21, Avi Kivity wrote: You could easily have the top-level container have ->ops that generate an exception. >>> >>> Ah, yes

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:41, Avi Kivity wrote: > On 10/25/2012 03:28 PM, Peter Maydell wrote: >> On 25 October 2012 14:21, Avi Kivity wrote: >>> You could easily have the top-level container have ->ops that generate >>> an exception. >> >> Ah, yes, there's an 'accepts' callback. (That's kind of awkw

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Avi Kivity
On 10/25/2012 03:28 PM, Peter Maydell wrote: > On 25 October 2012 14:21, Avi Kivity wrote: >> On 10/25/2012 03:12 PM, Peter Maydell wrote: >>> (2) what should the memory system do for accesses where there is >>> no memory region? This is really system specific as it depends >>> what the bus fab

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:21, Avi Kivity wrote: > On 10/25/2012 03:12 PM, Peter Maydell wrote: >> (2) what should the memory system do for accesses where there is >> no memory region? This is really system specific as it depends >> what the bus fabric does. For ARM the usual thing would be to >> g

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Avi Kivity
On 10/25/2012 03:12 PM, Peter Maydell wrote: > (2) what should the memory system do for accesses where there is > no memory region? This is really system specific as it depends > what the bus fabric does. For ARM the usual thing would be to > generate a decode error response which will result i

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Avi Kivity
On 10/25/2012 03:03 PM, Peter Crosthwaite wrote: > On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann wrote: >> On 10/25/12 11:47, Peter Crosthwaite wrote: >>> Just put RAM regions in the unimplemented spaces in the MMIO region. These >>> regions have undefined behaviour, but this at least stops QEMU

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:03, Peter Crosthwaite wrote: > On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann wrote: >> On 10/25/12 11:47, Peter Crosthwaite wrote: >>> Just put RAM regions in the unimplemented spaces in the MMIO region. These >>> regions have undefined behaviour, but this at least stops Q

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann wrote: > On 10/25/12 11:47, Peter Crosthwaite wrote: >> Just put RAM regions in the unimplemented spaces in the MMIO region. These >> regions have undefined behaviour, but this at least stops QEMU from >> segfaulting >> when the guest bangs on these

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Gerd Hoffmann
On 10/25/12 11:47, Peter Crosthwaite wrote: > Just put RAM regions in the unimplemented spaces in the MMIO region. These > regions have undefined behaviour, but this at least stops QEMU from > segfaulting > when the guest bangs on these registers (and sucessfully fakes reading and > writing the re

[Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Crosthwaite
Just put RAM regions in the unimplemented spaces in the MMIO region. These regions have undefined behaviour, but this at least stops QEMU from segfaulting when the guest bangs on these registers (and sucessfully fakes reading and writing the registers with no side effects). Signed-off-by: Peter Cr