mbox series

[v5,0/3] hw/cxl: Add dummy ACPI QTG DSM

Message ID 20231012125623.21101-1-Jonathan.Cameron@huawei.com
Headers show
Series hw/cxl: Add dummy ACPI QTG DSM | expand

Message

Jonathan Cameron Oct. 12, 2023, 12:56 p.m. UTC
This series wraps Dave Jiang's v4 with tests as per v2.
The kernel code using this is now at v10 and reflects the changes made here.

https://lore.kernel.org/linux-cxl/33155160-b627-4d70-b7f7-0fba162183c7@intel.com/T/#t

The discussions around the QEMU patches resulted in significant fixes
to the kernel code - which is great. Thanks to all involved.

Changes since v4:
- Add updated bios table to reflect the changs made in v3/v4

Based-on: qemu/master a51e5124a6

Key thing to note vs V2 is that this now returns a package of integers
and the example returns a package with two elements in it.
This corresponds to a firmware saying that for any input parameters
the QTGs should be used in order of preference 0 then 1.

As per patch 2 description:

Add a simple _DSM call support for the ACPI0017 device to return fake QTG
ID values of 0 and 1 in all cases. This for _DSM plumbing testing from the OS.

Following edited for readability

Device (CXLM)
{
    Name (_HID, "ACPI0017")  // _HID: Hardware ID
...
    Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
    {
        If ((Arg0 == ToUUID ("f365f9a6-a7de-4071-a66a-b40c0b4f8e52")))
        {
            If ((Arg2 == Zero))
            {
                Return (Buffer (One) { 0x01 })
            }

            If ((Arg2 == One))
            {
                Return (Package (0x02)
                {
                    One,
                    Package (0x02)
                    {
                        Zero,
                        One
                    }
                })
            }
        }
    }


Dave Jiang (1):
  hw/cxl: Add QTG _DSM support for ACPI0017 device

Jonathan Cameron (2):
  tests/acpi: Allow update of DSDT.cxl
  tests/acpi: Update DSDT.cxl with QTG DSM

 include/hw/acpi/cxl.h        |   1 +
 hw/acpi/cxl.c                |  69 +++++++++++++++++++++++++++++++++++
 hw/i386/acpi-build.c         |   1 +
 tests/data/acpi/q35/DSDT.cxl | Bin 9655 -> 9713 bytes
 4 files changed, 71 insertions(+)