[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/14] exec.c: Add new address_space_ld*/st* fun
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 07/14] exec.c: Add new address_space_ld*/st* functions |
Date: |
Thu, 09 Apr 2015 14:00:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 09/04/2015 13:49, Peter Maydell wrote:
>> > I think we do not want to expose these at all (or at least, all users
>> > should really be CPUs and hence use *_phys functions).
>> >
>> > S390 is always big-endian, and watch_mem_read/write can use the same
>> > buffer trick as subpages (and in fact should probably use memattrs as
>> > well).
>> >
>> > So, please at least add a comment that these functions are deprecated,
>> > and check if watch_mem_read/write should be handled like subpages.
> I looked at the subpages code, and it seems to me that it's the
> other way around -- the subpages code should use these new functions.
> At the moment the subpage handlers use address_space_read/write
> to pull the data into a buffer, and then use the ldl_p/stl_p functions
> to do "read data from target-CPU order buffer into host variable".
> It would be better for them to just directly be able to say "do
> a ld/st in target-CPU order into this host variable", which is
> the purpose of these new functions. Indirecting via a buffer seems
> like an ugly workaround for not having the direct operation.
Using them in subpage code is fine, but then the subpage code is in
exec.c and can use the _internal version directly (and pass
DEVICE_NATIVE_ENDIAN). Still, usage of these outside exec.c is probably
suspicious. It's at least worth pulling these in cpu-all.h; the whole
contents of cpu-common.h look like a sundry of functions that either are
deprecated or should be declared elsewhere.
Paolo
- Re: [Qemu-devel] [PATCH 02/14] memory: Add MemTxAttrs, MemTxResult to io_mem_read and io_mem_write, (continued)
Re: [Qemu-devel] [PATCH 07/14] exec.c: Add new address_space_ld*/st* functions, Edgar E. Iglesias, 2015/04/09
[Qemu-devel] [PATCH 14/14] target-arm: Check watchpoints against CPU security state, Peter Maydell, 2015/04/07
[Qemu-devel] [PATCH 01/14] memory: Define API for MemoryRegionOps to take attrs and return status, Peter Maydell, 2015/04/07