Jonathan Cameron <jonathan.came...@huawei.com> writes:

> From: Jonathan Cameron <jonathan.came...@huawei.com>
>
> There are going to be some potential overheads to CXL enablement,
> for example the host bridge region reserved in memory maps.
> Add a machine level control so that CXL is disabled by default.
>
> Signed-off-by: Jonathan Cameron <jonathan.came...@huawei.com>
> ---
>  hw/arm/virt.c        |  1 +
>  hw/core/machine.c    | 26 ++++++++++++++++++++++++++
>  hw/i386/microvm.c    |  1 +
>  hw/i386/pc.c         |  1 +
>  hw/ppc/spapr.c       |  1 +
>  include/hw/boards.h  |  2 ++
>  include/hw/cxl/cxl.h |  4 ++++
>  7 files changed, 36 insertions(+)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 2b6cc7aa9e..cbb18dcba6 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -2856,6 +2856,7 @@ static void virt_machine_class_init(ObjectClass *oc, 
> void *data)
>      hc->unplug = virt_machine_device_unplug_cb;
>      mc->nvdimm_supported = true;
>      mc->smp_props.clusters_supported = true;
> +    mc->cxl_supported = false;

You should be able to do this in machine_class_init and then...

<snip>

just turn it on for pc

> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index c8696ac01e..b6800a511a 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1739,6 +1739,7 @@ static void pc_machine_class_init(ObjectClass *oc, void 
> *data)
>      mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
>      mc->nvdimm_supported = true;
>      mc->smp_props.dies_supported = true;
> +    mc->cxl_supported = true;
>      mc->default_ram_id = "pc.ram";
>  
<snip>

Otherwise:

Reviewed-by: Alex Bennée <alex.ben...@linaro.org>

-- 
Alex Bennée

Reply via email to