From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
"Richard Henderson" <rth@twiddle.net>,
"Andreas Färber" <afaerber@suse.de>,
"Greg Bellows" <greg.bellows@linaro.org>
Subject: Re: [Qemu-devel] RFC: memory API changes
Date: Tue, 24 Mar 2015 15:45:19 +0100 [thread overview]
Message-ID: <5511787F.40301@redhat.com> (raw)
In-Reply-To: <CAFEAcA8e3YwooQJHckMyuFO2yvDeDy73pj9LQ7Digj2DfzrUKQ@mail.gmail.com>
On 24/03/2015 14:47, Peter Maydell wrote:
> On 23 March 2015 at 12:24, Peter Maydell <peter.maydell@linaro.org> 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)
I would keep them since they're really heavily used with cs->as as the
first argument. But definitely move them to a different header than
cpu-common.h, and perhaps make them takes a CPUState instead of an
AddressSpace (which might help solving "where do we call the
unassigned-access hooks" in the future).
In any case, the removal or segregation of ld/st*_phys should be a
separate series for ease of review.
Apart from this, I'm on board.
Paolo
> * 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
>
next prev parent reply other threads:[~2015-03-24 14:45 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 12:24 [Qemu-devel] RFC: memory API changes Peter Maydell
2015-03-23 12:30 ` Andreas Färber
2015-03-23 12:33 ` Peter Maydell
2015-03-23 14:39 ` Paolo Bonzini
2015-03-23 15:11 ` Peter Maydell
2015-03-23 15:18 ` Paolo Bonzini
2015-03-23 15:26 ` Peter Maydell
2015-03-23 15:27 ` Paolo Bonzini
2015-03-23 15:39 ` Peter Maydell
2015-03-23 15:47 ` Paolo Bonzini
2015-03-23 16:00 ` Peter Maydell
2015-03-23 16:30 ` Paolo Bonzini
2015-03-23 16:43 ` Peter Maydell
2015-03-23 16:32 ` Andreas Färber
2015-03-25 10:56 ` Igor Mammedov
2015-03-23 17:51 ` Andreas Färber
2015-03-23 17:59 ` Peter Maydell
2015-03-24 13:47 ` Peter Maydell
2015-03-24 14:45 ` Paolo Bonzini [this message]
2015-03-24 14:53 ` Peter Maydell
2015-03-24 15:08 ` Paolo Bonzini
2015-03-24 15:12 ` Peter Maydell
2015-03-24 16:23 ` Paolo Bonzini
2015-03-24 16:35 ` Peter Maydell
2015-03-24 17:51 ` Paolo Bonzini
2015-03-24 18:06 ` Peter Maydell
2015-03-24 20:00 ` Paolo Bonzini
2015-03-24 23:41 ` Peter Maydell
2015-03-25 11:34 ` Paolo Bonzini
2015-03-25 11:43 ` Peter Maydell
2015-03-25 11:50 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5511787F.40301@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=edgar.iglesias@gmail.com \
--cc=greg.bellows@linaro.org \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.