mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
spapr: Support ibm,dynamic-reconfiguration-memory
Parse ibm,architecture.vec table obtained from the guest and enable memory node configuration via ibm,dynamic-reconfiguration-memory if guest supports it. This is in preparation to support memory hotplug for sPAPR guests. This changes the way memory node configuration is done. Currently all memory nodes are built upfront. But after this patch, only memory@0 node for RMA is built upfront. Guest kernel boots with just that and rest of the memory nodes (via memory@XXX or ibm,dynamic-reconfiguration-memory) are built when guest does ibm,client-architecture-support call. Note: This patch needs a SLOF enhancement which is already part of SLOF binary in QEMU. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
224245bf52
commit
03d196b7c5
4 changed files with 274 additions and 50 deletions
|
@ -581,7 +581,8 @@ struct sPAPREventLogEntry {
|
|||
void spapr_events_init(sPAPRMachineState *sm);
|
||||
void spapr_events_fdt_skel(void *fdt, uint32_t epow_irq);
|
||||
int spapr_h_cas_compose_response(sPAPRMachineState *sm,
|
||||
target_ulong addr, target_ulong size);
|
||||
target_ulong addr, target_ulong size,
|
||||
bool cpu_update, bool memory_update);
|
||||
sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn,
|
||||
uint64_t bus_offset,
|
||||
uint32_t page_shift,
|
||||
|
@ -623,4 +624,16 @@ int spapr_rtc_import_offset(DeviceState *dev, int64_t legacy_offset);
|
|||
/* 1GB alignment for hotplug memory region */
|
||||
#define SPAPR_HOTPLUG_MEM_ALIGN (1ULL << 30)
|
||||
|
||||
/*
|
||||
* Number of 32 bit words in each LMB list entry in ibm,dynamic-memory
|
||||
* property under ibm,dynamic-reconfiguration-memory node.
|
||||
*/
|
||||
#define SPAPR_DR_LMB_LIST_ENTRY_SIZE 6
|
||||
|
||||
/*
|
||||
* This flag value defines the LMB as assigned in ibm,dynamic-memory
|
||||
* property under ibm,dynamic-reconfiguration-memory node.
|
||||
*/
|
||||
#define SPAPR_LMB_FLAGS_ASSIGNED 0x00000008
|
||||
|
||||
#endif /* !defined (__HW_SPAPR_H__) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue