aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-03-08 04:53:36 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-03-08 04:53:37 +0000
commit97556fe80e4f7252300b3498b3477fb4295153a3 (patch)
tree7e49b80e86e59e38d353a8a2f39857780f0fddbe /include
parent1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f (diff)
parent4792b7e9d5254daa383cb38d60d79c2b000ca9fc (diff)
downloadqemu-97556fe80e4f7252300b3498b3477fb4295153a3.zip
qemu-97556fe80e4f7252300b3498b3477fb4295153a3.tar.gz
qemu-97556fe80e4f7252300b3498b3477fb4295153a3.tar.bz2
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* RAMBlock vs. MemoryRegion cleanups from Fam * mru_section optimization from Fam * memory.txt improvements from Peter and Xiaoqiang * i8257 fix from Hervé * -daemonize fix * Cleanups and small fixes from Alex, Praneith, Wei # gpg: Signature made Mon 07 Mar 2016 17:08:59 GMT using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" * remotes/bonzini/tags/for-upstream: scsi-bus: Remove tape command from scsi_req_xfer kvm/irqchip: use bitmap utility for gsi tracking MAINTAINERS: Add entry for include/sysemu/kvm*.h doc/memory.txt: correct description of MemoryRegionOps fields doc/memory.txt: correct a logic error icount: possible options for sleep are on or off exec: Introduce AddressSpaceDispatch.mru_section exec: Factor out section_covers_addr exec: Pass RAMBlock pointer to qemu_ram_free memory: Drop MemoryRegion.ram_addr memory: Implement memory_region_get_ram_addr with mr->ram_block memory: Move assignment to ram_block to memory_region_init_* exec: Return RAMBlock pointer from allocating functions i8257: fix Terminal Count status log: do not log if QEMU is daemonized but without -D Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/exec/memory.h9
-rw-r--r--include/exec/ram_addr.h24
2 files changed, 13 insertions, 20 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index d5284c2..2de7898 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -169,7 +169,6 @@ struct MemoryRegion {
bool flush_coalesced_mmio;
bool global_locking;
uint8_t dirty_log_mask;
- ram_addr_t ram_addr;
RAMBlock *ram_block;
Object *owner;
const MemoryRegionIOMMUOps *iommu_ops;
@@ -978,14 +977,8 @@ void memory_region_add_subregion_overlap(MemoryRegion *mr,
/**
* memory_region_get_ram_addr: Get the ram address associated with a memory
* region
- *
- * DO NOT USE THIS FUNCTION. This is a temporary workaround while the Xen
- * code is being reworked.
*/
-static inline ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr)
-{
- return mr->ram_addr;
-}
+ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr);
uint64_t memory_region_get_alignment(const MemoryRegion *mr);
/**
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 5d33def..5adf7a4 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -94,21 +94,21 @@ ram_addr_t last_ram_offset(void);
void qemu_mutex_lock_ramlist(void);
void qemu_mutex_unlock_ramlist(void);
-ram_addr_t qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr,
- bool share, const char *mem_path,
- Error **errp);
-ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
- MemoryRegion *mr, Error **errp);
-ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr, Error **errp);
-ram_addr_t qemu_ram_alloc_resizeable(ram_addr_t size, ram_addr_t max_size,
- void (*resized)(const char*,
- uint64_t length,
- void *host),
- MemoryRegion *mr, Error **errp);
+RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr,
+ bool share, const char *mem_path,
+ Error **errp);
+RAMBlock *qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
+ MemoryRegion *mr, Error **errp);
+RAMBlock *qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr, Error **errp);
+RAMBlock *qemu_ram_alloc_resizeable(ram_addr_t size, ram_addr_t max_size,
+ void (*resized)(const char*,
+ uint64_t length,
+ void *host),
+ MemoryRegion *mr, Error **errp);
int qemu_get_ram_fd(ram_addr_t addr);
void qemu_set_ram_fd(ram_addr_t addr, int fd);
void *qemu_get_ram_block_host_ptr(ram_addr_t addr);
-void qemu_ram_free(ram_addr_t addr);
+void qemu_ram_free(RAMBlock *block);
int qemu_ram_resize(ram_addr_t base, ram_addr_t newsize, Error **errp);