Comments for CXL.cache transaction layer specification--clarifications needed (3)

The version we are using: CXL 3.0 spec

Relevant sections in spec:

Table of Contents

Suggestion 1

Section 3.2.4.2.13 describes the functionality of the CLFlush request:

3.2.4.2.13 CLFlush

This is a request to the Host to invalidate the cacheline specified in the address field. The typical response is GO-I which is sent from the Host upon completion in memory. However, the Host may keep tracking the cacheline in Shared state if the Core has issued a Monitor to an address belonging in the cacheline. Thus, the Device that exposes an HDM-D region must not rely on CLFlush/GO-I as a sufficient condition for which to flip a cacheline in the HDM-D region from Host to Device Bias mode. Instead, the Device must initiate RdOwnNoData and receive an H2D Response of GO-E before it updates its Bias Table to Device Bias mode to allow subsequent cacheline access without notifying the Host. Under error conditions, a CLFlush request may receive the line in the Error (GO-Err) state. The device is responsible for handling the error appropriately.
This block of text does not explicitly mention whether dirty cacheline data is written back to the host or not. It seems that the only effect of a CLFlush is an invalidation to the cacheline. The transaction diagram of Read0 requests also indicate this:
Read0 (CLFlush) Transaction Diagram
The problem is if the cacheline has been modified and the data has not been returned, then incoherence arises. Is the data sent together with the CLFlush request, and therefore no Data message needs to be sent separately?

9.8.2 Device Responsibilities

If a device supports GPF,...

Upon receiving a GPF Phase 1 request message, a CXL device shall execute the following steps in the specified order:

...

3. If CXL.cache capable and Payload[1]=1, write back all modified lines in the device cache. The memory destination may be local or remote.

...

The device must write back all dirty lines that are not mapped to its local HDM and may be of persistent type. Each such dirty line must be written back to the destination HDM in two steps:

This section indicates that a CLFlush with dirty data requires a DirtyEvict beforehand. Under what circumstances can a device with modified data send a CLFlush without a DirtyEvict? What sort of memory region should this be for the device to not write data back? Presumably when the memory is native to that device?

Tentative suggestion

One potential change to the section 3.2.4.2.13 might be adding the text in boldface:

3.2.4.2.13 CLFlush

This is a request to the Host to invalidate the cacheline specified in the address field. The typical response is GO-I which is sent from the Host upon completion... handling the error appropriately. If the cacheline contains dirty data, then it must send a DirtyEvict before this CLFlush unless the memory is native to the device and in Device bias.