mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
memory: add backward compatibility for old mmio registration
This eases the transition to the new API. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
627a0e90dc
commit
74901c3bd0
2 changed files with 20 additions and 0 deletions
10
memory.h
10
memory.h
|
@ -28,6 +28,7 @@
|
|||
typedef struct MemoryRegionOps MemoryRegionOps;
|
||||
typedef struct MemoryRegion MemoryRegion;
|
||||
typedef struct MemoryRegionPortio MemoryRegionPortio;
|
||||
typedef struct MemoryRegionMmio MemoryRegionMmio;
|
||||
|
||||
/* Must match *_DIRTY_FLAGS in cpu-all.h. To be replaced with dynamic
|
||||
* registration.
|
||||
|
@ -36,6 +37,11 @@ typedef struct MemoryRegionPortio MemoryRegionPortio;
|
|||
#define DIRTY_MEMORY_CODE 1
|
||||
#define DIRTY_MEMORY_MIGRATION 3
|
||||
|
||||
struct MemoryRegionMmio {
|
||||
CPUReadMemoryFunc *read[3];
|
||||
CPUWriteMemoryFunc *write[3];
|
||||
};
|
||||
|
||||
/*
|
||||
* Memory region callbacks
|
||||
*/
|
||||
|
@ -85,6 +91,10 @@ struct MemoryRegionOps {
|
|||
* backwards compatibility with old portio registration
|
||||
*/
|
||||
const MemoryRegionPortio *old_portio;
|
||||
/* If .read and .write are not present, old_mmio may be used for
|
||||
* backwards compatibility with old mmio registration
|
||||
*/
|
||||
const MemoryRegionMmio old_mmio;
|
||||
};
|
||||
|
||||
typedef struct CoalescedMemoryRange CoalescedMemoryRange;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue