qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions
Date: Thu, 25 Oct 2012 23:03:39 +1000

On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann <address@hidden> 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 registers (and sucessfully fakes reading and
>> writing the registers with no side effects).
>
> Should not be needed, memory api should deal with that properly.

CC Avi,

Whats going on here is there is a container of size 0x1000 created
with memory_region_init() and a handful of small subregions are
populated. the container is then mapped to a 0x1000 size region of the
system memory. What is supposed to happen when the guest access a
region in the container for which no subregion has been added? For me
it was a segfault, so i needed this patch for guest to proceed past
accesses these undefined regions.

> Something is fishy somewhere.  Maybe the dmacontext thing Peter Maydell
> noted for patch 5.
>

I think thats a separate issue. This is about the guest accessing the
EHCI MMIO region not DMA.

My implementation of P5 is functionality equivalent to Peters
proposal. Just Peters idea will save me two lines of code and a memory
leak :)

Regards,
Peter

> cheers,
>   Gerd
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]