On Thu, 25 Nov 2021 18:45:55 +0000 Lorenzo Pieralisi lorenzo.pieralisi@arm.com wrote:
On Thu, Nov 25, 2021 at 03:34:30PM +0000, Jonathan Cameron wrote:
On Thu, 25 Nov 2021 15:19:08 +0000 Jonathan Cameron via Linaro-open-discussions linaro-open-discussions@op-lists.linaro.org wrote:
For sharing with Lorenzo.
I'm holding off on posting the CMA patches until the open question around DOE / auxiliary bus is resolved. Not clear if we'll end up back where we started.
Note that other than the devm_ fix patch I've not tweaked the DOE series for review comments.
Base is cxl/next 53989fad1286e652ea3655ae3367ba698da8d2ff (the tree might have moved again in the meantime)
New machine, so sorry about the messed up threading. I clearly need to tweak my email settings a little. Hopefully you can find them all at least once.
If you need a QEMU tree, https://github.com/hisilicon/qemu/tree/cxl-hacks works though one minor quirk is you need to set the uid for the cxl root port == bus number to avoid issues with ACPI probing.
That shouldn't have any impact on the CMA side of things though.
Let me know if you have any issues,
Pulled the patches, I now have a tree that compiles. I don't need QEmu patches for now - I have an alternative set-up, I will keep you posted, thanks a lot for your massive help.
There is a known interrupt race issue on the DOE that might bite you with real hardware if you see BUSY getting set and cleared before READY also set. It'll cause a bonus interrupt and the handling is wrong. Discussion was in latest set of DOE patches along with suggested fix.
Side note: the virt CPU HP changes made it into ACPI 6.5, we should work on the upstream. IORT changes are also in the works, I will keep you all posted.
Good stuff. We'll look at forward porting the original patch series as a starting point for vcpu work.
Jonathan
Lorenzo
Thanks,
Jonathan
Ira Weiny (1): cxl/cdat: Parse out DSMAS data from CDAT table
Jonathan Cameron (9): PCI: Add vendor ID for the PCI SIG PCI/DOE: Add Data Object Exchange Aux Driver cxl/pci: Add DOE Auxiliary Devices cxl/mem: Add CDAT table reading from DOE lib/asn1_encoder: Add a function to encode many byte integer values. spdm: Introduce a library for DMTF SPDM PCI/CMA: Initial support for Component Measurement and Authentication ECN cxl/pci: Add really basic CMA authentication support. cxl: Fixes for wrong device in devm_ calls.
drivers/cxl/Kconfig | 2 + drivers/cxl/cdat.h | 81 +++ drivers/cxl/core/memdev.c | 157 +++++ drivers/cxl/cxl.h | 10 + drivers/cxl/cxlmem.h | 50 ++ drivers/cxl/pci.c | 231 ++++++- drivers/pci/Kconfig | 19 + drivers/pci/Makefile | 5 + drivers/pci/cma.c | 105 +++ drivers/pci/doe.c | 701 +++++++++++++++++++ include/linux/asn1_encoder.h | 3 + include/linux/pci-cma.h | 19 + include/linux/pci-doe.h | 63 ++ include/linux/pci_ids.h | 1 + include/linux/spdm.h | 104 +++ include/uapi/linux/pci_regs.h | 29 +- lib/Kconfig | 3 + lib/Makefile | 2 + lib/asn1_encoder.c | 54 ++ lib/spdm.c | 1196 +++++++++++++++++++++++++++++++++ 20 files changed, 2833 insertions(+), 2 deletions(-) create mode 100644 drivers/cxl/cdat.h create mode 100644 drivers/pci/cma.c create mode 100644 drivers/pci/doe.c create mode 100644 include/linux/pci-cma.h create mode 100644 include/linux/pci-doe.h create mode 100644 include/linux/spdm.h create mode 100644 lib/spdm.c