[edk2-devel] [PATCH v2 0/6] Add ACPI support for Kvmtool

PierreGondois posted 6 patches 1 week, 6 days ago
Failed in applying to current master (apply log)
ArmVirtPkg/ArmVirt.dsc.inc                    |    5 +-
ArmVirtPkg/ArmVirtKvmTool.dsc                 |   22 +-
ArmVirtPkg/ArmVirtKvmTool.fdf                 |   15 +-
ArmVirtPkg/ArmVirtPkg.ci.yaml                 |    6 +-
.../KvmtoolCfgMgrDxe/AslTables/Dsdt.asl       |   21 +
.../KvmtoolCfgMgrDxe/ConfigurationManager.c   | 1061 +++++++++++++++++
.../KvmtoolCfgMgrDxe/ConfigurationManager.h   |  120 ++
.../ConfigurationManagerDxe.inf               |   54 +
.../Include/ConfigurationManagerObject.h      |    7 +-
9 files changed, 1303 insertions(+), 8 deletions(-)
create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/AslTables/Dsdt.asl
create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c
create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.h
create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf

[edk2-devel] [PATCH v2 0/6] Add ACPI support for Kvmtool

Posted by PierreGondois 1 week, 6 days ago
From: Pierre Gondois <Pierre.Gondois@arm.com>

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3742
V1: https://edk2.groups.io/g/devel/message/76990
V2:
- New patch: "DynamicTablesPkg: Print specifier macro for
  CM_OBJECT_ID" [Laszlo]
- Only add AcpiView for ArmVirtKvmTool instead of all ArmVirt
  platforms. This is done using a 'ACPIVIEW_ENABLE' switch.
  [Laszlo]
- Only generate ACPI tables for AARCH64. [Laszlo]
- Various modifications (error handling, patch organization,
  coding style, etc). [Laszlo]

The changes can be seen at: https://github.com/PierreARM/edk2/tree/1456_Add_ACPI_support_for_Kvmtool_v2

Kvmtool dynamically generates a device tree describing the platform
to boot on. Using the patch-sets listed below, the DynamicTables
framework generates ACPI tables describing a similar platform.

This patch-set:
 - adds a ConfigurationManager and make use of the DynamicTablesPkg
   in for Kvmtool for AARCH64, allowing to generate ACPI tables
 - adds the acpiview command line utility to the ArmVirtPkg
   platform that request if via the ACPIVIEW_ENABLE macro
 - update ArmVirtPkg.ci.yaml to add new words and use the
   DynamicTablesPkg
 - adds a print specifier macro for the CM_OBJECT_ID type

With this patchset, KvmTool on AARCH64 will use ACPI tables instead
of a Device Tree (cf PcdForceNoAcpi Pcd).

Pierre Gondois (2):
  DynamicTablesPkg: Print specifier macro for CM_OBJECT_ID
  ArmVirtPkg: Add cspell exceptions

Sami Mujawar (4):
  ArmVirtPkg/Kvmtool: Add DSDT ACPI table
  ArmVirtPkg/Kvmtool: Add Configuration Manager
  ArmVirtPkg/Kvmtool: Enable ACPI support
  ArmVirtPkg/Kvmtool: Enable Acpiview

 ArmVirtPkg/ArmVirt.dsc.inc                    |    5 +-
 ArmVirtPkg/ArmVirtKvmTool.dsc                 |   22 +-
 ArmVirtPkg/ArmVirtKvmTool.fdf                 |   15 +-
 ArmVirtPkg/ArmVirtPkg.ci.yaml                 |    6 +-
 .../KvmtoolCfgMgrDxe/AslTables/Dsdt.asl       |   21 +
 .../KvmtoolCfgMgrDxe/ConfigurationManager.c   | 1061 +++++++++++++++++
 .../KvmtoolCfgMgrDxe/ConfigurationManager.h   |  120 ++
 .../ConfigurationManagerDxe.inf               |   54 +
 .../Include/ConfigurationManagerObject.h      |    7 +-
 9 files changed, 1303 insertions(+), 8 deletions(-)
 create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/AslTables/Dsdt.asl
 create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c
 create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.h
 create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf

--
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85562): https://edk2.groups.io/g/devel/message/85562
Mute This Topic: https://groups.io/mt/88352397/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v2 0/6] Add ACPI support for Kvmtool

Posted by Ard Biesheuvel 1 week, 5 days ago
On Tue, 11 Jan 2022 at 17:16, <Pierre.Gondois@arm.com> wrote:
>
> From: Pierre Gondois <Pierre.Gondois@arm.com>
>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3742
> V1: https://edk2.groups.io/g/devel/message/76990
> V2:
> - New patch: "DynamicTablesPkg: Print specifier macro for
>   CM_OBJECT_ID" [Laszlo]
> - Only add AcpiView for ArmVirtKvmTool instead of all ArmVirt
>   platforms. This is done using a 'ACPIVIEW_ENABLE' switch.
>   [Laszlo]
> - Only generate ACPI tables for AARCH64. [Laszlo]
> - Various modifications (error handling, patch organization,
>   coding style, etc). [Laszlo]
>
> The changes can be seen at: https://github.com/PierreARM/edk2/tree/1456_Add_ACPI_support_for_Kvmtool_v2
>
> Kvmtool dynamically generates a device tree describing the platform
> to boot on. Using the patch-sets listed below, the DynamicTables
> framework generates ACPI tables describing a similar platform.
>
> This patch-set:
>  - adds a ConfigurationManager and make use of the DynamicTablesPkg
>    in for Kvmtool for AARCH64, allowing to generate ACPI tables
>  - adds the acpiview command line utility to the ArmVirtPkg
>    platform that request if via the ACPIVIEW_ENABLE macro
>  - update ArmVirtPkg.ci.yaml to add new words and use the
>    DynamicTablesPkg
>  - adds a print specifier macro for the CM_OBJECT_ID type
>
> With this patchset, KvmTool on AARCH64 will use ACPI tables instead
> of a Device Tree (cf PcdForceNoAcpi Pcd).
>

How did you test this? Can we boot Linux in ACPI mode with these changes?


> Pierre Gondois (2):
>   DynamicTablesPkg: Print specifier macro for CM_OBJECT_ID
>   ArmVirtPkg: Add cspell exceptions
>
> Sami Mujawar (4):
>   ArmVirtPkg/Kvmtool: Add DSDT ACPI table
>   ArmVirtPkg/Kvmtool: Add Configuration Manager
>   ArmVirtPkg/Kvmtool: Enable ACPI support
>   ArmVirtPkg/Kvmtool: Enable Acpiview
>
>  ArmVirtPkg/ArmVirt.dsc.inc                    |    5 +-
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 |   22 +-
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |   15 +-
>  ArmVirtPkg/ArmVirtPkg.ci.yaml                 |    6 +-
>  .../KvmtoolCfgMgrDxe/AslTables/Dsdt.asl       |   21 +
>  .../KvmtoolCfgMgrDxe/ConfigurationManager.c   | 1061 +++++++++++++++++
>  .../KvmtoolCfgMgrDxe/ConfigurationManager.h   |  120 ++
>  .../ConfigurationManagerDxe.inf               |   54 +
>  .../Include/ConfigurationManagerObject.h      |    7 +-
>  9 files changed, 1303 insertions(+), 8 deletions(-)
>  create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/AslTables/Dsdt.asl
>  create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c
>  create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.h
>  create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
>
> --
> 2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85614): https://edk2.groups.io/g/devel/message/85614
Mute This Topic: https://groups.io/mt/88352397/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v2 0/6] Add ACPI support for Kvmtool

Posted by Ard Biesheuvel 1 week, 5 days ago
On Wed, 12 Jan 2022 at 11:51, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Tue, 11 Jan 2022 at 17:16, <Pierre.Gondois@arm.com> wrote:
> >
> > From: Pierre Gondois <Pierre.Gondois@arm.com>
> >
> > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3742
> > V1: https://edk2.groups.io/g/devel/message/76990
> > V2:
> > - New patch: "DynamicTablesPkg: Print specifier macro for
> >   CM_OBJECT_ID" [Laszlo]
> > - Only add AcpiView for ArmVirtKvmTool instead of all ArmVirt
> >   platforms. This is done using a 'ACPIVIEW_ENABLE' switch.
> >   [Laszlo]
> > - Only generate ACPI tables for AARCH64. [Laszlo]
> > - Various modifications (error handling, patch organization,
> >   coding style, etc). [Laszlo]
> >
> > The changes can be seen at: https://github.com/PierreARM/edk2/tree/1456_Add_ACPI_support_for_Kvmtool_v2
> >
> > Kvmtool dynamically generates a device tree describing the platform
> > to boot on. Using the patch-sets listed below, the DynamicTables
> > framework generates ACPI tables describing a similar platform.
> >
> > This patch-set:
> >  - adds a ConfigurationManager and make use of the DynamicTablesPkg
> >    in for Kvmtool for AARCH64, allowing to generate ACPI tables
> >  - adds the acpiview command line utility to the ArmVirtPkg
> >    platform that request if via the ACPIVIEW_ENABLE macro
> >  - update ArmVirtPkg.ci.yaml to add new words and use the
> >    DynamicTablesPkg
> >  - adds a print specifier macro for the CM_OBJECT_ID type
> >
> > With this patchset, KvmTool on AARCH64 will use ACPI tables instead
> > of a Device Tree (cf PcdForceNoAcpi Pcd).
> >
>
> How did you test this? Can we boot Linux in ACPI mode with these changes?
>

I managed to run this with a recent kvmtool and a recent kernel
(v5.15+), which recognizes DBG2 serial port type 18.

I do see some errors in the log, though:

[    4.590652] No ACPI PMU IRQ for CPUn

(for each CPU)

and

ACPI: IORT: [Firmware Bug]: Root complex missing memory address limit
ACPI: \_SB_.PCI0.LNKA: _CRS 36 not found in _PRS
ACPI: \_SB_.PCI0.LNKA: No IRQ available. Try pci=noacpi or acpi=off

(for each virtio-pci device)


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85615): https://edk2.groups.io/g/devel/message/85615
Mute This Topic: https://groups.io/mt/88352397/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v2 0/6] Add ACPI support for Kvmtool

Posted by PierreGondois 1 week, 5 days ago
Hi Ard,

On 1/12/22 12:16 PM, Ard Biesheuvel wrote:
> On Wed, 12 Jan 2022 at 11:51, Ard Biesheuvel <ardb@kernel.org> wrote:
>> On Tue, 11 Jan 2022 at 17:16, <Pierre.Gondois@arm.com> wrote:
>>> From: Pierre Gondois <Pierre.Gondois@arm.com>
>>>
>>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3742
>>> V1: https://edk2.groups.io/g/devel/message/76990
>>> V2:
>>> - New patch: "DynamicTablesPkg: Print specifier macro for
>>>   CM_OBJECT_ID" [Laszlo]
>>> - Only add AcpiView for ArmVirtKvmTool instead of all ArmVirt
>>>   platforms. This is done using a 'ACPIVIEW_ENABLE' switch.
>>>   [Laszlo]
>>> - Only generate ACPI tables for AARCH64. [Laszlo]
>>> - Various modifications (error handling, patch organization,
>>>   coding style, etc). [Laszlo]
>>>
>>> The changes can be seen at: https://github.com/PierreARM/edk2/tree/1456_Add_ACPI_support_for_Kvmtool_v2
>>>
>>> Kvmtool dynamically generates a device tree describing the platform
>>> to boot on. Using the patch-sets listed below, the DynamicTables
>>> framework generates ACPI tables describing a similar platform.
>>>
>>> This patch-set:
>>>  - adds a ConfigurationManager and make use of the DynamicTablesPkg
>>>    in for Kvmtool for AARCH64, allowing to generate ACPI tables
>>>  - adds the acpiview command line utility to the ArmVirtPkg
>>>    platform that request if via the ACPIVIEW_ENABLE macro
>>>  - update ArmVirtPkg.ci.yaml to add new words and use the
>>>    DynamicTablesPkg
>>>  - adds a print specifier macro for the CM_OBJECT_ID type
>>>
>>> With this patchset, KvmTool on AARCH64 will use ACPI tables instead
>>> of a Device Tree (cf PcdForceNoAcpi Pcd).
>>>
>> How did you test this? Can we boot Linux in ACPI mode with these changes?
>>
> I managed to run this with a recent kvmtool and a recent kernel
> (v5.15+), which recognizes DBG2 serial port type 18.
>
> I do see some errors in the log, though:
>
> [    4.590652] No ACPI PMU IRQ for CPUn
>
> (for each CPU)
>
> and
>
> ACPI: IORT: [Firmware Bug]: Root complex missing memory address limit
> ACPI: \_SB_.PCI0.LNKA: _CRS 36 not found in _PRS
> ACPI: \_SB_.PCI0.LNKA: No IRQ available. Try pci=noacpi or acpi=off
>
> (for each virtio-pci device)

Yes effectively, a recent kernel handling 'ACPI_DBG2_16550_WITH_GAS' is required to boot.

About the error messages, I should have seen them. I will send a v3 handling them.

Regards,

Pierre



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85617): https://edk2.groups.io/g/devel/message/85617
Mute This Topic: https://groups.io/mt/88352397/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-