[PATCH v6 0/3] Fix wrong dpa checking in PPR operation

Li Ming posted 3 patches 2 months, 4 weeks ago
drivers/cxl/core/core.h   | 1 +
drivers/cxl/core/edac.c   | 9 ++++++---
drivers/cxl/core/hdm.c    | 7 +++++++
drivers/cxl/core/memdev.c | 2 +-
drivers/cxl/core/region.c | 6 +++---
5 files changed, 18 insertions(+), 7 deletions(-)
[PATCH v6 0/3] Fix wrong dpa checking in PPR operation
Posted by Li Ming 2 months, 4 weeks ago
In cxl_do_ppr(), there is a checking to check if a DPA is valid, the
implementation of the checking is check if the DPA is 0, if yes,
consider that DPA is valid. the checking is not right, the correct
implementation is checking if the DPA is in the CXL device DPA range, if
yes, it is valid.

The patchset also includes another part implementing a general helper
function cxl_resource_contains_addr() in cxl core so that cxl drivers
can use it for all DPA/HPA/SPA availability checking.

v6:
- Fix reviewed-by tag mistake.

v5:
- Reverse checkings order in cxl_do_ppr(). (Alison)

v4:
- Add cxl_ prefix to resource_contains_addr().	(Andy & Alison)
- Add impact statement to the commit log of Patch #2. (Alison)
- Add review tags.

v3:
- Move resource_contains_addr() from include/linux/ioport.h to
cxl/core/hdm.c. (Andy)

v2:
- Implement a general helper resource_contains_addr() for DPA/HPA
resource. (Alison)

base-commit: d0b3b7b22dfa1f4b515fd3a295b3fd958f9e81af cxl/fixes

Li Ming (3):
  cxl/core: Introduce a new helper cxl_resource_contains_addr()
  cxl/edac: Fix wrong dpa checking for PPR operation
  cxl/core: Using cxl_resource_contains_addr() to check address
    availability

 drivers/cxl/core/core.h   | 1 +
 drivers/cxl/core/edac.c   | 9 ++++++---
 drivers/cxl/core/hdm.c    | 7 +++++++
 drivers/cxl/core/memdev.c | 2 +-
 drivers/cxl/core/region.c | 6 +++---
 5 files changed, 18 insertions(+), 7 deletions(-)

-- 
2.34.1
Re: [PATCH v6 0/3] Fix wrong dpa checking in PPR operation
Posted by Dave Jiang 2 months, 3 weeks ago

On 7/10/25 8:23 PM, Li Ming wrote:
> In cxl_do_ppr(), there is a checking to check if a DPA is valid, the
> implementation of the checking is check if the DPA is 0, if yes,
> consider that DPA is valid. the checking is not right, the correct
> implementation is checking if the DPA is in the CXL device DPA range, if
> yes, it is valid.
> 
> The patchset also includes another part implementing a general helper
> function cxl_resource_contains_addr() in cxl core so that cxl drivers
> can use it for all DPA/HPA/SPA availability checking.

applied to cxl/next
bdf2d9fd3a86 cxl/core: Using cxl_resource_contains_addr() to check address availability
03ff65c02559 cxl/edac: Fix wrong dpa checking for PPR operation
5b6031c832c2 cxl/core: Introduce a new helper cxl_resource_contains_addr()

> 
> v6:
> - Fix reviewed-by tag mistake.
> 
> v5:
> - Reverse checkings order in cxl_do_ppr(). (Alison)
> 
> v4:
> - Add cxl_ prefix to resource_contains_addr().	(Andy & Alison)
> - Add impact statement to the commit log of Patch #2. (Alison)
> - Add review tags.
> 
> v3:
> - Move resource_contains_addr() from include/linux/ioport.h to
> cxl/core/hdm.c. (Andy)
> 
> v2:
> - Implement a general helper resource_contains_addr() for DPA/HPA
> resource. (Alison)
> 
> base-commit: d0b3b7b22dfa1f4b515fd3a295b3fd958f9e81af cxl/fixes
> 
> Li Ming (3):
>   cxl/core: Introduce a new helper cxl_resource_contains_addr()
>   cxl/edac: Fix wrong dpa checking for PPR operation
>   cxl/core: Using cxl_resource_contains_addr() to check address
>     availability
> 
>  drivers/cxl/core/core.h   | 1 +
>  drivers/cxl/core/edac.c   | 9 ++++++---
>  drivers/cxl/core/hdm.c    | 7 +++++++
>  drivers/cxl/core/memdev.c | 2 +-
>  drivers/cxl/core/region.c | 6 +++---
>  5 files changed, 18 insertions(+), 7 deletions(-)
>