cxl: Check qos_class validity on memdev probe
authorDave Jiang <dave.jiang@intel.com>
Thu, 21 Dec 2023 22:04:23 +0000 (15:04 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 22 Dec 2023 23:46:02 +0000 (15:46 -0800)
commit185c1a489f873cb71520fc089401e02dbf302dcd
tree1e07ba9af3ea8de1ea0cd7981db67f12b4f183fe
parent42834b17cf1f00fa79ff1f02134f9c576a125252
cxl: Check qos_class validity on memdev probe

Add a check to make sure the qos_class for the device will match one of
the root decoders qos_class. If no match is found, then the qos_class for
the device is set to invalid. Also add a check to ensure that the device's
host bridge matches to one of the root decoder's downstream targets.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/170319626313.2212653.9021004640856081917.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/cdat.c