cleanup qemu/memory.c
This commit is contained in:
@ -129,9 +129,6 @@ struct MemoryRegionIOMMUOps {
|
||||
IOMMUTLBEntry (*translate)(MemoryRegion *iommu, hwaddr addr, bool is_write);
|
||||
};
|
||||
|
||||
typedef struct CoalescedMemoryRange CoalescedMemoryRange;
|
||||
typedef struct MemoryRegionIoeventfd MemoryRegionIoeventfd;
|
||||
|
||||
struct MemoryRegion {
|
||||
Object parent_obj;
|
||||
/* All fields are private - violators will be prosecuted */
|
||||
@ -153,18 +150,14 @@ struct MemoryRegion {
|
||||
bool enabled;
|
||||
bool rom_device;
|
||||
bool warning_printed; /* For reservations */
|
||||
bool flush_coalesced_mmio;
|
||||
MemoryRegion *alias;
|
||||
hwaddr alias_offset;
|
||||
int32_t priority;
|
||||
bool may_overlap;
|
||||
QTAILQ_HEAD(subregions, MemoryRegion) subregions;
|
||||
QTAILQ_ENTRY(MemoryRegion) subregions_link;
|
||||
QTAILQ_HEAD(coalesced_ranges, CoalescedMemoryRange) coalesced;
|
||||
const char *name;
|
||||
uint8_t dirty_log_mask;
|
||||
unsigned ioeventfd_nb;
|
||||
MemoryRegionIoeventfd *ioeventfds;
|
||||
struct uc_struct *uc;
|
||||
uint32_t perms; //all perms, partially redundant with readonly
|
||||
uint64_t end;
|
||||
@ -187,14 +180,6 @@ struct MemoryListener {
|
||||
void (*log_sync)(MemoryListener *listener, MemoryRegionSection *section);
|
||||
void (*log_global_start)(MemoryListener *listener);
|
||||
void (*log_global_stop)(MemoryListener *listener);
|
||||
void (*eventfd_add)(MemoryListener *listener, MemoryRegionSection *section,
|
||||
bool match_data, uint64_t data, EventNotifier *e);
|
||||
void (*eventfd_del)(MemoryListener *listener, MemoryRegionSection *section,
|
||||
bool match_data, uint64_t data, EventNotifier *e);
|
||||
void (*coalesced_mmio_add)(MemoryListener *listener, MemoryRegionSection *section,
|
||||
hwaddr addr, hwaddr len);
|
||||
void (*coalesced_mmio_del)(MemoryListener *listener, MemoryRegionSection *section,
|
||||
hwaddr addr, hwaddr len);
|
||||
/* Lower = earlier (during add), later (during del) */
|
||||
unsigned priority;
|
||||
AddressSpace *address_space_filter;
|
||||
@ -209,8 +194,6 @@ struct AddressSpace {
|
||||
char *name;
|
||||
MemoryRegion *root;
|
||||
struct FlatView *current_map;
|
||||
int ioeventfd_nb;
|
||||
struct MemoryRegionIoeventfd *ioeventfds;
|
||||
struct AddressSpaceDispatch *dispatch;
|
||||
struct AddressSpaceDispatch *next_dispatch;
|
||||
MemoryListener dispatch_listener;
|
||||
@ -555,60 +538,6 @@ void memory_region_set_readonly(MemoryRegion *mr, bool readonly);
|
||||
*/
|
||||
void memory_region_rom_device_set_romd(MemoryRegion *mr, bool romd_mode);
|
||||
|
||||
/**
|
||||
* memory_region_clear_coalescing: Disable MMIO coalescing for the region.
|
||||
*
|
||||
* Disables any coalescing caused by memory_region_set_coalescing() or
|
||||
* memory_region_add_coalescing(). Roughly equivalent to uncacheble memory
|
||||
* hardware.
|
||||
*
|
||||
* @mr: the memory region to be updated.
|
||||
*/
|
||||
void memory_region_clear_coalescing(MemoryRegion *mr);
|
||||
|
||||
/**
|
||||
* memory_region_add_eventfd: Request an eventfd to be triggered when a word
|
||||
* is written to a location.
|
||||
*
|
||||
* Marks a word in an IO region (initialized with memory_region_init_io())
|
||||
* as a trigger for an eventfd event. The I/O callback will not be called.
|
||||
* The caller must be prepared to handle failure (that is, take the required
|
||||
* action if the callback _is_ called).
|
||||
*
|
||||
* @mr: the memory region being updated.
|
||||
* @addr: the address within @mr that is to be monitored
|
||||
* @size: the size of the access to trigger the eventfd
|
||||
* @match_data: whether to match against @data, instead of just @addr
|
||||
* @data: the data to match against the guest write
|
||||
* @fd: the eventfd to be triggered when @addr, @size, and @data all match.
|
||||
**/
|
||||
void memory_region_add_eventfd(MemoryRegion *mr,
|
||||
hwaddr addr,
|
||||
unsigned size,
|
||||
bool match_data,
|
||||
uint64_t data,
|
||||
EventNotifier *e);
|
||||
|
||||
/**
|
||||
* memory_region_del_eventfd: Cancel an eventfd.
|
||||
*
|
||||
* Cancels an eventfd trigger requested by a previous
|
||||
* memory_region_add_eventfd() call.
|
||||
*
|
||||
* @mr: the memory region being updated.
|
||||
* @addr: the address within @mr that is to be monitored
|
||||
* @size: the size of the access to trigger the eventfd
|
||||
* @match_data: whether to match against @data, instead of just @addr
|
||||
* @data: the data to match against the guest write
|
||||
* @fd: the eventfd to be triggered when @addr, @size, and @data all match.
|
||||
*/
|
||||
void memory_region_del_eventfd(MemoryRegion *mr,
|
||||
hwaddr addr,
|
||||
unsigned size,
|
||||
bool match_data,
|
||||
uint64_t data,
|
||||
EventNotifier *e);
|
||||
|
||||
/**
|
||||
* memory_region_add_subregion: Add a subregion to a container.
|
||||
*
|
||||
|
Reference in New Issue
Block a user