[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 06/12] hw/mem/cxl_type3: Add host backend and address spac
|
From: |
Jonathan Cameron |
|
Subject: |
Re: [PATCH v7 06/12] hw/mem/cxl_type3: Add host backend and address space handling for DC regions |
|
Date: |
Mon, 22 Apr 2024 12:52:17 +0100 |
On Thu, 18 Apr 2024 16:10:57 -0700
nifan.cxl@gmail.com wrote:
> From: Fan Ni <fan.ni@samsung.com>
>
> Add (file/memory backed) host backend for DCD. All the dynamic capacity
> regions will share a single, large enough host backend. Set up address
> space for DC regions to support read/write operations to dynamic capacity
> for DCD.
>
> With the change, the following support is added:
> 1. Add a new property to type3 device "volatile-dc-memdev" to point to host
> memory backend for dynamic capacity. Currently, all DC regions share one
> host backend;
> 2. Add namespace for dynamic capacity for read/write support;
> 3. Create cdat entries for each dynamic capacity region.
>
> Signed-off-by: Fan Ni <fan.ni@samsung.com>
One fixlet needed inline.
I've set range1_size_lo = 0 there for my tree.
> @@ -301,10 +337,16 @@ static void build_dvsecs(CXLType3Dev *ct3d)
> range2_size_lo = (2 << 5) | (2 << 2) | 0x3 |
> (ct3d->hostpmem->size & 0xF0000000);
> }
> - } else {
> + } else if (ct3d->hostpmem) {
> range1_size_hi = ct3d->hostpmem->size >> 32;
> range1_size_lo = (2 << 5) | (2 << 2) | 0x3 |
> (ct3d->hostpmem->size & 0xF0000000);
> + } else {
> + /*
> + * For DCD with no static memory, set memory active, memory class
> bits.
> + * No range is set.
> + */
range1_size_hi is not initialized.
> + range1_size_lo = (2 << 5) | (2 << 2) | 0x3;
> }
>
> dvsec = (uint8_t *)&(CXLDVSECDevice){
- Re: [PATCH v7 01/12] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command, (continued)
- [PATCH v7 07/12] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support, nifan . cxl, 2024/04/18
- [PATCH v7 02/12] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support, nifan . cxl, 2024/04/18
- [PATCH v7 03/12] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices, nifan . cxl, 2024/04/18
- [PATCH v7 06/12] hw/mem/cxl_type3: Add host backend and address space handling for DC regions, nifan . cxl, 2024/04/18
- [PATCH v7 10/12] hw/mem/cxl_type3: Add DPA range validation for accesses to DC regions, nifan . cxl, 2024/04/18
- [PATCH v7 11/12] hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox support, nifan . cxl, 2024/04/18
- [PATCH v7 12/12] hw/mem/cxl_type3: Allow to release extent superset in QMP interface, nifan . cxl, 2024/04/18
- [PATCH v7 08/12] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response, nifan . cxl, 2024/04/18
- [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents, nifan . cxl, 2024/04/18