mbox series

[QEMU,v2,0/6] Support ACPI NVDIMM Label Methods

Message ID 20220530034047.730356-1-robert.hu@linux.intel.com (mailing list archive)
Headers show
Series Support ACPI NVDIMM Label Methods | expand

Message

Robert Hoo May 30, 2022, 3:40 a.m. UTC
(v1 Subject was "acpi/nvdimm: support NVDIMM _LS{I,R,W} methods")

Originally NVDIMM Label methods was defined in Intel PMEM _DSM Interface
Spec [1], of function index 4, 5 and 6.
Recent ACPI spec [2] has deprecated those _DSM methods with ACPI NVDIMM
Label Methods _LS{I,R,W}. The essence of these functions has no changes.

This patch set is to update QEMU emulation on this, as well as update
bios-table-test binaries, and substitute trace events for nvdimm_debug().

Patch 1 and 5, the opening and closing parenthesis patches for changes
affecting ACPI tables. Details see tests/qtest/bios-tables-test.c.
Patch 2, a trivial fix on aml_or()/aml_and() usage.
Patch 3, allow NVDIMM _DSM revision 2 to get in.
Patch 4, main body, which implements the virtual _LS{I,R,W} methods and
also generalize QEMU <--> ACPI NVDIMM method interface, which paves the way
for future necessary methods implementation, not only _DSM. The result
SSDT table changes in ASL can be found in Patch 5's commit message.
Patch 6, define trace events for acpi/nvdimm, replace nvdimm_debug()

Test
Tested Linux guest of recent Kernel 5.18.0-rc4, create/destroy
namespace, init labels, etc. works as before.
Tested Windows 10 (1607) guest, and Windows server 2019, but seems vNVDIMM
in Windows guest hasn't ever been supported. Before and after this patch
set, no difference on guest boot up and other functions.

[1] Intel PMEM _DSM Interface Spec v2.0, 3.10 Deprecated Functions
https://pmem.io/documents/IntelOptanePMem_DSM_Interface-V2.0.pdf
[2] ACPI Spec v6.4, 6.5.10 NVDIMM Label Methods
https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf

---
Change Log:
v2:
Almost rewritten
Separate Patch 2
Dance with tests/qtest/bios-table-tests
Add trace events

Robert Hoo (6):
  tests/acpi: allow SSDT changes
  acpi/ssdt: Fix aml_or() and aml_and() in if clause
  acpi/nvdimm: NVDIMM _DSM Spec supports revision 2
  nvdimm: Implement ACPI NVDIMM Label Methods
  test/acpi/bios-tables-test: SSDT: update standard AML binaries
  acpi/nvdimm: Define trace events for NVDIMM and substitute
    nvdimm_debug()

 hw/acpi/nvdimm.c                 | 434 +++++++++++++++++++++++--------
 hw/acpi/trace-events             |  14 +
 include/hw/mem/nvdimm.h          |  12 +-
 tests/data/acpi/pc/SSDT.dimmpxm  | Bin 734 -> 1829 bytes
 tests/data/acpi/q35/SSDT.dimmpxm | Bin 734 -> 1829 bytes
 5 files changed, 344 insertions(+), 116 deletions(-)


base-commit: 58b53669e87fed0d70903e05cd42079fbbdbc195

Comments

Robert Hoo June 6, 2022, 6:26 a.m. UTC | #1
Ping...

Best Regards,
Robert Hoo

> -----Original Message-----
> From: Robert Hoo <robert.hu@linux.intel.com>
> Sent: Monday, May 30, 2022 11:41
> To: imammedo@redhat.com; mst@redhat.com;
> xiaoguangrong.eric@gmail.com; ani@anisinha.ca; Williams, Dan J
> <dan.j.williams@intel.com>; Liu, Jingqi <jingqi.liu@intel.com>
> Cc: qemu-devel@nongnu.org; Hu, Robert <robert.hu@intel.com>
> Subject: [QEMU PATCH v2 0/6] Support ACPI NVDIMM Label Methods
> 
> (v1 Subject was "acpi/nvdimm: support NVDIMM _LS{I,R,W} methods")
> 
> Originally NVDIMM Label methods was defined in Intel PMEM _DSM Interface
> Spec [1], of function index 4, 5 and 6.
> Recent ACPI spec [2] has deprecated those _DSM methods with ACPI NVDIMM
> Label Methods _LS{I,R,W}. The essence of these functions has no changes.
> 
> This patch set is to update QEMU emulation on this, as well as update bios-
> table-test binaries, and substitute trace events for nvdimm_debug().
> 
> Patch 1 and 5, the opening and closing parenthesis patches for changes
> affecting ACPI tables. Details see tests/qtest/bios-tables-test.c.
> Patch 2, a trivial fix on aml_or()/aml_and() usage.
> Patch 3, allow NVDIMM _DSM revision 2 to get in.
> Patch 4, main body, which implements the virtual _LS{I,R,W} methods and also
> generalize QEMU <--> ACPI NVDIMM method interface, which paves the way
> for future necessary methods implementation, not only _DSM. The result SSDT
> table changes in ASL can be found in Patch 5's commit message.
> Patch 6, define trace events for acpi/nvdimm, replace nvdimm_debug()
> 
> Test
> Tested Linux guest of recent Kernel 5.18.0-rc4, create/destroy namespace, init
> labels, etc. works as before.
> Tested Windows 10 (1607) guest, and Windows server 2019, but seems
> vNVDIMM in Windows guest hasn't ever been supported. Before and after this
> patch set, no difference on guest boot up and other functions.
> 
> [1] Intel PMEM _DSM Interface Spec v2.0, 3.10 Deprecated Functions
> https://pmem.io/documents/IntelOptanePMem_DSM_Interface-V2.0.pdf
> [2] ACPI Spec v6.4, 6.5.10 NVDIMM Label Methods
> https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf
> 
> ---
> Change Log:
> v2:
> Almost rewritten
> Separate Patch 2
> Dance with tests/qtest/bios-table-tests
> Add trace events
> 
> Robert Hoo (6):
>   tests/acpi: allow SSDT changes
>   acpi/ssdt: Fix aml_or() and aml_and() in if clause
>   acpi/nvdimm: NVDIMM _DSM Spec supports revision 2
>   nvdimm: Implement ACPI NVDIMM Label Methods
>   test/acpi/bios-tables-test: SSDT: update standard AML binaries
>   acpi/nvdimm: Define trace events for NVDIMM and substitute
>     nvdimm_debug()
> 
>  hw/acpi/nvdimm.c                 | 434 +++++++++++++++++++++++--------
>  hw/acpi/trace-events             |  14 +
>  include/hw/mem/nvdimm.h          |  12 +-
>  tests/data/acpi/pc/SSDT.dimmpxm  | Bin 734 -> 1829 bytes
> tests/data/acpi/q35/SSDT.dimmpxm | Bin 734 -> 1829 bytes
>  5 files changed, 344 insertions(+), 116 deletions(-)
> 
> 
> base-commit: 58b53669e87fed0d70903e05cd42079fbbdbc195
> --
> 2.31.1