mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
machine: rename MemoryHotplugState to DeviceMemoryState
Rename it to better match the new terminology. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180423165126.15441-9-david@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
18d11dc910
commit
e017da370b
3 changed files with 9 additions and 10 deletions
|
@ -67,13 +67,13 @@ static inline bool valid_ptex(PowerPCCPU *cpu, target_ulong ptex)
|
||||||
static bool is_ram_address(sPAPRMachineState *spapr, hwaddr addr)
|
static bool is_ram_address(sPAPRMachineState *spapr, hwaddr addr)
|
||||||
{
|
{
|
||||||
MachineState *machine = MACHINE(spapr);
|
MachineState *machine = MACHINE(spapr);
|
||||||
MemoryHotplugState *hpms = machine->device_memory;
|
DeviceMemoryState *dms = machine->device_memory;
|
||||||
|
|
||||||
if (addr < machine->ram_size) {
|
if (addr < machine->ram_size) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ((addr >= hpms->base)
|
if ((addr >= dms->base)
|
||||||
&& ((addr - hpms->base) < memory_region_size(&hpms->mr))) {
|
&& ((addr - dms->base) < memory_region_size(&dms->mr))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,9 +122,8 @@ static void rtas_ibm_query_pe_dma_window(PowerPCCPU *cpu,
|
||||||
if (machine->ram_size == machine->maxram_size) {
|
if (machine->ram_size == machine->maxram_size) {
|
||||||
max_window_size = machine->ram_size;
|
max_window_size = machine->ram_size;
|
||||||
} else {
|
} else {
|
||||||
MemoryHotplugState *hpms = machine->device_memory;
|
max_window_size = machine->device_memory->base +
|
||||||
|
memory_region_size(&machine->device_memory->mr);
|
||||||
max_window_size = hpms->base + memory_region_size(&hpms->mr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
avail = SPAPR_PCI_DMA_MAX_WINDOWS - spapr_phb_get_active_win_num(sphb);
|
avail = SPAPR_PCI_DMA_MAX_WINDOWS - spapr_phb_get_active_win_num(sphb);
|
||||||
|
|
|
@ -214,15 +214,15 @@ struct MachineClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MemoryHotplugState:
|
* DeviceMemoryState:
|
||||||
* @base: address in guest physical address space where the memory
|
* @base: address in guest physical address space where the memory
|
||||||
* address space for memory devices starts
|
* address space for memory devices starts
|
||||||
* @mr: address space container for memory devices
|
* @mr: address space container for memory devices
|
||||||
*/
|
*/
|
||||||
typedef struct MemoryHotplugState {
|
typedef struct DeviceMemoryState {
|
||||||
hwaddr base;
|
hwaddr base;
|
||||||
MemoryRegion mr;
|
MemoryRegion mr;
|
||||||
} MemoryHotplugState;
|
} DeviceMemoryState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MachineState:
|
* MachineState:
|
||||||
|
@ -254,7 +254,7 @@ struct MachineState {
|
||||||
bool enforce_config_section;
|
bool enforce_config_section;
|
||||||
bool enable_graphics;
|
bool enable_graphics;
|
||||||
char *memory_encryption;
|
char *memory_encryption;
|
||||||
MemoryHotplugState *device_memory;
|
DeviceMemoryState *device_memory;
|
||||||
|
|
||||||
ram_addr_t ram_size;
|
ram_addr_t ram_size;
|
||||||
ram_addr_t maxram_size;
|
ram_addr_t maxram_size;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue