Hi Zhi,
> index 945ee6ffd0..abb2e874b2 100644
> --- a/include/hw/cxl/cxl_component.h
> +++ b/include/hw/cxl/cxl_component.h
> @@ -268,6 +268,9 @@ uint8_t cxl_interleave_ways_enc(int iw, Error **errp);
> int cxl_interleave_ways_dec(uint8_t iw_enc, Error **errp);
> uint8_t cxl_interleave_granula
The emulated CXL type-3 device needs to translate the host_addr to the DPA
when a guest accessing a CXL region. It is implemented in cxl_type3_dpa().
However, other type of CXL devices requires the same routine. E.g. an
emulated CXL type-2 device.
Factor out the routine from the emulated CXL type