From nobody Sun Feb 8 13:45:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524524674082719.2348433233092; Mon, 23 Apr 2018 16:04:34 -0700 (PDT) Received: from localhost ([::1]:55786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAkVU-0004R0-It for importer@patchew.org; Mon, 23 Apr 2018 19:04:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAkUB-0003vo-N9 for qemu-devel@nongnu.org; Mon, 23 Apr 2018 19:03:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAkU8-0007Pn-Fj for qemu-devel@nongnu.org; Mon, 23 Apr 2018 19:03:03 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58964 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fAkU8-0007Pf-C4 for qemu-devel@nongnu.org; Mon, 23 Apr 2018 19:03:00 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 166CE8DC55; Mon, 23 Apr 2018 23:02:56 +0000 (UTC) Received: from redhat.com (ovpn-123-116.rdu2.redhat.com [10.10.123.116]) by smtp.corp.redhat.com (Postfix) with SMTP id 965BE7C52; Mon, 23 Apr 2018 23:02:51 +0000 (UTC) Date: Tue, 24 Apr 2018 02:02:51 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1524524398-41342-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 23 Apr 2018 23:02:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 23 Apr 2018 23:02:56 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH] acpi/nvdimm: remove forward name references X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , "Schmauss, Erik" , Xiao Guangrong Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" NVDIMM SSDT table references a name ("MEMA") before it is defined. This is reported to no longer be supported since Linux 4.17-rc1. While arguably Linux needs to keep working on old hypervisors, and other OSes seem fine with our behaviour, it seems cleaner to have the definition appear in the SSDT before use. Suggested-by: "Schmauss, Erik" Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin --- Hi Erik, could you pls test the issue and report whether it addresses your concern? I can't do much to fix past releases which IIUC shipped this code since 2.6.0 about a year ago. Lightly tested with Linux only. hw/acpi/nvdimm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 59d6e42..fadebbd 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -1234,6 +1234,10 @@ static void nvdimm_build_ssdt(GArray *table_offsets,= GArray *table_data, ssdt =3D init_aml_allocator(); acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); =20 + /* Storage for the memory address */ + mem_addr_offset =3D table_data->len + + build_append_named_dword(ssdt->buf, NVDIMM_ACPI_MEM_ADDR); + sb_scope =3D aml_scope("\\_SB"); =20 dev =3D aml_device("NVDR"); @@ -1266,8 +1270,6 @@ static void nvdimm_build_ssdt(GArray *table_offsets, = GArray *table_data, =20 /* copy AML table into ACPI tables blob and patch header there */ g_array_append_vals(table_data, ssdt->buf->data, ssdt->buf->len); - mem_addr_offset =3D build_append_named_dword(table_data, - NVDIMM_ACPI_MEM_ADDR); =20 bios_linker_loader_alloc(linker, NVDIMM_DSM_MEM_FILE, dsm_dma_arrea, --=20 MST