qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v10 27/45] hw/cxl/host: Add support for CXL Fixed Memory Wind


From: Paolo Bonzini
Subject: Re: [PATCH v10 27/45] hw/cxl/host: Add support for CXL Fixed Memory Windows.
Date: Sat, 21 May 2022 11:07:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/29/22 16:40, Jonathan Cameron via wrote:
From: Jonathan Cameron <jonathan.cameron@huawei.com>

The concept of these is introduced in [1] in terms of the
description the CEDT ACPI table. The principal is more general.
Unlike once traffic hits the CXL root bridges, the host system
memory address routing is implementation defined and effectively
static once observable by standard / generic system software.
Each CXL Fixed Memory Windows (CFMW) is a region of PA space
which has fixed system dependent routing configured so that
accesses can be routed to the CXL devices below a set of target
root bridges. The accesses may be interleaved across multiple
root bridges.

For QEMU we could have fully specified these regions in terms
of a base PA + size, but as the absolute address does not matter
it is simpler to let individual platforms place the memory regions.

ExampleS:
-cxl-fixed-memory-window targets.0=cxl.0,size=128G
-cxl-fixed-memory-window targets.0=cxl.1,size=128G
-cxl-fixed-memory-window 
targets.0=cxl0,targets.1=cxl.1,size=256G,interleave-granularity=2k

Sorry for the late review, but: no more command line options should
be added to QEMU.  This should be:

-M cxl-fmw.0.targets.0=cxl.0,cxl-fmw.0.size=128G \
-M cxl-fmw.1.targets.0=cxl.1,cxl-fmw.1.size=128G \
-M 
cxl-fmw.2.targets.0=cxl.0,cxl-fmw.2.targets.1=cxl.1,cxl-fmw.2.size=128G,cxl-fmw.2.interleave-granularity=2k

I'm not against adding a shortcut as above, but the implementation should
be entirely in MachineState using a QOM property.

The reason for this is that we're looking into doing machine setup entirely
via RPC, and any extra option is a new command to be implemented.

Would you be able to do the change?  Since you are already using QAPI to
deserialize the option it should not be hard.  I can promise a quick review,
and I can also provide with an example conversion for -boot at
https://lore.kernel.org/r/20220414165300.555321-3-pbonzini@redhat.com/.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]