From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.21989.1641986205343998371 for ; Wed, 12 Jan 2022 03:16:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Our8z/6V; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 77F3FB81DC0 for ; Wed, 12 Jan 2022 11:16:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FE4CC36AEC for ; Wed, 12 Jan 2022 11:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641986202; bh=XNN27AqOsUNVNAQ+4FTOEY4MBEn+LTZKZAqTerRwU/Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Our8z/6VNkzak+FlYxlXFXuS9nPtl08U9tl1XtDt5mng4RulwZ3nucmWpon0QuBYV mHjzTTiNsRUxz6ipQqyZdkRJKpjWEHQ/uau3LgCJ0Sk6cpd70IwRR18b+AWPwd0X3W w4VcDQmFzEcyowXQq4U8Kga1B9J9sHERNKV6m2sQAnWUtxhwrHug0YCBhAuecmD2QE fw8xXGc8ALSk5uyOfhUDfSSnC82M/3jFS799Qt73rIhKPkFqvBbYx7iOUJhZiff/Fe 9qXgdgNuXZkp2gxowdfchqvD8S7N4i1lX9GmeVxh8dWBOlTOmfsctgfXUdCtoGfTG8 DOqtuSPOnPNgA== Received: by mail-wr1-f46.google.com with SMTP id e9so3597302wra.2 for ; Wed, 12 Jan 2022 03:16:42 -0800 (PST) X-Gm-Message-State: AOAM531bTVDmJuTtmRsGZD3rtZrAAlyraUHccc0z+nZMp1ZnRS7NK+yi BU0bZJMAjxUwfQRyT72QTSDpeB0Z+4Ff5Rqx2Lw= X-Google-Smtp-Source: ABdhPJx2lLH1xJnrbymeTu/Ojk4x9w+f+EohLIbbXaSGHG7SDnRl9wKdjldE+/K+gOKF1p16xSKJcJiQtFb1oCrPRf4= X-Received: by 2002:a05:6000:154c:: with SMTP id 12mr7544123wry.447.1641986200559; Wed, 12 Jan 2022 03:16:40 -0800 (PST) MIME-Version: 1.0 References: <20220111161611.957688-1-Pierre.Gondois@arm.com> In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 12 Jan 2022 12:16:28 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/6] Add ACPI support for Kvmtool To: Pierre Cc: edk2-devel-groups-io , Ard Biesheuvel , Sami Mujawar Content-Type: text/plain; charset="UTF-8" On Wed, 12 Jan 2022 at 11:51, Ard Biesheuvel wrote: > > On Tue, 11 Jan 2022 at 17:16, wrote: > > > > From: Pierre Gondois > > > > 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)