mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
system/physmem: Propagate AddressSpace to MapClient helpers
Propagate AddressSpace handler to following helpers: - register_map_client() - unregister_map_client() - notify_map_clients[_locked]() Rename them using 'address_space_' prefix instead of 'cpu_'. The AddressSpace argument will be used in the next commit. Reviewed-by: Peter Xu <peterx@redhat.com> Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Mattias Nissler <mnissler@rivosinc.com> Message-ID: <20240507094210.300566-2-mnissler@rivosinc.com> [PMD: Split patch, part 1/2] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
d5e268197a
commit
5c62719710
4 changed files with 38 additions and 18 deletions
|
@ -2946,8 +2946,8 @@ bool address_space_access_valid(AddressSpace *as, hwaddr addr, hwaddr len,
|
|||
* May return %NULL and set *@plen to zero(0), if resources needed to perform
|
||||
* the mapping are exhausted.
|
||||
* Use only for reads OR writes - not for read-modify-write operations.
|
||||
* Use cpu_register_map_client() to know when retrying the map operation is
|
||||
* likely to succeed.
|
||||
* Use address_space_register_map_client() to know when retrying the map
|
||||
* operation is likely to succeed.
|
||||
*
|
||||
* @as: #AddressSpace to be accessed
|
||||
* @addr: address within that address space
|
||||
|
@ -2972,6 +2972,28 @@ void *address_space_map(AddressSpace *as, hwaddr addr,
|
|||
void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
|
||||
bool is_write, hwaddr access_len);
|
||||
|
||||
/*
|
||||
* address_space_register_map_client: Register a callback to invoke when
|
||||
* resources for address_space_map() are available again.
|
||||
*
|
||||
* address_space_map may fail when there are not enough resources available,
|
||||
* such as when bounce buffer memory would exceed the limit. The callback can
|
||||
* be used to retry the address_space_map operation. Note that the callback
|
||||
* gets automatically removed after firing.
|
||||
*
|
||||
* @as: #AddressSpace to be accessed
|
||||
* @bh: callback to invoke when address_space_map() retry is appropriate
|
||||
*/
|
||||
void address_space_register_map_client(AddressSpace *as, QEMUBH *bh);
|
||||
|
||||
/*
|
||||
* address_space_unregister_map_client: Unregister a callback that has
|
||||
* previously been registered and not fired yet.
|
||||
*
|
||||
* @as: #AddressSpace to be accessed
|
||||
* @bh: callback to unregister
|
||||
*/
|
||||
void address_space_unregister_map_client(AddressSpace *as, QEMUBH *bh);
|
||||
|
||||
/* Internal functions, part of the implementation of address_space_read. */
|
||||
MemTxResult address_space_read_full(AddressSpace *as, hwaddr addr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue