qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] RFC: memory API changes


From: Peter Maydell
Subject: Re: [Qemu-devel] RFC: memory API changes
Date: Tue, 24 Mar 2015 13:47:46 +0000

On 23 March 2015 at 12:24, Peter Maydell <address@hidden> wrote:
> (This is part of the work I'm doing for transaction attributes.)

OK, here's try 2, based on feedback on the first proposal:

 * address_space_rw &c remain with their current names, but
   take an extra MemTxAttrs argument and return MemTxResult
   rather than bool. (The latter conveniently doesn't require changes to
   callsites because conversion to bool gives the same true-on-error
   semantics as before.)
   [maybe readbuf/writebuf would be clearer than read/write,
   but it didn't seem sufficiently obvious a win to make the change]
 * the ld/st_*phys functions are renamed as:
     ldl_be_phys -> address_space_ldl_be &c
   and all take MemTxAttrs, *MemTxResult
 * rather than MEMTXATTRS_UNSPECIFIED, use TXATTRS_NONE, so the
   extra arguments (TXATTRS_NONE, NULL) aren't too unwieldy
 * prototypes in memory.h
 * no default-to-no-attrs/etc versions of ld/st*_ phys
   (if in specific devices/buses it's the best thing we should
   have bus-specific dma accessors, as we do for pci)
 * mechanically convert all uses of cpu_physical_memory_* to
   address_space_*(&address_space_memory, ...)

[This leaves the "where do we call the unassigned-access
hooks" problem for a different patchset.]

Is there anything in there people strongly dislike, or
should I start writing coccinelle patches for this?

-- PMM



reply via email to

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