[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory reg
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself |
Date: |
Fri, 15 Feb 2013 15:35:43 +0000 |
On 15 February 2013 15:21, Paolo Bonzini <address@hidden> wrote:
> Il 15/02/2013 12:45, Peter Maydell ha scritto:
>> Don't map the pmem and dmem RAM memory regions in the milkymist-softusb
>> device itself. Instead just expose them as sysbus mmio regions which
>> the device creator can map appropriately. This allows us to drop the
>> pmem_base and dmem_base properties. Instead of going via
>> cpu_physical_memory_read/_write when the device wants to access the
>> RAMs, we just keep a host pointer to the memory and use that.
>
> I think it's best to avoid storing long-lived host pointers. Ideally we
> should have no long-lived host pointers anytime the thread is quiescent
> (for CPUs that means kvm_cpu_exec or the end of qemu_tcg_wait_io_event;
> for I/O that means select/poll).
>
> Can you call memory_region_get_ram_ptr from the read/write functions?
I could, but does it buy us anything in particular? (alternatively,
what's the reason why we should avoid storing the host pointers?
We do it in a number of other devices...)
-- PMM
- Re: [Qemu-devel] [PATCH 2/5] musicpal: qdevify musicpal-misc, (continued)
[Qemu-devel] [PATCH 3/5] milkymist-minimac2: Just expose buffers as a sysbus mmio region, Peter Maydell, 2013/02/15
[Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Peter Maydell, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Andreas Färber, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Paolo Bonzini, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Paolo Bonzini, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Peter Maydell, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Paolo Bonzini, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Peter Maydell, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Paolo Bonzini, 2013/02/18
Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Michael Walle, 2013/02/17