[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 21/31] hw/cxl/device: Add a memory device (8.2.8.5)
From: |
Ben Widawsky |
Subject: |
Re: [RFC PATCH v3 21/31] hw/cxl/device: Add a memory device (8.2.8.5) |
Date: |
Tue, 2 Feb 2021 07:06:16 -0800 |
On 21-02-02 08:26:14, Eric Blake wrote:
> On 2/1/21 6:59 PM, Ben Widawsky wrote:
> > A CXL memory device (AKA Type 3) is a CXL component that contains some
> > combination of volatile and persistent memory. It also implements the
> > previously defined mailbox interface as well as the memory device
> > firmware interface.
> >
> > Although the memory device is configured like a normal PCIe device, the
> > memory traffic is on an entirely separate bus conceptually (using the
> > same physical wires as PCIe, but different protocol).
> >
> > The guest physical address for the memory device is part of a larger
> > window which is owned by the platform. Currently, this is hardcoded as
> > an object property on host bridge (PXB) creation, but that will need to
> > change for interleaving.
> >
> > The following example will create a 256M device in a 512M window:
> > -object "memory-backend-file,id=cxl-mem1,share,mem-path=cxl-type3,size=512M"
> > -device "cxl-type3,bus=rp0,memdev=cxl-mem1,id=cxl-pmem0,size=256M"
> >
> > Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
> > ---
>
> > +++ b/qapi/machine.json
> > @@ -1394,6 +1394,7 @@
> > { 'union': 'MemoryDeviceInfo',
> > 'data': { 'dimm': 'PCDIMMDeviceInfo',
> > 'nvdimm': 'PCDIMMDeviceInfo',
> > + 'cxl': 'PCDIMMDeviceInfo',
> > 'virtio-pmem': 'VirtioPMEMDeviceInfo',
> > 'virtio-mem': 'VirtioMEMDeviceInfo'
> > }
>
> Missing documentation that 'cxl' was introduced in 6.0. Also, is it
> worth keeping the branches of this union in lexicographic order?
>
Sure.
As discussed on the list previously, I think more thought needs to be put in
here, and I could really use some input.
A CXL type3 memory device can have both persistent and volatile capacity. As
such a single PCDIMMDeviceInfo I believe is insufficient. The current code
supports persistent memory only, so this is fine for now.
I'd guess my best bet is to create a new CXLType3DeviceInfo, but I'm not
entirely sure of all the implications that has.
Any advice?
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3226
> Virtualization: qemu.org | libvirt.org
>
>
- Re: [RFC PATCH v3 17/31] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142), (continued)
- Re: [RFC PATCH v3 17/31] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142), Jonathan Cameron, 2021/02/02
- Re: [RFC PATCH v3 17/31] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142), Ben Widawsky, 2021/02/02
- Re: [RFC PATCH v3 17/31] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142), Jonathan Cameron, 2021/02/02
- Re: [RFC PATCH v3 17/31] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142), Ben Widawsky, 2021/02/02
- Re: [RFC PATCH v3 17/31] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142), Jonathan Cameron, 2021/02/02
[RFC PATCH v3 18/31] acpi/pxb/cxl: Reserve host bridge MMIO, Ben Widawsky, 2021/02/01
[RFC PATCH v3 19/31] hw/pxb/cxl: Add "windows" for host bridges, Ben Widawsky, 2021/02/01
[RFC PATCH v3 20/31] hw/cxl/rp: Add a root port, Ben Widawsky, 2021/02/01
[RFC PATCH v3 21/31] hw/cxl/device: Add a memory device (8.2.8.5), Ben Widawsky, 2021/02/01
[RFC PATCH v3 22/31] hw/cxl/device: Implement MMIO HDM decoding (8.2.5.12), Ben Widawsky, 2021/02/01
[RFC PATCH v3 23/31] acpi/cxl: Add _OSC implementation (9.14.2), Ben Widawsky, 2021/02/01
[RFC PATCH v3 24/31] tests/acpi: allow CEDT table addition, Ben Widawsky, 2021/02/01
[RFC PATCH v3 25/31] acpi/cxl: Create the CEDT (9.14.1), Ben Widawsky, 2021/02/01
[RFC PATCH v3 26/31] tests/acpi: Add new CEDT files, Ben Widawsky, 2021/02/01
[RFC PATCH v3 27/31] hw/cxl/device: Add some trivial commands, Ben Widawsky, 2021/02/01
[RFC PATCH v3 28/31] hw/cxl/device: Plumb real LSA sizing, Ben Widawsky, 2021/02/01
[RFC PATCH v3 29/31] hw/cxl/device: Implement get/set LSA, Ben Widawsky, 2021/02/01
[RFC PATCH v3 31/31] WIP: i386/cxl: Initialize a host bridge, Ben Widawsky, 2021/02/01
[RFC PATCH v3 30/31] qtest/cxl: Add very basic sanity tests, Ben Widawsky, 2021/02/01