mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/cxl: Make the CXL fixed memory window setup a machine parameter.
Paolo Bonzini requested this change to simplify the ongoing effort to allow machine setup entirely via RPC. Includes shortening the command line form cxl-fixed-memory-window to cxl-fmw as the command lines are extremely long even with this change. The json change is needed to ensure that there is a CXLFixedMemoryWindowOptionsList even though the actual element in the json is never used. Similar to existing SgxEpcProperties. Update qemu-options.hx to reflect that this is now a -machine parameter. The bulk of -M / -machine parameters are documented under machine, so use that in preference to M. Update cxl-test and bios-tables-test to reflect new parameters. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Message-Id: <20220608145440.26106-2-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
92344e76b8
commit
03b39fcf64
14 changed files with 150 additions and 126 deletions
|
@ -629,20 +629,6 @@ static void machine_set_nvdimm_persistence(Object *obj, const char *value,
|
|||
nvdimms_state->persistence_string = g_strdup(value);
|
||||
}
|
||||
|
||||
static bool machine_get_cxl(Object *obj, Error **errp)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
|
||||
return ms->cxl_devices_state->is_enabled;
|
||||
}
|
||||
|
||||
static void machine_set_cxl(Object *obj, bool value, Error **errp)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
|
||||
ms->cxl_devices_state->is_enabled = value;
|
||||
}
|
||||
|
||||
void machine_class_allow_dynamic_sysbus_dev(MachineClass *mc, const char *type)
|
||||
{
|
||||
QAPI_LIST_PREPEND(mc->allowed_dynamic_sysbus_devices, g_strdup(type));
|
||||
|
@ -929,8 +915,6 @@ static void machine_class_init(ObjectClass *oc, void *data)
|
|||
mc->default_ram_size = 128 * MiB;
|
||||
mc->rom_file_has_mr = true;
|
||||
|
||||
/* Few machines support CXL, so default to off */
|
||||
mc->cxl_supported = false;
|
||||
/* numa node memory size aligned on 8MB by default.
|
||||
* On Linux, each node's border has to be 8MB aligned
|
||||
*/
|
||||
|
@ -1092,13 +1076,7 @@ static void machine_initfn(Object *obj)
|
|||
}
|
||||
|
||||
if (mc->cxl_supported) {
|
||||
Object *obj = OBJECT(ms);
|
||||
|
||||
ms->cxl_devices_state = g_new0(CXLState, 1);
|
||||
object_property_add_bool(obj, "cxl", machine_get_cxl, machine_set_cxl);
|
||||
object_property_set_description(obj, "cxl",
|
||||
"Set on/off to enable/disable "
|
||||
"CXL instantiation");
|
||||
}
|
||||
|
||||
if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue