aboutsummaryrefslogtreecommitdiff
path: root/memory.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-11-13 13:05:27 +0200
committerAvi Kivity <avi@redhat.com>2011-11-24 18:32:00 +0200
commit897fa7cff21a98b260a5b3e73eae39273fa60272 (patch)
treed9d13d7bf2e3cc4f98b57c7008efaa680b9e1847 /memory.h
parent5a31cd68bad16103beb6d3d4e65d5c401d8e5ff9 (diff)
memory: add MemoryRegionOps::valid.accepts
MemoryRegionOps::valid tries to declaratively specify which transactions are accepted by the device/bus, however it is not completely generic. Add a callback for special cases. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'memory.h')
-rw-r--r--memory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/memory.h b/memory.h
index 7fb36d16ec..53bf261792 100644
--- a/memory.h
+++ b/memory.h
@@ -71,6 +71,13 @@ struct MemoryRegionOps {
* accesses throw machine checks.
*/
bool unaligned;
+ /*
+ * If present, and returns #false, the transaction is not accepted
+ * by the device (and results in machine dependent behaviour such
+ * as a machine check exception).
+ */
+ bool (*accepts)(void *opaque, target_phys_addr_t addr,
+ unsigned size, bool is_write);
} valid;
/* Internal implementation constraints: */
struct {