Re: [PATCH 1/3] hw/cxl: factor out cxl_host_addr_to_dpa()

2025-01-21 Thread Jonathan Cameron via
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

[PATCH 1/3] hw/cxl: factor out cxl_host_addr_to_dpa()

2024-12-12 Thread Zhi Wang
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