From patchwork Thu Dec 9 17:57:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EFE51C433EF for ; Thu, 9 Dec 2021 17:59:53 +0000 (UTC) Received: from localhost ([::1]:36870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNhw-0002BZ-3m for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 12:59:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgF-0007oW-8a for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:07 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:11656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgD-0002tN-Jj for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:07 -0500 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HnErl012024; Thu, 9 Dec 2021 17:58:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=kw5zRb6fcbfjGiIjU/ZOl679L3q3FAE7+fmlUiHRVQ0=; b=LhIMah6NMECcp6QLO9+LD+MelE8V2nAwet8m5gHNVdMlGnsxilyPxKqiIZXyCKCDdbdR Sq4MK/TuHtWkyhJI4V15DxgcFtoqCi6Vsuj3duZ7X+wbpYHqsrIxEMb0ckVGJ7cMvMtp OLFhSMjbO/9rjpnfjOm/F8S9pIWP0TlZF/mtrhuoQOLr5R5n9yVB30tK++yzOMH8lFFl PJ+YqA+fSpsqOk0nR2SZUsvs8hgPnXkLmHWRAwpRyBoxk47NQ4hDhlH8xwVjQKDnO9rd Lv5Qcf9VCnvCxXKc4S8j3AHLWZDjeQHkcv2um8m1qBnjTwr/8va6SyWutMUBynhqcTpC 0Q== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctrj2v9s8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:03 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HpUWK189753; Thu, 9 Dec 2021 17:58:02 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2106.outbound.protection.outlook.com [104.47.58.106]) by aserp3030.oracle.com with ESMTP id 3csc4whm7r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jyoVxB2aKA0SsLILA5T4GHYJDQDkRllaZ59tuqMEIUZzX0/IV4qGxM9lbLqc/WY+JmpY3db7p2/1GhOs6ikANuma3BTmV9Go94ROm5hXRynXGQItNAWqs9va4e9EzWivs7QdCM3IMLSJGP9Ju35AEA0uY3/HiB/0Eo0vnsTur1UjnCPUQhFns4mfgNBe66T6H4eN8oV9QK5l2JMxm45qSS870avgijAnzrDu9pJdSyJnhSsUu0PMXfRjauVmTg0Avr5+8Wwlw2M6kTjGxqTexz4TN7ys98qZuY0G5PJHMZHEIwPbKu1SmJRHLFO9Xp7LwBfGzkSbUVvKXdk6aQBJMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kw5zRb6fcbfjGiIjU/ZOl679L3q3FAE7+fmlUiHRVQ0=; b=V4YEJ3CJ8XnDupn6fYm6Cs2Agv1eBlX9lQAzmYSHNu1oPimWgMvOWNB5Z0obTpcqna4+QCUZf33Ggl9hh3J54lZw+R7kVRSrXPjAWImEVhHJdkTBQLfpVzLHgBX+H2car/p3Z8c2WH3P5fQQ6Jo2XjEtJb1LNBTXDCk57nrRtdGZTVr1pCTjwErqk6garWjBBMbDLF8PeGysQU0JuB1dfvmhXkAukPMM+HG2xtUCCteZ/kA9YbmDufy3P44vs7Hzcit5zulouKYMLzJBUkbXZEfbZyZqXULFkv+KFd0mauxkqgNRyMzawODzp1B0uvm56T0qmixLlHK+15nbQ18BUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kw5zRb6fcbfjGiIjU/ZOl679L3q3FAE7+fmlUiHRVQ0=; b=kCdNQH0L1IYK3C0hTop/pDJx7vnxW2OzGfiJCEmxy4t9nuAvmoIv30rQA1I0VPxKiL+kJKuDpjjaVT16dMfDjZsXKM+0wrxq+4KhUZ7iEEFCGiBOG1BqrjERYTFruy+S80LJIQzWlMmpOfcfB6gbbEhZSkM0iFN+3fDfycowUEE= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MW4PR10MB5810.namprd10.prod.outlook.com (2603:10b6:303:186::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:01 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:01 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 01/10] ACPI ERST: bios-tables-test.c steps 1 and 2 Date: Thu, 9 Dec 2021 12:57:26 -0500 Message-Id: <1639072655-19271-2-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:57:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8131fdee-1116-452e-e162-08d9bb3d70c7 X-MS-TrafficTypeDiagnostic: MW4PR10MB5810:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oSGml64kKKgXoYUI0oeRzTFcOQVtbTNnfeQupXn9BIxBW1yXjhPhrtU4S2pZs0K2yeq2cZkCJnkLvoJXTewIgP4Xz0Lj+iaag1rOg880RqTGUAMhfyZpG3qoamvpX9gLQmP5AyJwo/lhiUYvmqCEjP5FQ2SQVgrP/Jv9RnUVY5aJjdiyo41qRikhps3qq3ssPcbKd9ccYx0ETbK5N4Y+jWbtmwy1fNBeYiKU6QxKOuKGFiy53w5a45eWCsE7Do2wS2qzfMiNtDtM6wZHr1DuwTv9QYpADOebQdZ/SAE/HPSCAFP2qnSCHfKa8f93YK/XtUAA06UjGMInd8yhBknv9ruhjL9eSJiYaCFyMfM197lXTB1/qNAeSYXGQj3JKJ0mV2/vrwct1vNrSRi730N0worNzscz3F4b7lUD7T1pa7H56xXy52uZF2wzAhGLdpT1Ys76vCzT+CjqSDNiRPSliCz4zpsgja+BQvr3C5izfkXNHN3uY7hklxo+tM0H1lDzc5be8lRU5CJTxxVbYgH9bYhgSbDQuKZU2w7xa5p2Y5gMh83LFrWqmoXN8eLr8zhElSsPmpbbJ1Luhoc/WxLqsvvcETXdJIrZewTWmvhsB8fWkRRQFeA1lVgEJMCAzVDG6u3EB6FyXc8SavwUqwRMqR8gxkmruZqdrai4eYpCh3KOBrIFT8N6zYPFEX5lBZAQe/4jpkviRzd55jfVNaxXDQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(508600001)(6916009)(5660300002)(186003)(66476007)(36756003)(26005)(6666004)(86362001)(52116002)(38350700002)(956004)(38100700002)(2616005)(6486002)(66946007)(107886003)(4326008)(7696005)(66556008)(8676002)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7eCRvzK7qO8A37rbYYoEh+5yF89+cXSw66V0f66OwYwxpiGKmrzRWeBnccImz7I6rw3l1Z1MVqZPq4kgee1VS8jehaMSZHKtymK9/xzg59NmWW/TZrhq8VAm7ZmXqQMd3+oBKUjWAntOaIY6wOCcMl8OfxpFJS56rGUSisKJ+zTdRyMpngKnXlaaibNWvW6KcV2n9tjfJR0me/jAlYWvLrKKXgGh9RCmiuHxsty9yIbjHbuEG2OCrOGQwvsJZsEnrUrVtu8fQRWDDYBFuv1I8/HG40dIA/8q4UPHJ7AaT+IyHN2NOqemAUu0pwIUHI3wIzn1PObKoE8S5S+r3jmXPjVxpuJZxW/3VU9K+qUwwLM/XpLZQXZz6tiU8mJ6uTzRL86vJv2kk3rrRSic8xw8YmQMz15ykMh4UfkSRgHSZFZBVb5AX5gFcrHPwZRdreZCx0jTuIZZFYT6LP9pG0EcZHDAeLwA4ATW6jc8+zfAspqJFkIe3AhqghzCOjaQVgdS26Oafta74zyq9aK3m0cd2h6VAXwknDsPpMzLa4fdzDxd4UYvGF15TO90onGAcEU8nHid4MDMrmy7wyiKSfqqZxjxeYpT6l9zu3UnsPbS8FyNR2Kj0yfQns5wu3fRecmAZx0pH2XGeRXEhIn8EyL+Ad7l5tobKHaVnOz881wiFu5QE0DYvvGnykyQslwSSobvanpoRT6hdnTKtIsAiUMVRZR9UE8+k9AxDPwT+CgDreXwNtz8mjXwfU+T9s3BHS5kwHb7783FnbGXhQU3vDrETLCPu3U2HlkwhGSMAFP4btc+p8Mz7Migiyo/OuP+sj8pv+JQqPxRNW2LN8X6kf8pf12Sj5XD7BkX/M7siKKaN2MNS4Ox6WCJLaIvsG1v4u78wfxUSn7RLKbebbMAU+Vryt+JQ7RXT3Y6K2j1fA5P5C5bPibCx9Nm/1h3VfdAcNGCfdCRky8kK37ALsLvsf5ZiYQKuUf9avEENlgCZ5OsSKy8vr30xDcOo5IVI6z7RuawAlzj6vXEQg/TlmHrioe/CelM6yx7itDmBMpqdRaUTQmYR09qWd/7aqkmDtzgyuaVqt04sCJV3JoDxa/qPMLSqH97IMSCjGb68L9ECsmjfzD541z5QkgfNXdW/J5e8xVwNjH4naqfrhQWWCrNJNWTqwesx9r9lvwdVnnAvpfIr7iWWZYrrQ1icSPK45KlfXkPoUizgb8yKDlsXLy/yizMZNy52MmsaVHv57WidUeWJ6R05YGrKleObjl4L6j71ayTzgnvyJUGmvacWC4b+L+/cJaLp9yU2sBwctu4c6UIkvtYsVIhi6fljxtLL/msBo8FXJ9L7MKzivOV/UZkZnv+cl5MavPvjwn/pV4pswCcChSmZunQb2h+zQ0/MEg13m2fSb9+SoNfokF58BVn+7GLrmYvOVRYt5xDBn7A/fqTAQ9aJexcZTbjqmi4Sjn3pxHblnItGgvohpPydy2vWdPY+WdQ3ipNOeUVZP9MKY7M1v0ADNzBskxAoZJ+4S33e3nUVibLzsDsh5DQwbS7/VbCkqoaTzPSJ0Qjwv6SUam5J0wZdGmco9VjhoNA7agjJNAsgY+cxgDEEyNdcfZmcoUyoweCrhfP9yZdyumf4Znk4mC1JujroJBQOZht4k46c1WbQkA/gNkxNWN8KaURlx0wRg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8131fdee-1116-452e-e162-08d9bb3d70c7 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:01.0900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8Sq05VEwQ+kZqxfi2RmHi/F9vaLfLui94osjvmQ0WPJhoFdGg9XG8/TVWZ8hnslwG5CwhAoOEjt3Kziuz4Bv1PbxBnpQPClmz4mCJUT3CT0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5810 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-ORIG-GUID: g6_6J60j8tTmWVwh0lJoDkkxlm2Up0V9 X-Proofpoint-GUID: g6_6J60j8tTmWVwh0lJoDkkxlm2Up0V9 Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Following the guidelines in tests/qtest/bios-tables-test.c, this change adds empty placeholder files per step 1 for the new ERST table, and excludes resulting changed files in bios-tables-test-allowed-diff.h per step 2. Signed-off-by: Eric DeVolder Acked-by: Igor Mammedov --- tests/data/acpi/microvm/ERST.pcie | 0 tests/data/acpi/pc/DSDT.acpierst | 0 tests/data/acpi/pc/ERST.acpierst | 0 tests/data/acpi/q35/DSDT.acpierst | 0 tests/data/acpi/q35/ERST.acpierst | 0 tests/qtest/bios-tables-test-allowed-diff.h | 5 +++++ 6 files changed, 5 insertions(+) create mode 100644 tests/data/acpi/microvm/ERST.pcie create mode 100644 tests/data/acpi/pc/DSDT.acpierst create mode 100644 tests/data/acpi/pc/ERST.acpierst create mode 100644 tests/data/acpi/q35/DSDT.acpierst create mode 100644 tests/data/acpi/q35/ERST.acpierst diff --git a/tests/data/acpi/microvm/ERST.pcie b/tests/data/acpi/microvm/ERST.pcie new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/pc/DSDT.acpierst b/tests/data/acpi/pc/DSDT.acpierst new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/pc/ERST.acpierst b/tests/data/acpi/pc/ERST.acpierst new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/q35/DSDT.acpierst b/tests/data/acpi/q35/DSDT.acpierst new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/q35/ERST.acpierst b/tests/data/acpi/q35/ERST.acpierst new file mode 100644 index 0000000..e69de29 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523..603db07 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,6 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT.acpierst", +"tests/data/acpi/pc/ERST.acpierst", +"tests/data/acpi/q35/DSDT.acpierst", +"tests/data/acpi/q35/ERST.acpierst", +"tests/data/acpi/microvm/ERST.pcie", From patchwork Thu Dec 9 17:57:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668035 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9E86C433F5 for ; Thu, 9 Dec 2021 18:06:57 +0000 (UTC) Received: from localhost ([::1]:53362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNom-0004pz-Id for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:06:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgM-0007vX-6W for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:15 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:48218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgI-0002to-ME for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:13 -0500 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HnPUt005463; Thu, 9 Dec 2021 17:58:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=Svbr/JUHR+V6nUWPsWs23gY2WC2ULNMpPwKBALdQLwI=; b=0e5Rc7n2hcUWJT3di9e1iBinq/5yJvhOjriHw6oQCWOXl66hyiMxIJSSElyKudL/qGOw WZLDfc9JZlWysRV83eUI8qSyx95oQeanLaZ04Gs3pw9WvBX7ch5eprsePOEBESd2qZUU RVevXTEafqhkcndOpj1DwIPTBso4cSqBsvQJM/bbYtyGN5icmPxatOhfm5xzTdWz/1tf zkEvCLwxtgrHX/Yx0Gq/tbE2h+TABU2iSQA0ngA/MSmxqCZsDLNQsd1OjJeU2G0M5w+t b2u6csgmfxz0c0QKCZerzV4xj+sAHI5jflcSzv8W9nPhETH4ABdX4TjFcBJKSlLIKbJt Gg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctup53sx3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:06 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HpWp9190098; Thu, 9 Dec 2021 17:58:05 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2106.outbound.protection.outlook.com [104.47.58.106]) by aserp3030.oracle.com with ESMTP id 3csc4whm9w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B50TsM6Dg5+5LzxBhiIGXXiye7qEa3CsCwjDvivwJZhsLHmLQGobEebp+jbezzid/APTjn2SKRnipKTICOurvUPsXK+ONbB+teKrMh07i8na3Z7q/cD2LUm1wzsb5UNgPCYRpa8hwEmEvfYqoBrDwdTr/O2dt7EKVJNiac6WGNgeRurD6VxtayqSroI00PY0DwOot3afaw2siYEdGJ+q6lfd0EMJ6UAsn77zv0+lRqimuBmAjXaA7DZ13rZeE35YTibVWsU1Llmo7Tgwh9CwBq6CRez0NyhXPPuqa7vCvdoyXTuzTiiHtYpScvpw7tuUctPG9BYPYvuG4YNT6/pOkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Svbr/JUHR+V6nUWPsWs23gY2WC2ULNMpPwKBALdQLwI=; b=aF0OXjVrJ6XqSfukOqsiRVWbkhWBsHPeDLe5+xZlizbWKSnqntnRNIerIZO8CxVvfkomJqUbyAkhOBy24wodcdHGxgzHlcZy82g+hvUGo7PcEtdjKFrL6mCh7PtTbG+yntpN5J8mhOIPTT3HnQK1dJLDQMFVu5kp3opiPomBgOQBfbSBvO2oTghzHjga3R+5/d5kViMNbpyMqj5Bc4ziHRE9BAkkycNpC3HHbMYBvZvRF/Ou8c9EJyd81uEyS0uHgacLqQ8D5V7ErF0ABENuphk2qErgFHHPitdwzWvXpHHuPNt6LQ7cGiWIgWdkxd+0AfdXjLnFc/MIhXnt0VJqiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Svbr/JUHR+V6nUWPsWs23gY2WC2ULNMpPwKBALdQLwI=; b=fExvqteJQlub8/78rU6SixWm7UHzhIBudg4IwXX0vayFxqQwlZS9D7u7cSGQv5yDAhw39GUz2n4vCxnY6ZDGV4fMpupXR36yAMPU7IRUwDev/p9cIX9AZ7R6TLpVwub8JP0NMMPhvnnFy0TzOGh/T+lXyJvGedsAJCDXl4X1LTU= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MW4PR10MB5810.namprd10.prod.outlook.com (2603:10b6:303:186::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:03 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:03 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 02/10] ACPI ERST: specification for ERST support Date: Thu, 9 Dec 2021 12:57:27 -0500 Message-Id: <1639072655-19271-3-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98dac934-c6aa-4af3-a896-08d9bb3d71ef X-MS-TrafficTypeDiagnostic: MW4PR10MB5810:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9qDE/6Y2ThB9T4d5m4p8EFcuDfqp/YiIbzUxeX8OZmYTay5B+gvlmMAKs/xB5TUuBGycIiI/hF1Vr3k084kEwbwseMIFYZ1lP9oKYmKLAuyULUTgCHkh0QUjRLNqdtw8lS+p5Tn7cj7RgjqNSkQ4KpCiBbBQ/q/JfTIOoGmLHS0gx8TXz0F7U4+WFRh3q573Z+bemBseVN8X55Nouk7JHubC28KYs7k+646Irtlc9ovDc1pIYJlI4ZtylgrBO2gax4u8V5WX7R7G4z1c2K4/U4k7H/Vhu9wQSnt1qP7HjpbMPk7TxcJs8UOOqpLspaLW42kQaxGUqetw8UM/Y5EeqCpt/7cwDCDmJhFYcU9DovGOrciBy4Z6AHP+xBLyv1W8+cxJQGWKrDlv8yX4tBl3SjmiEdept/SQFw9xaXXqfclTYSe9XALB59VO4zxykkKMCFYT+chccaEY1i0emnwlMXaFgyAgB6iQqpKoMuXBdWBOMPq5F9U0oiqlHqK8aM7Z/PPkKNkvJrxeUk/n8tfkAeajWKjL0uR9erVKwo6vzZD8JVgJJuxKWfldGnsoMdyxQcAMDrviENQkn+LqpdlV5OvufSHB5e0bvv35UExCgxI7adiBFnOUtjEXPE3wnYjtlMHkyuXQNXzJPQ3X/gCQ6Y44htToGGJxUZFa6fL0YO6WEelioBitXXAlj8hIbewIvTDmQjY9i8m5GotneyXedQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(45080400002)(316002)(508600001)(6916009)(5660300002)(186003)(66476007)(36756003)(26005)(6666004)(86362001)(52116002)(38350700002)(956004)(83380400001)(38100700002)(2616005)(6486002)(66946007)(107886003)(4326008)(7696005)(66556008)(8676002)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: I06iD459VPN1kjhGzWF0nxWHCaBwjAIbGC/GB6Ai9UZN27nKg1dugdYb0OjM75KE54X1hmsc5+38sZucXgbZd3yK2NN+o0J2si8uDhnpHCn88YXAUdEp7CAtX8OmKx8K0g/jnCpoppR8FJlTTxbMMgXFOqKnqLlVtRXlXCeb7cL5MnrPkUBvk8csoz363ycf56Rvu4r8jtDVRT9ffHmwn3m40tk+zv0cK824joMNl+xTSQwuXtJoATMY3wwyWfRPY0VWe99E72kwbFM3CyhppdVT7lnRtW1gxMbE4sZ33rJZh4LrTyEbcybxAX3JK5+uKu1YA6J+mH9tzPNsnWgyTN8W885cu3nRbN/ldOR0W5ZCnSZpA6dhtfu5mLuv5KHUsQDJcEiyZVVCSLlSx6XDi5aTGUjuehLNuxM/B5A861BcHT78lUi2NuHR8AET/rUuMotAVVC0LOsz53iaiQL81C9kXMp39tqiwwX6aXZPCjQdPc1CG6sSQbt7d4/kuiGJoF4SwgK3VGe1EoBRa8LYO2H0/S40kn5XSTQTCtEOje2l69zbPijzOhLKw+Cqwh6XnnLed9m2c/8KuBjlNNjcILnX+//2B1rbaIorHnKvAwC1seJEvRBbjHR8SSpxyOrGuimjmPgnd2kWvnVSXgu5lG+XBYZzXg/HtBUuksjXd4i6RstX1/H9SaX0sJ6y/eUfZEl8AcvO5lsBLRXTge2P8NtZs7v4tgQxLwToh0ofPzD6ySoP9RHuEDT2VbdLYurKcBwNBt9c4oHxeSDo0WFp1YOrnhaWhHnvlI6RP+0Vq4PInJgTntu2befsr2SxiqXOT9DLFXmycDTthyi6tkOUqZcArdz4urC62uvjogB5WUGazH+5HS4llP40Xfhi1u1inZrT3zzgj1De4q0U+cpGk3LdrS47U+KmZVdyVxfW7u6IayCnm856/W2R4BQls45nq7GVi4Vis4J7eak1cmkPUVM/mS6nliiivp/4vJ9l3hIgrT1znEobOdpw0rYnlbxCMRthCdfGo2BJns2ALb5mUpUlycHb5lEBspCXYvcibhzqmeabQQJ/4h0E8zMuAsttrAWTmGYI5TzWAoNTUz2922veNpLj5Jlx1jqgFXQmaG3bUchUN+RLAqPlkJmnGWSqr8fjF0NBz6PHMbZZUFQAin57Cf3buAhbr3HdxLt/cjpHbinic2cPp03dYRiYMMyq7cZQFQMy7ucuQqioDyjMbmSuelxws06cCtZx0qyD0Eoyp2Ioxlm9T3ncjUIxmL1dP1x7bgSZ2pbFWhI5Ms1vVpQPrviai3JBMpYRFAvwhOkNX7rEuZz//EHyp2OT1Rhrxinu6TAmLnJmXhRP7+srCaJYxPYmy4rPNfxSelcwAKkznCt8kHEgZCxfjv+irTjgaIKL8vd6QT9dM3fFlRqgxPOmVjki/377mD0x2ARLkotowPN//JHxmdbzeTHVhLyjQXQePO5OVqb0eZybQwMWfrTYLNGaoE4ULLjfkPXWHObvReXcGkehgB5w5xsiqoAuTEKQme1PpVTQyltrnEWIQVKiVyJl0GP7jRs8sYxFI6uU0itCJBXfkFomfFVutnNoH5ZMhHAnADYIu+RFkQDyRrRh0Gd+/N3agXWwMTIyUEoECsz2Hf789TG54wRYkJ98d9F6WP65GD1GAVsbVH8GxQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98dac934-c6aa-4af3-a896-08d9bb3d71ef X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:03.0440 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SqdATEuCbsX561QxYsL95WPFM51f8SiLl9PEagEHr0AMDX4TNJHbSm5E+rOXdLUjjsjeDqCuFQiNP41bKWsGqRztH5JfghXf7H43EARuGSw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5810 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=497 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-GUID: 4aEmoYMLVn3qXs1Bf_s8qXdJu8h-Xm9n X-Proofpoint-ORIG-GUID: 4aEmoYMLVn3qXs1Bf_s8qXdJu8h-Xm9n Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Information on the implementation of the ACPI ERST support. Signed-off-by: Eric DeVolder Acked-by: Ani Sinha --- docs/specs/acpi_erst.rst | 200 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 docs/specs/acpi_erst.rst diff --git a/docs/specs/acpi_erst.rst b/docs/specs/acpi_erst.rst new file mode 100644 index 0000000..a8a9d22 --- /dev/null +++ b/docs/specs/acpi_erst.rst @@ -0,0 +1,200 @@ +ACPI ERST DEVICE +================ + +The ACPI ERST device is utilized to support the ACPI Error Record +Serialization Table, ERST, functionality. This feature is designed for +storing error records in persistent storage for future reference +and/or debugging. + +The ACPI specification[1], in Chapter "ACPI Platform Error Interfaces +(APEI)", and specifically subsection "Error Serialization", outlines a +method for storing error records into persistent storage. + +The format of error records is described in the UEFI specification[2], +in Appendix N "Common Platform Error Record". + +While the ACPI specification allows for an NVRAM "mode" (see +GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES) where non-volatile RAM is +directly exposed for direct access by the OS/guest, this device +implements the non-NVRAM "mode". This non-NVRAM "mode" is what is +implemented by most BIOS (since flash memory requires programming +operations in order to update its contents). Furthermore, as of the +time of this writing, Linux only supports the non-NVRAM "mode". + + +Background/Motivation +--------------------- + +Linux uses the persistent storage filesystem, pstore, to record +information (eg. dmesg tail) upon panics and shutdowns. Pstore is +independent of, and runs before, kdump. In certain scenarios (ie. +hosts/guests with root filesystems on NFS/iSCSI where networking +software and/or hardware fails, and thus kdump fails), pstore may +contain information available for post-mortem debugging. + +Two common storage backends for the pstore filesystem are ACPI ERST +and UEFI. Most BIOS implement ACPI ERST. UEFI is not utilized in all +guests. With QEMU supporting ACPI ERST, it becomes a viable pstore +storage backend for virtual machines (as it is now for bare metal +machines). + +Enabling support for ACPI ERST facilitates a consistent method to +capture kernel panic information in a wide range of guests: from +resource-constrained microvms to very large guests, and in particular, +in direct-boot environments (which would lack UEFI run-time services). + +Note that Microsoft Windows also utilizes the ACPI ERST for certain +crash information, if available[3]. + + +Configuration|Usage +------------------- + +To use ACPI ERST, a memory-backend-file object and acpi-erst device +can be created, for example: + + qemu ... + -object memory-backend-file,id=erstnvram,mem-path=acpi-erst.backing,size=0x10000,share=on \ + -device acpi-erst,memdev=erstnvram + +For proper operation, the ACPI ERST device needs a memory-backend-file +object with the following parameters: + + - id: The id of the memory-backend-file object is used to associate + this memory with the acpi-erst device. + - size: The size of the ACPI ERST backing storage. This parameter is + required. + - mem-path: The location of the ACPI ERST backing storage file. This + parameter is also required. + - share: The share=on parameter is required so that updates to the + ERST backing store are written to the file. + +and ERST device: + + - memdev: Is the object id of the memory-backend-file. + - record_size: Specifies the size of the records (or slots) in the + backend storage. Must be a power of two value greater than or + equal to 4096 (PAGE_SIZE). + + +PCI Interface +------------- + +The ERST device is a PCI device with two BARs, one for accessing the +programming registers, and the other for accessing the record exchange +buffer. + +BAR0 contains the programming interface consisting of ACTION and VALUE +64-bit registers. All ERST actions/operations/side effects happen on +the write to the ACTION, by design. Any data needed by the action must +be placed into VALUE prior to writing ACTION. Reading the VALUE +simply returns the register contents, which can be updated by a +previous ACTION. + +BAR1 contains the 8KiB record exchange buffer, which is the +implemented maximum record size. + + +Backend Storage Format +---------------------- + +The backend storage is divided into fixed size "slots", 8KiB in +length, with each slot storing a single record. Not all slots need to +be occupied, and they need not be occupied in a contiguous fashion. +The ability to clear/erase specific records allows for the formation +of unoccupied slots. + +Slot 0 contains a backend storage header that identifies the contents +as ERST and also facilitates efficient access to the records. +Depending upon the size of the backend storage, additional slots will +be designated to be a part of the slot 0 header. For example, at 8KiB, +the slot 0 header can accomodate 1021 records. Thus a storage size +of 8MiB (8KiB * 1024) requires an additional slot for use by the +header. In this scenario, slot 0 and slot 1 form the backend storage +header, and records can be stored starting at slot 2. + +Below is an example layout of the backend storage format (for storage +size less than 8MiB). The size of the storage is a multiple of 8KiB, +and contains N number of slots to store records. The example below +shows two records (in CPER format) in the backend storage, while the +remaining slots are empty/available. + +:: + + Slot Record + <------------------ 8KiB --------------------> + +--------------------------------------------+ + 0 | storage header | + +--------------------------------------------+ + 1 | empty/available | + +--------------------------------------------+ + 2 | CPER | + +--------------------------------------------+ + 3 | CPER | + +--------------------------------------------+ + ... | | + +--------------------------------------------+ + N | empty/available | + +--------------------------------------------+ + +The storage header consists of some basic information and an array +of CPER record_id's to efficiently access records in the backend +storage. + +All fields in the header are stored in little endian format. + +:: + + +--------------------------------------------+ + | magic | 0x0000 + +--------------------------------------------+ + | record_offset | record_size | 0x0008 + +--------------------------------------------+ + | record_count | reserved | version | 0x0010 + +--------------------------------------------+ + | record_id[0] | 0x0018 + +--------------------------------------------+ + | record_id[1] | 0x0020 + +--------------------------------------------+ + | record_id[...] | + +--------------------------------------------+ + | record_id[N] | 0x1FF8 + +--------------------------------------------+ + +The 'magic' field contains the value 0x524F545354535245. + +The 'record_size' field contains the value 0x2000, 8KiB. + +The 'record_offset' field points to the first record_id in the array, +0x0018. + +The 'version' field contains 0x0100, the first version. + +The 'record_count' field contains the number of valid records in the +backend storage. + +The 'record_id' array fields are the 64-bit record identifiers of the +CPER record in the corresponding slot. Stated differently, the +location of a CPER record_id in the record_id[] array provides the +slot index for the corresponding record in the backend storage. + +Note that, for example, with a backend storage less than 8MiB, slot 0 +contains the header, so the record_id[0] will never contain a valid +CPER record_id. Instead slot 1 is the first available slot and thus +record_id_[1] may contain a CPER. + +A 'record_id' of all 0s or all 1s indicates an invalid record (ie. the +slot is available). + + +References +---------- + +[1] "Advanced Configuration and Power Interface Specification", + version 4.0, June 2009. + +[2] "Unified Extensible Firmware Interface Specification", + version 2.1, October 2008. + +[3] "Windows Hardware Error Architecture", specfically + "Error Record Persistence Mechanism". From patchwork Thu Dec 9 17:57:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668027 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A8E5C433EF for ; Thu, 9 Dec 2021 18:03:49 +0000 (UTC) Received: from localhost ([::1]:45532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNlk-00082Y-EY for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:03:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgJ-0007rY-Gf for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:12 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:17312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgH-0002tl-JR for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:11 -0500 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HnC9x007294; Thu, 9 Dec 2021 17:58:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=BsKpnC7kaLxk41JtbrSpabPZ/1RGHWYpBxzYnzfhPiI=; b=gSsIHOQh7YrOLLIJeLnVQUHayEyyIEnh+clsbBA48rR7QQpdGKhD2EFE8kmW0iHPOU51 UrTCMB2XeLFa/GfVM/mAQ+agmrCLxCl/4pX6/cpV83ZXoKhDtDxlQe/aLw79jwa+y3vE Ge3zL5WjlsckQvbb7yHQ94mLYEDPt5aL/Lc0V7J855Wm/eJhLAp+lM+MIY9bssUtUjA+ jm9K6D0Mhf5IVT3KUyhFeV1zxWgubD9D3W9eMaQ0ItVrH3ProzTj723H/YoFw7jreFZu vYyNAicCJ5HIKLe/9i7RN++GMKZMtXInvfQRz/Ka8QLGdn3T/qPwiw8Bif6ufU437gVm aw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctt9muxmj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:07 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HpWpA190098; Thu, 9 Dec 2021 17:58:06 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2106.outbound.protection.outlook.com [104.47.58.106]) by aserp3030.oracle.com with ESMTP id 3csc4whm9w-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RiweL2EiSXiczJTqrghR8qDCTryF9QXYn2lBFMx3bkFSyvD8taAvQS613+QotwXNJnuif11c4P9mDPfOTbQyLWuVGCDFDkk6sbiVTydcibPF8bVpHWNdrZUGjmB2Z876XNhUJ47tko3BLPNH2akAQRFoCcZ84YjpgXLI1KGR3omzC+l1Yx/LgCltah7hfzpUsaSed7sLbUC8vVH7oP4c7NpTn6naR0CiKM9wRRn+ByglEHLWzk3TYwX4WA3uR9Wlb12xBseHOdGnFrlt/0432o64hYGv/M8Wk3cC7V8obDxanOEVCC5b5eA0uOpgK20MnuA0SrdsCs3Sseh/8/8fdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BsKpnC7kaLxk41JtbrSpabPZ/1RGHWYpBxzYnzfhPiI=; b=ZEGPgrcIZbb91Slk/cL7fb+aAhPxTvuG64haqmSlLKStxNe7Wxu4CMwHbJ1hIMqdkdgIO6hat/+prKCD9FxQ+gQb1LBoUkg4aS+R+wunc6mXpkukVq2Lydlhygflszfr+OBmtmc13Qvci/FJsyfVrszjiPB+xGze14STajVMeb+C89DTYrUoRe6zssn0sy1zM9ARC915f9Ey//w+FiYZKMc+APtKIN8wWyaYJjl4zQyTHGXThZJluQca0tQpZlifsZrJMbx87IIs41/ZeW2CyiAax0uyadWkA+6iajGdUCLJ4LF/26AhJiMr4Q60ileR0qna7SDxxCCu83gKUQYTPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BsKpnC7kaLxk41JtbrSpabPZ/1RGHWYpBxzYnzfhPiI=; b=YFsUJj9Av8EJDoM3FYW3wGtBuZwZ6MdCqZkfZ2Qb7/cGBab+SvObyabnnQM1Zr+81ipSFSjEB9fv74fuwpC2m1ugly8q14S5INAHLIZxyXScLUnhI3RGuLkGwxPUD+YPYYqAK0JSkpsWbQX8s/PSJKUE7aG1YGJow+t/GCbSkKg= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MW4PR10MB5810.namprd10.prod.outlook.com (2603:10b6:303:186::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:05 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:05 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 03/10] ACPI ERST: PCI device_id for ERST Date: Thu, 9 Dec 2021 12:57:28 -0500 Message-Id: <1639072655-19271-4-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18b041b7-c4d8-4ae8-16fd-08d9bb3d732f X-MS-TrafficTypeDiagnostic: MW4PR10MB5810:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J1kjDnsz0bHXWEbErwQzvdMMrRtG4VJM6+U4oVIO6NkBuLRVi09pIEWA+rH9f8gElHVaeVzpj10TNGxM3iwv+BNddmHHMrwHciGLQC4LLdS0BDZ5cmNtHAUkVC3lXxlR4c+5RjnOE0H5F90w1NObi8ISvqWcwAftREdiMx+KQsicRytk8HBIa0Z7+RNl6IHI2uDbNz+ex4diL/6NXwJhhoOk6eK8BQuwP/9MXXzLnCuV1Cr7Co5HEm5hMXTqCB9Zt0O1xmKuiGhBvvLRHtfbn2bM1R+/nPfdYbiJAd0dzHHeyncfWjwe8ckPZPSWs7l6JiRSaYXJb1MD7o9U+beWTVtfEYJOf5YuKY6z54a3dLm+/KklB+34bR1a2/AB77NAj2mTUaUbuaZb9SCjkhNwf7TZOCIWu3QVfeYhdtZR8dC97knqYkDAvDHb325piaTs71LaZ6DyVWTQPflqkPy8ZHKYieCtRlw0ko6n0u/gtYNYtozjP6Z4DhidgjTyH1W/nXhZHwxiptOOcTCA8QWEsx+EpVabRLPizn0T6GPEUfzcStcUkSyKdbfblhpKdiwCRyrK5H2MK/BC8/WGJDgaIsAbC6lCsoZtC6mRV7vSHNPI5Dp80IGldf0yAbrNILip1ZHADaZn0JV4iIMiwEOWR8V5/Ce3nwzB5SwN+yQqqAfkXxvyR3xp4MHBi9wKP8EwFF+ZM+cKUv5QebFAq0YV5g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(508600001)(6916009)(5660300002)(186003)(66476007)(36756003)(26005)(6666004)(86362001)(4744005)(52116002)(38350700002)(956004)(38100700002)(2616005)(6486002)(66946007)(107886003)(4326008)(7696005)(66556008)(8676002)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9oUpYj9pf1zGFSduY22ZDIZH0bCBSkAVHkFUgN5Aaf3oS6+emwzX04kzXNa1Efjbj0L8OuoCYsEuXBy3ibFmkj8snDRLoSxm6bphB5hrbH+Qcg1BBPRzVEvYLn6HUNX/FecfmAxBxESGtplD100FFA8XO6feJuiORnJTLFdi1rzVfOT6j73+WiJJdYjMb+mSGZkcsjbIwfk6+DEVLBjUnPgB+8bnuNzQ3pbHl1tdCBiKUd/HS+kwxRzFOmDR5GLaeByUpGqOhAn/RZM2D5RyVNdcTR3jRn0L2gJXz2vtLY4p6voZhgeyH1o1x6Y0uD8tauAnPpACDBSi2lcNnYDdtxZLEwaRoQc9fkylB+yus4oWN+1uw5omVEBKGlQd2341neU3AAk5vw2pVW647IrCQV0EhfR4vrkscJkkO/tggTJSy/MUA+bKS8rZcVcTUK0mpC9pwoIOxTpVGFbthE3yxVDHOLj+T8Mi/u1CM61/B0b6MxjkZ80vDyHc2eoJOD++0K4XXi4YOoE43emp8cWJ/ZQlda2nTEzHRpEf3cFHh8ful07Skd79VdO+axu0AzfO0Apvmx9zEyaxGsRFQxNmRFDcPn5mQOQ1c/A72YZWzOTGF7LF6Uzlal007waq3j7vugvY6G5+pP+L6g/U9dQsA5Uj6kSr4sdI2U4MYVPG9iVau5aMelfTlt3PHLjv+NSZ4YGP5pDr1dQnI8tBbduV3DPdC367ae393MG5gsrbzOruYHx91HT4jvIKYekDwaIt+/jcIGIhCmB5j/s3j/qYG3c2zcFnC1145BpL51ph8uCOqEcEc+K7ZdnTIPTBhcpvCYHhWEHTBKmbTzXEdmq8cjPAhU7H2TjgZt9lEbdap1ANMDzZklf2/QKbsTrAi6oOSuXMQfM++AAMPgsrwY9WmeP04o7HubOF9IyPOF+/O7fXoXhm17mUZBQiPRqoDG5gMFsDHpr0m7gchL/reBkGO0Xlsid6LxcgXiNDcN8A4Apb/oNB7fQ30gQrC7MEsdFl0HXx9fNdEC++XdozO36bdbMjwtXKncMosxt3lJfLHc3LvTBakclIXoEApcp273OlCsHaXjNfLBK7M5YrBgvkk4cBBmktTX1deqxIZWpJg9Ou/Y9HfmFCp2K1b9+q4GIILwdbVm8WbezdFA/EtNrabuMNT6SZLQpshpPNOb42LJLchrj5nXRgag8FeltA6oRoalmG/9SGeRctD/ERLlXRlFZkvHqqerrhADOWWG/5zRKGy+llK1KIdK/jsdoD2WtfmlSFWSuDKDktdlvYQS8YzQO3grGwn8RaeS4zjIeihKElHy4tSgXNFlxek2dNsJ/HQr+bFvRzMAVm3mp94kDCpqBHUK9o1tMJEPLAkgBLhJeoaS7iYT0HlYyJaP5mMZp+d1SPOBbeF3uT1mcFGqyvJE67ywCqzxmpaPayHlqrxCOAm9yYk4bjaT8UJgYWvTxPYt6KtMZTCawgOWUHNXkr4TR4XKRmSowBwpICjahGGKAXbI1gJgZ9vImnbd5XzDAjzAR5RRNAc/3ETM7I0HF8U9QmQv5DDIsJ2yr70nQePFUPVreWrWTjkvQRvyzW4HsHbK0lrtyOiJyd+1HPfuRj1IZKWsOO2mnVk8ElFvEzmLS+ea95T4a9Rh1VGDk8S1zwAblmV8+G/0RMeGVTSSf1Lg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18b041b7-c4d8-4ae8-16fd-08d9bb3d732f X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:05.1375 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qaDNLFvUfktSc53gqjmXHexNvuFCPNHz/S1jjj4YeOLm1VyHH2+rCrmRcaRcf8s1PPuYtUGeVYJCd2fW1Ska8bWHl/Y0h7X3HP4TsrOTHRA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5810 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=935 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-GUID: WWm2C-gEnwciKbS1t9UH4J2c_vYuD2Ks X-Proofpoint-ORIG-GUID: WWm2C-gEnwciKbS1t9UH4J2c_vYuD2Ks Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change reserves the PCI device_id for the new ACPI ERST device. Signed-off-by: Eric DeVolder Acked-by: Igor Mammedov Acked-by: Ani Sinha --- include/hw/pci/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index e7cdf2d..d3734b9 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -108,6 +108,7 @@ extern bool pci_available; #define PCI_DEVICE_ID_REDHAT_MDPY 0x000f #define PCI_DEVICE_ID_REDHAT_NVME 0x0010 #define PCI_DEVICE_ID_REDHAT_PVPANIC 0x0011 +#define PCI_DEVICE_ID_REDHAT_ACPI_ERST 0x0012 #define PCI_DEVICE_ID_REDHAT_QXL 0x0100 #define FMT_PCIBUS PRIx64 From patchwork Thu Dec 9 17:57:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668029 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AAAEAC433EF for ; Thu, 9 Dec 2021 18:03:52 +0000 (UTC) Received: from localhost ([::1]:45776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNln-0008Ck-Jw for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:03:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgL-0007tg-BN for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:13 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:22388) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgJ-0002u0-4h for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:12 -0500 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HnBPZ007290; Thu, 9 Dec 2021 17:58:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=4/tfqFrWnuMBDAgJe9rHCzAWYYO+Rgg9uqlAZfv56E0=; b=Dyw8lTGurFQGClv1LWcyXYs4JVmFVVXJgwWCKqBbbbjwdXEeRsbNcuxWrVXQryp+plu1 6QcHRYiy/b3XJO/J+orWSvRNiRLmDJB0rm67jQQQNBPxQtgKBYJ/CHGlfLW9lXCskaLX 8vMY1Jfh7ysrjELRKh/JyLdyt3KzdhRrw3SCyNu6YRV5TtHow3sSe0TSOeLKRkjskCCG Vjn4jIQaZX3bqds1xWQKRkTmuYGqPtCG1fMIBcpNN6kCK/Z4xPvNa1hE2tzDaptDp+BR uuH7pB6r4Xm5RCe32nbq5GxE/AuCBOTEkIRJXQtwpeHomTj9FP2GG1VG/VzH4WXTkUb2 Mg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctt9muxms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:09 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HqDK6018537; Thu, 9 Dec 2021 17:58:09 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2104.outbound.protection.outlook.com [104.47.58.104]) by aserp3020.oracle.com with ESMTP id 3cr0584xwt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N6myMblFGDDf+QtApkNMJRHs78C95kjaff8zQ7xBO2SDA5+boQAcG5BxXZiabXG/hv0ivkQxY9qmCiXPRT0rWVjlVr/YDM9u/xmGQkjmg6mabUldFMkzz5Z6HgIUQfgMTSWjrpOKZmg9THkZgXLbFdVgikUTRjbfC+RohJe7+j+oNNe18q3ThVxe6QATsDI1+U1gBDKVki252bY4hN3fwSTF5LrjCrrUkFyqOyLdNV6y0ZySSCV4jlGF5D3BQ3JKcdWe/Bpe/s1UES/055BvGVjllfIPkY3KE8I8v9VenuHRaHemyfQ5+X193g07POYNOzcHEo0ydtvyI6099eJk5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4/tfqFrWnuMBDAgJe9rHCzAWYYO+Rgg9uqlAZfv56E0=; b=NsTvMctaB4JKucacOYSz+ke2gHd2RDyQTN9GdfgLCQBAh5ymLKxhasHLZxtLeZqDzozNbqoUdaLt2zITMp+fbcjl8DMHa+Ne7m7lOT7JxOJbkDn46pE+9LUjeG9rnaez4TOUWMXH1Iy40NREE70RPy+SBtEXNCpNFrl3jLWDhYFs7hl9glz75EnsUGTdHAXdtEEeNJg9lvszDXSJJ8h8aVseM2Go4eCtXAt5GWJBxLEYLI3/hc4j7VC1ikPo6d8W1lOdlEfJkd5WIBwhyOR+T+k6hMj1wbxsWf3iruWQchkQyaAKaqOJpCj1BEnA+A6ZeCQKDZddN9MHSXGHnSOR8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4/tfqFrWnuMBDAgJe9rHCzAWYYO+Rgg9uqlAZfv56E0=; b=TnxQgBi76nR8aW2vAj3IYXnakG11zoT0wJsg2SvNNUEUuc/FfA71XTNCNo+z7Qt9c/n0CfX5Q+MCsdND7xvPVU1IQOqz/2lRyCJYdcwLkcTp6m3Ew+UtlNKVZlzspHxhUXCZ7MGT2qDD1iu57yXTxUUukeGWnnWWjxNung1bimc= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MW4PR10MB5810.namprd10.prod.outlook.com (2603:10b6:303:186::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:07 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:07 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 04/10] ACPI ERST: header file for ERST Date: Thu, 9 Dec 2021 12:57:29 -0500 Message-Id: <1639072655-19271-5-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4fea4e73-6046-40ae-700a-08d9bb3d7459 X-MS-TrafficTypeDiagnostic: MW4PR10MB5810:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vMbIoLT/MOcXIhKKQ9eWXy17iG8N/Jm9PF4xoIgx2pGCzLXjKN612fZ6D0RKSbppg2WX1qXAcbalmipEa6l1ApGk7dWBvZ1bjxH4WaALTL7FlkrB3JRZ1VbWeUzdcgChdlG4m87zOVqvi0XCZrcvCtBuAkuRJDTrfYpowcGFUQIIwY91r4qm0yOW949ZPAaR09H30DOdPePdTCDl09Y3tH3os3Vc/G9rWJlxRPCsSd/2AKabkXDt9b/CxZu5Fm3o36fxwtE8S3hq+lNnK/h6C3tOHbZo/+OZ9LOkbuZ4/H54CMzhdk88m0GuLxs6MVwbtximdkrCXMq3MbGbjqXAuqtaSs2mbW8mQvvLXTzcPrUNtK6gX1+D7tley3bf25hFGmARe7C+SzbqhgV+q/67VXw4orYT6VC18XHMp4N94aSJbO/SmurgKIxkXdapVkTbe7AMZkE8pDjhJcSdbj9SaFW4FTodg8T3auPTWlMi0d6AJnDoKxt2g7Vb5IR9qE1g2tw7TGKZ3ukbWBuE6O0Owor4rBaFBMVn2yn7ohF/ncQHqnMcDlPGugq0FCZYKs1bj5o8uPJ3lVbyR5gYHZqYjN3E9IfexKoduBB2roPFS6MZ9cHppSYOF7/FUBezVmMqxo3hhJnd35flbuiQx5fflhnqCPdfDtEWSWu/EBEwhEqOSLQGyHZ0KRTddLsz4Zff94BgU9avSBM6+QBYWQtb8Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(508600001)(6916009)(5660300002)(186003)(66476007)(36756003)(26005)(6666004)(86362001)(4744005)(52116002)(38350700002)(956004)(38100700002)(2616005)(6486002)(66946007)(107886003)(4326008)(7696005)(66556008)(8676002)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: osaqiYkG5qT9egc2oWrnxMHijli5xbeMQIQNwXm7jNDHeEIuiN29X2xT/2t+oCM0rSNZoNq9ii+q7IYaUveWhpP7CaGsJRq2dmXUns0RIxBNCiZfRigKZy947QB7M6Jmayt3/fEtsbURbN8uQKFMn5aqRb/5ta8itwYt3pDjk2RJaHRNEfPUyB3L+FPncXjzuJuZdAzb5MbD2cVduNr4s6yeqkE1adbo9qs2DsseVwV3GyYIhVMO1z3P1u00R0Tp6bzo0H7fhcm1c5mL5F5+JI+zlqdfJ5vc/ExfScU1JfWejuKy2cIQvGRSOMnJapGRNa7en6YxNdMNJ2OFSwKfoFWfdAXImWL83PbfNJ+/r+OPMqIwonUSPq/ti8o4QrLEWYbvtIpk4lQIrFisE3MUPJaP5pqkOB/RutDrUTp/ParzEgPtI0s60Zv7bxTpGetoL1qc9uWiGTbFW5ngzYkp3OOCP6iRtRsZnXArVFblnEwjNGFkoCUUGm1ewvW/cqicprKv/eMoHPWLKycdhU70m0p8X75MscHn2LvXcRyAXSJMAYsyQmvEE9ywJBH5HzPfGNyswp2KDFK63rk+Yf8h8ZYSJKZ1dY3zs9x7aSG5Qv2GU6K4b9AZF+xhTHPyMPukE+Un2Tl5S0f93eql70OHO6fmw6WoghTzm66axFXqPZCr6Op5gAURE5WjC5oliw6kcqfjMcDHNkiC4BeGjCfPUlaDnrTKGwwUvxw6vP+CWV1odnoFsXm/2D/AsuGVhg89QVf3H6EwytBmSnXQR2VDMI9frice82UdniCsh2F1REQyKxc1/xcNldZThjuUflCHO3ixVuoXYy0VEC5KDBd1S93lShIQvwACPX7epCNjcdNu0tKVwJCcF+RsKKZZBDtxyeva5xX51ibAasGeUjadQUjYsurWckBuYWiHT/Ju86pHJUVtoiMhetu8npl1fipqQvzq7knLlkstPEQuRg8y8HpLjbMghRGnisBcPm33gYEOc1gRnxgSDxRxtnBcFosC/Y+D1nojMKx9+1WKIRoiixWh0ho5AZ3FdQmyvyP+t2piw37yru5G6dCcITv3AhLCEhl/DWa643znBACQ6nA9ZjuyDQxsZe1DJUpl3IZNvgQtNEUdu/47eGqFSd9H1Ydr5Ijjkfh7KPFaluEvisoue2M936lXZnX3vDs2f/XpIJ7lGJ+TVHGVZPdyXHwxislRK9tle8WEiop63QhMjexIbpUBJie+8wbvZQNnV1cW4ju8Xdsxv6xzXtUUPDanuQE9rcRatnWkmOxBZuBKtcgjF4G8SYv2Sf7fxQI0mrpm6UAmTfVAT5FsnfOCtDW+Va9qLw4QIDxVCBbRtF3HGTFQMqJaCswQ3OVsxQ9HYQ11cnofAs699NoqKePWTH+ND+aQFH+NZIgYXaGU0hanvh0gVbBAXpWBdngBopyxWce1Xt859M1B4cWhMteCafPD+r4VxkrRBQw4o1wULE9dxNwQCwFkpFchVW9m9huQm1cu0Pvcw81fo3iRNPtkFEY/VoPALZXpIbdVOkoG7HMKvsPA0jALCMaB5FW01MjZm/iyRxS0O8RrAk0vkL3jyppMx3ZqSKLP7XBlryFdUZpf9/ygv53G1suBDj+myeaZAKK6t5Z5J9eOAfEvXR7idq9qyyZjqJEpUC9NSAokbVdqLKTZ0A== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fea4e73-6046-40ae-700a-08d9bb3d7459 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:07.0771 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jAOgGzBhejSLKygjuDO+eEXAUAOp22H0HoHUuH9WF5EczWyFnxUomw/f0JkYbXoXnkYRdT3x5FUgxxxTEbLks0FD4e2XguXuRChrs8LlXqg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5810 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-GUID: wXR76FhOePaCurHUvgXJ9KZ_QCvPS3_z X-Proofpoint-ORIG-GUID: wXR76FhOePaCurHUvgXJ9KZ_QCvPS3_z Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change introduces the public defintions for ACPI ERST. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha --- include/hw/acpi/erst.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/hw/acpi/erst.h diff --git a/include/hw/acpi/erst.h b/include/hw/acpi/erst.h new file mode 100644 index 0000000..9d63717 --- /dev/null +++ b/include/hw/acpi/erst.h @@ -0,0 +1,19 @@ +/* + * ACPI Error Record Serialization Table, ERST, Implementation + * + * ACPI ERST introduced in ACPI 4.0, June 16, 2009. + * ACPI Platform Error Interfaces : Error Serialization + * + * Copyright (c) 2021 Oracle and/or its affiliates. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef HW_ACPI_ERST_H +#define HW_ACPI_ERST_H + +void build_erst(GArray *table_data, BIOSLinker *linker, Object *erst_dev, + const char *oem_id, const char *oem_table_id); + +#define TYPE_ACPI_ERST "acpi-erst" + +#endif From patchwork Thu Dec 9 17:57:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 233CDC433F5 for ; Thu, 9 Dec 2021 18:00:44 +0000 (UTC) Received: from localhost ([::1]:37976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNil-0002vx-8i for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:00:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgQ-00083T-Mx for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:18 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:30330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgN-0002uZ-7T for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:18 -0500 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HnB5k007286; Thu, 9 Dec 2021 17:58:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=mvEyYkqof/pc13IDVRCanmScIwP4wQgN9y6NdHmLizY=; b=ol/qUeLTYAo/7WkE5pmX9oOsmTt5L3rZzSWAjA+f8EYR6lLHiJYhaiTrEin5FDIdheQv a41Nvn87cQzz4gh8bdWeR29ZSzUU7YgPGf1nTqu+4dHO5UPw/Xn65f5O6xeGQMtuI0nn ZK37i5b0FVojC80BYFFAAUaNKzZAxow9HszjRMOqbRySkmb4SI3TTwBDU1M7UCSpXzOs gsuMTAtuuMYVt35e8w5hxLDfmPC40GEtbzfAGgX8UcmlDcffY0xVXcqM9P4TAVr/nwwo tdSDbSaTDUkPUGZz5Nr6E8CicFMJjzU15wBqJpVK6bkBUAhgYvuuLpGbOhp7E3MUfPbW Ig== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctt9muxmv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:13 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HpIh4078905; Thu, 9 Dec 2021 17:58:12 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109]) by userp3030.oracle.com with ESMTP id 3cqwf2j2ed-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZrCiDwhvpPl58oKHcGWRtk7N98IwJU3ociEbsY4z1mntm5VkrH2NLo4TyCZRpgpzBxDyE2pQbUIfyEI2c1SXWTHQ+elFIQLvHk5/IzwpN93EDbTa6Q5K/x5/NeAjm7z3Lojlfbeu51zOkG81jJOMpNd/ePByE07ubLwt/visbNg8Sa0RTb0k8D14UqFgkb14WFbQiRtKsC+N+l7xDlQN9ZxRUTOA6XRpc1bjbSQnkCOLaGnCFYRxpL/yjO7MzHp9yk0NrD0W3hFUZCpCJLejDcN7xz/kzLDVUtq5Kg7o+Hi2hfTOOavnOqYohYnLYjRkxu2B2WgwlXRIklumCHKN4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mvEyYkqof/pc13IDVRCanmScIwP4wQgN9y6NdHmLizY=; b=a3oo9jZEDNzeTroUHibcORthN/gq/UouUFexNa4g4hsH+NVQ/qbkpdGYb3w2MJiskvcmoWxraB+WsI6Ic9LhqlbwDAIaGYRx9TiLsmbaNyQxTRRU3iiLcjvn30oCbFY6vQuigb0U0cjK1GHLhtYCC6NageKoebp5YQYA2YjNketfIXrFV5vlSpHUJgWOhjPznkmLP65hIc4lgN79d0mhqdj+1AqlnfjPwbhLBfCaBC9grSF/Y0zy8K/5sKSc+QkYqv9fHNWlhJw5ULBrXrTrhPwM6ScPgX/rag/USxVwNR1SsZEwVWuJA3QJVeK1qoHvF2Crv6n5QN5irOow9J/0Gg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mvEyYkqof/pc13IDVRCanmScIwP4wQgN9y6NdHmLizY=; b=X5HbRTxHAizXwHdPG/uGDLsk9lGhd3ub0S6yUE2tQwuTk88P6IBQBC/QGj1pxi4TiipvvNRXgsKjX/93iQOKZhZDQr8LiCMTjWMHpO7p1J+sXJMY8Xoev88CwmgNRbUo76QtJULjkJSjDfUhrPRoyKWI6twO+AzI7F1dCD5nhE8= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MW4PR10MB5810.namprd10.prod.outlook.com (2603:10b6:303:186::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:09 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:09 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 05/10] ACPI ERST: support for ACPI ERST feature Date: Thu, 9 Dec 2021 12:57:30 -0500 Message-Id: <1639072655-19271-6-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a88437e3-a9ef-40b7-bc77-08d9bb3d758a X-MS-TrafficTypeDiagnostic: MW4PR10MB5810:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Okuly7RT0obQTh4H+wUdABdIHpay0J3GP6S3SECPaSFfesEpgsXyCm/4RPPeccLruEbxIMvCsEFdvMw5QF+1lemXf9BizM35wdnqlmA4wPVInRH4w7wsgZQfN9FFt0uwqI2r1cJsroMGxqnzicY8gYq6L1UiwhWHBSJpVU2DWN2itlMT/qyEi3igtwa+DOyVCyxGyzDvFnyqJYlwvt3+BtdlNzw/IejzffAeocNN7/JDYyWFfFpe2Bdt5BewK0AZR8f7m4G/03yb5ODOJt45HgzWJssBhendqgzBk1C7wMjo6NV4cZrHixqOJhdU6TE6T1iy9wtxcUs7wTKAbXkWPlKL+AU2B9byu2JIv0/Aa/3sMPU1A5jkqjRSYJ8xpj5JzxTBibkbXyFUmBjDk96bdOxBZQZoTe+naM2Z4abFLQpMURa33FfhSCVVB0nr+ZtILisHjBsTvdSaEiKRS9uJbo1z8GjWF58D8quDT9NoF2+AKBx4dPK5Uv22FmFxTtJ2PZUibdXEAD2udqvl9dK9ZMAQezeaRoq5hfYevxDPy7S2B1ZKge7QzGNwnUE+dTgYuy0kJH9iPwdg6mwJLjn2I69GtdfDTBMFK+6oYsaW1VqyKPyFzRNrt5dexBf9DYOiHsAi2IoIK2D7/fALZU+MI+wuI1wrpaIfFdFzYnY2wqaOb4o+2N5PChO6R2j/1nNB5+f2EmjCsF1sgeh+vPXX6Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(508600001)(6916009)(5660300002)(186003)(66476007)(36756003)(26005)(6666004)(86362001)(30864003)(52116002)(38350700002)(956004)(83380400001)(38100700002)(2616005)(6486002)(66946007)(107886003)(4326008)(7696005)(66556008)(8676002)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Fp100Jg0/HctWyyVGdzrWaQ18KB3hNZ4AZRs8Hwpxp5hpQXeko00cDXcfbv6c2WNPFdMZkBhLOWGZgWdj2s5fWBphWBcaf3cYLIaFwUq3/iLpDr8QKjl/8JcRbw35RybSg7iyUUKoRBcg6gLPgYj9YyX2/Z+KZlcddmByfXI5Pu1TJtebJz+4Uo2S4fIsjgr1TZg5WjY76kFFvOgqLsLoW2gQamyTN0teWUzJLgrNt2YtAbEDJVZ2Ge2CzOE9LsMtx+XN2IXsrjD+j+QnifVoqj/2ZiV21y4Pt8vg6URyimvIbzevB7haj6xFQK0K46SrYm6+IvRD4QTDPKiYXCkLEdcWnkL+BPPVx8/mKcheXpxbGGKh0hlxy0jQWg1Y6Kvz+nn12TObTkTsDV2rIk6uuLhguTRH65gkdN+f9fGaXR7SYtoFI4nxFcnyjZ1MG52fzYzG45FvCZrCXcNb3XrbiQDrbJDTumiFkgrk88Pt7R4S5+PV+8C5cuYPJZosGfz40b0mTG1PBaAsrIRfVLbLoMKbBglRxmdd3aV7GiUq7aThxqo0pq59oBVM7yV+6f2V1yKYfR6UnGPUupJAJp7LIlDO/+EkQIo0wNVaH+nTitMv/h+VmiImPq7xPDC+vvcvGpFZCTHZrb3g24/zxc+AzXU0D40ZNM7hVtjwf7wxVRkJgE8TM8r5Bc/tpO24bktTonhUTFzV7sAXnoXpr5oamtmDXRp3QkDPQUGePvGUsoRbFxZ0Zh0PjO4+hsK3ogq17+ekZqvE8+8Si4zyGJW4/8+kE28xPARmyLnSYs7+j0wxfjZpe8CXPU5qIOfNzALtY33c1GVDo/BWo/AJPhbwG21vEsNf55YgV4xQ293AIGMVjbQImiLA6jbScUvD4Z8BhB7WIdw/o77ZpyRUNMg1HhBxiPdGMlyOqOjP/942fO0mAvdf6DJR2uiG9niGhAEXMIKx7SuUnNGQpVAv8rRkr5tamgyngYfgUbxT6rgSWS+xvBnfaQZjqQI5Ze9sqCWWINY4JPVow+Mh20Tc6wNQJpFRZOJILmKj/Bv2pLtoPAeemJTdMU/4NJt7c5fff011cSTT64O/hTb/tA4N+7rCObAv/2s1MtJdNfdrAdM5Fy5M0g1HrBY5Z3ivLgjs7ZFud1TuZrD1U3+Rw74/+D7gdpdOoTKVCFT+EVxNg75Fwgx4PC6TUk1XWpcfHtS7kj2GBwwv9HFfSY3JGiRYCFs/WtcEikc3rhcIh0uWI33ICgRQn/dUr+QE2HTR81hdalQQKbXVODW+HfHALN8iGQrz/rPqVdlvpwSmpoTMSc/lMv8lLxyiOepW8nAkneTuA2cfkPjx5J/8YGm5mJ8LFyzb8f/ChTIIuPogt/MOKNV9gIb6uNK3Om/pASiO+nE5wdeB1nQTChE8ual2b0K/1n9Kk8tb+ZJolGKvBxheKOf3Oph4ByC4Gw03fGK8GVJJD2HAspz9Xy0gFkbVQWxnKbVxRXWcZHiVBgRLyJcOJ9UDKPU9JfuvU9IUFgZmb3YuokPYp4NY//R6ZSmC34yxi2hVVpYRVDE/LgMw6sr4byEbMeXR6Vi0vyma3vWk5yOUDniBT77L28yqiqacFPBUD0IWMjF//pAOydq3ZbESXFIoFa56/jhi/iBbWp1/qe6NWvjKGQx2Pp5848RJVVIGz4Bbw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a88437e3-a9ef-40b7-bc77-08d9bb3d758a X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:09.0623 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KQtXVDgqctJ95Xr59Y01fHoiPS0ehDg1u9ryI656b9WqGPaBtIDJ09Wa90lUH56jXTtW2H7fjeInIXGpaNtXdloQzb93CjfoG8FA0RBIKkQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5810 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-GUID: k0-qtU-2-sr4gxn8LwkD3zlhNG5WnAv0 X-Proofpoint-ORIG-GUID: k0-qtU-2-sr4gxn8LwkD3zlhNG5WnAv0 Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This implements a PCI device for ACPI ERST. This implements the non-NVRAM "mode" of operation for ERST as it is supported by Linux and Windows. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha --- hw/acpi/Kconfig | 6 + hw/acpi/erst.c | 846 +++++++++++++++++++++++++++++++++++++++++++++++++++ hw/acpi/meson.build | 1 + hw/acpi/trace-events | 15 + 4 files changed, 868 insertions(+) create mode 100644 hw/acpi/erst.c diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig index 622b0b5..19caebd 100644 --- a/hw/acpi/Kconfig +++ b/hw/acpi/Kconfig @@ -10,6 +10,7 @@ config ACPI_X86 select ACPI_HMAT select ACPI_PIIX4 select ACPI_PCIHP + select ACPI_ERST config ACPI_X86_ICH bool @@ -60,3 +61,8 @@ config ACPI_HW_REDUCED select ACPI select ACPI_MEMORY_HOTPLUG select ACPI_NVDIMM + +config ACPI_ERST + bool + default y + depends on ACPI && PCI diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c new file mode 100644 index 0000000..81f5435 --- /dev/null +++ b/hw/acpi/erst.c @@ -0,0 +1,846 @@ +/* + * ACPI Error Record Serialization Table, ERST, Implementation + * + * ACPI ERST introduced in ACPI 4.0, June 16, 2009. + * ACPI Platform Error Interfaces : Error Serialization + * + * Copyright (c) 2021 Oracle and/or its affiliates. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "hw/qdev-core.h" +#include "exec/memory.h" +#include "qom/object.h" +#include "hw/pci/pci.h" +#include "qom/object_interfaces.h" +#include "qemu/error-report.h" +#include "migration/vmstate.h" +#include "hw/qdev-properties.h" +#include "hw/acpi/acpi.h" +#include "hw/acpi/acpi-defs.h" +#include "hw/acpi/aml-build.h" +#include "hw/acpi/bios-linker-loader.h" +#include "exec/address-spaces.h" +#include "sysemu/hostmem.h" +#include "hw/acpi/erst.h" +#include "trace.h" + +/* ACPI 4.0: Table 17-16 Serialization Actions */ +#define ACTION_BEGIN_WRITE_OPERATION 0x0 +#define ACTION_BEGIN_READ_OPERATION 0x1 +#define ACTION_BEGIN_CLEAR_OPERATION 0x2 +#define ACTION_END_OPERATION 0x3 +#define ACTION_SET_RECORD_OFFSET 0x4 +#define ACTION_EXECUTE_OPERATION 0x5 +#define ACTION_CHECK_BUSY_STATUS 0x6 +#define ACTION_GET_COMMAND_STATUS 0x7 +#define ACTION_GET_RECORD_IDENTIFIER 0x8 +#define ACTION_SET_RECORD_IDENTIFIER 0x9 +#define ACTION_GET_RECORD_COUNT 0xA +#define ACTION_BEGIN_DUMMY_WRITE_OPERATION 0xB +#define ACTION_RESERVED 0xC +#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE 0xD +#define ACTION_GET_ERROR_LOG_ADDRESS_LENGTH 0xE +#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0xF +#define ACTION_GET_EXECUTE_OPERATION_TIMINGS 0x10 /* ACPI 6.3 */ + +/* ACPI 4.0: Table 17-17 Command Status Definitions */ +#define STATUS_SUCCESS 0x00 +#define STATUS_NOT_ENOUGH_SPACE 0x01 +#define STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define STATUS_FAILED 0x03 +#define STATUS_RECORD_STORE_EMPTY 0x04 +#define STATUS_RECORD_NOT_FOUND 0x05 + + +/* UEFI 2.1: Appendix N Common Platform Error Record */ +#define UEFI_CPER_RECORD_MIN_SIZE 128U +#define UEFI_CPER_RECORD_LENGTH_OFFSET 20U +#define UEFI_CPER_RECORD_ID_OFFSET 96U +#define IS_UEFI_CPER_RECORD(ptr) \ + (((ptr)[0] == 'C') && \ + ((ptr)[1] == 'P') && \ + ((ptr)[2] == 'E') && \ + ((ptr)[3] == 'R')) + +/* + * NOTE that when accessing CPER fields within a record, memcpy() + * is utilized to avoid a possible misaligned access on the host. + */ + +/* + * This implementation is an ACTION (cmd) and VALUE (data) + * interface consisting of just two 64-bit registers. + */ +#define ERST_REG_SIZE (16UL) +#define ERST_ACTION_OFFSET (0UL) /* action (cmd) */ +#define ERST_VALUE_OFFSET (8UL) /* argument/value (data) */ + +/* + * ERST_RECORD_SIZE is the buffer size for exchanging ERST + * record contents. Thus, it defines the maximum record size. + * As this is mapped through a PCI BAR, it must be a power of + * two and larger than UEFI_CPER_RECORD_MIN_SIZE. + * The backing storage is divided into fixed size "slots", + * each ERST_RECORD_SIZE in length, and each "slot" + * storing a single record. No attempt at optimizing storage + * through compression, compaction, etc is attempted. + * NOTE that slot 0 is reserved for the backing storage header. + * Depending upon the size of the backing storage, additional + * slots will be part of the slot 0 header in order to account + * for a record_id for each available remaining slot. + */ +/* 8KiB records, not too small, not too big */ +#define ERST_RECORD_SIZE (8192UL) + +#define ACPI_ERST_MEMDEV_PROP "memdev" +#define ACPI_ERST_RECORD_SIZE_PROP "record_size" + +/* + * From the ACPI ERST spec sections: + * A record id of all 0s is used to indicate 'unspecified' record id. + * A record id of all 1s is used to indicate empty or end. + */ +#define ERST_UNSPECIFIED_RECORD_ID (0UL) +#define ERST_EMPTY_END_RECORD_ID (~0UL) + +#define ERST_IS_VALID_RECORD_ID(rid) \ + ((rid != ERST_UNSPECIFIED_RECORD_ID) && \ + (rid != ERST_EMPTY_END_RECORD_ID)) + +/* + * Implementation-specific definitions and types. + * Values are arbitrary and chosen for this implementation. + * See erst.rst documentation for details. + */ +#define ERST_EXECUTE_OPERATION_MAGIC 0x9CUL +#define ERST_STORE_MAGIC 0x524F545354535245UL /* ERSTSTOR */ +typedef struct { + uint64_t magic; + uint32_t record_size; + uint32_t storage_offset; /* offset to record storage beyond header */ + uint16_t version; + uint16_t reserved; + uint32_t record_count; + uint64_t map[]; /* contains record_ids, and position indicates index */ +} __attribute__((packed)) ERSTStorageHeader; + +/* + * Object cast macro + */ +#define ACPIERST(obj) \ + OBJECT_CHECK(ERSTDeviceState, (obj), TYPE_ACPI_ERST) + +/* + * Main ERST device state structure + */ +typedef struct { + PCIDevice parent_obj; + + /* Backend storage */ + HostMemoryBackend *hostmem; + MemoryRegion *hostmem_mr; + uint32_t storage_size; + uint32_t default_record_size; + + /* Programming registers */ + MemoryRegion iomem_mr; + + /* Exchange buffer */ + MemoryRegion exchange_mr; + + /* Interface state */ + uint8_t operation; + uint8_t busy_status; + uint8_t command_status; + uint32_t record_offset; + uint64_t reg_action; + uint64_t reg_value; + uint64_t record_identifier; + ERSTStorageHeader *header; + unsigned first_record_index; + unsigned last_record_index; + unsigned next_record_index; + +} ERSTDeviceState; + +/*******************************************************************/ +/*******************************************************************/ + +static uint8_t *get_nvram_ptr_by_index(ERSTDeviceState *s, unsigned index) +{ + uint8_t *rc = NULL; + off_t offset = (index * le32_to_cpu(s->header->record_size)); + + g_assert(offset < s->storage_size); + + rc = memory_region_get_ram_ptr(s->hostmem_mr); + rc += offset; + + return rc; +} + +static void make_erst_storage_header(ERSTDeviceState *s) +{ + ERSTStorageHeader *header = s->header; + unsigned mapsz, headersz; + + header->magic = cpu_to_le64(ERST_STORE_MAGIC); + header->record_size = cpu_to_le32(s->default_record_size); + header->version = cpu_to_le16(0x0100); + header->reserved = cpu_to_le16(0x0000); + + /* Compute mapsize */ + mapsz = s->storage_size / s->default_record_size; + mapsz *= sizeof(uint64_t); + /* Compute header+map size */ + headersz = sizeof(ERSTStorageHeader) + mapsz; + /* Round up to nearest integer multiple of ERST_RECORD_SIZE */ + headersz = QEMU_ALIGN_UP(headersz, s->default_record_size); + header->storage_offset = cpu_to_le32(headersz); + + /* + * The HostMemoryBackend initializes contents to zero, + * so all record_ids stashed in the map are zero'd. + * As well the record_count is zero. Properly initialized. + */ +} + +static void check_erst_backend_storage(ERSTDeviceState *s, Error **errp) +{ + ERSTStorageHeader *header; + uint32_t record_size; + + header = memory_region_get_ram_ptr(s->hostmem_mr); + s->header = header; + + /* Ensure pointer to header is 64-bit aligned */ + g_assert(QEMU_PTR_IS_ALIGNED(header, sizeof(uint64_t))); + + /* + * Check if header is uninitialized; HostMemoryBackend inits to 0 + */ + if (le64_to_cpu(header->magic) == 0UL) { + make_erst_storage_header(s); + } + + /* Validity check record_size */ + record_size = le32_to_cpu(header->record_size); + if (!( + (record_size) && /* non zero */ + (record_size >= UEFI_CPER_RECORD_MIN_SIZE) && + (((record_size - 1) & record_size) == 0) && /* is power of 2 */ + (record_size >= 4096) /* PAGE_SIZE */ + )) { + error_setg(errp, "ERST record_size %u is invalid", record_size); + } + + /* Validity check header */ + if (!( + (le64_to_cpu(header->magic) == ERST_STORE_MAGIC) && + ((le32_to_cpu(header->storage_offset) % record_size) == 0) && + (le16_to_cpu(header->version) == 0x0100) && + (le16_to_cpu(header->reserved) == 0) + )) { + error_setg(errp, "ERST backend storage header is invalid"); + } + + /* Check storage_size against record_size */ + if (((s->storage_size % record_size) != 0) || + (record_size > s->storage_size)) { + error_setg(errp, "ACPI ERST requires storage size be multiple of " + "record size (%uKiB)", record_size); + } + + /* Compute offset of first and last record storage slot */ + s->first_record_index = le32_to_cpu(header->storage_offset) + / record_size; + s->last_record_index = (s->storage_size / record_size); +} + +static void update_map_entry(ERSTDeviceState *s, unsigned index, + uint64_t record_id) +{ + if (index < s->last_record_index) { + s->header->map[index] = cpu_to_le64(record_id); + } +} + +static unsigned find_next_empty_record_index(ERSTDeviceState *s) +{ + unsigned rc = 0; /* 0 not a valid index */ + unsigned index = s->first_record_index; + + for (; index < s->last_record_index; ++index) { + if (le64_to_cpu(s->header->map[index]) == ERST_UNSPECIFIED_RECORD_ID) { + rc = index; + break; + } + } + + return rc; +} + +static unsigned lookup_erst_record(ERSTDeviceState *s, + uint64_t record_identifier) +{ + unsigned rc = 0; /* 0 not a valid index */ + + /* Find the record_identifier in the map */ + if (record_identifier != ERST_UNSPECIFIED_RECORD_ID) { + /* + * Count number of valid records encountered, and + * short-circuit the loop if identifier not found + */ + uint32_t record_count = le32_to_cpu(s->header->record_count); + unsigned count = 0; + unsigned index; + for (index = s->first_record_index; index < s->last_record_index && + count < record_count; ++index) { + if (le64_to_cpu(s->header->map[index]) == record_identifier) { + rc = index; + break; + } + if (le64_to_cpu(s->header->map[index]) != + ERST_UNSPECIFIED_RECORD_ID) { + ++count; + } + } + } + + return rc; +} + +/* + * ACPI 4.0: 17.4.1.1 Serialization Actions, also see + * ACPI 4.0: 17.4.2.2 Operations - Reading 6.c and 2.c + */ +static unsigned get_next_record_identifier(ERSTDeviceState *s, + uint64_t *record_identifier, bool first) +{ + unsigned found = 0; + unsigned index; + + /* For operations needing to return 'first' record identifier */ + if (first) { + /* Reset initial index to beginning */ + s->next_record_index = s->first_record_index; + } + index = s->next_record_index; + + *record_identifier = ERST_EMPTY_END_RECORD_ID; + + if (le32_to_cpu(s->header->record_count)) { + for (; index < s->last_record_index; ++index) { + if (le64_to_cpu(s->header->map[index]) != + ERST_UNSPECIFIED_RECORD_ID) { + /* where to start next time */ + s->next_record_index = index + 1; + *record_identifier = le64_to_cpu(s->header->map[index]); + found = 1; + break; + } + } + } + if (!found) { + /* at end (ie scan complete), reset */ + s->next_record_index = s->first_record_index; + } + + return STATUS_SUCCESS; +} + +/* ACPI 4.0: 17.4.2.3 Operations - Clearing */ +static unsigned clear_erst_record(ERSTDeviceState *s) +{ + unsigned rc = STATUS_RECORD_NOT_FOUND; + unsigned index; + + /* Check for valid record identifier */ + if (!ERST_IS_VALID_RECORD_ID(s->record_identifier)) { + return STATUS_FAILED; + } + + index = lookup_erst_record(s, s->record_identifier); + if (index) { + /* No need to wipe record, just invalidate its map entry */ + uint32_t record_count; + update_map_entry(s, index, ERST_UNSPECIFIED_RECORD_ID); + record_count = le32_to_cpu(s->header->record_count); + record_count -= 1; + s->header->record_count = cpu_to_le32(record_count); + rc = STATUS_SUCCESS; + } + + return rc; +} + +/* ACPI 4.0: 17.4.2.2 Operations - Reading */ +static unsigned read_erst_record(ERSTDeviceState *s) +{ + unsigned rc = STATUS_RECORD_NOT_FOUND; + unsigned exchange_length; + unsigned index; + + /* Check if backend storage is empty */ + if (le32_to_cpu(s->header->record_count) == 0) { + return STATUS_RECORD_STORE_EMPTY; + } + + exchange_length = memory_region_size(&s->exchange_mr); + + /* Check for record identifier of all 0s */ + if (s->record_identifier == ERST_UNSPECIFIED_RECORD_ID) { + /* Set to 'first' record in storage */ + get_next_record_identifier(s, &s->record_identifier, true); + /* record_identifier is now a valid id, or all 1s */ + } + + /* Check for record identifier of all 1s */ + if (s->record_identifier == ERST_EMPTY_END_RECORD_ID) { + return STATUS_FAILED; + } + + /* Validate record_offset */ + if (s->record_offset > (exchange_length - UEFI_CPER_RECORD_MIN_SIZE)) { + return STATUS_FAILED; + } + + index = lookup_erst_record(s, s->record_identifier); + if (index) { + uint8_t *nvram; + uint8_t *exchange; + uint32_t record_length; + + /* Obtain pointer to the exchange buffer */ + exchange = memory_region_get_ram_ptr(&s->exchange_mr); + exchange += s->record_offset; + /* Obtain pointer to slot in storage */ + nvram = get_nvram_ptr_by_index(s, index); + /* Validate CPER record_length */ + memcpy((uint8_t *)&record_length, + &nvram[UEFI_CPER_RECORD_LENGTH_OFFSET], + sizeof(uint32_t)); + record_length = le32_to_cpu(record_length); + if (record_length < UEFI_CPER_RECORD_MIN_SIZE) { + rc = STATUS_FAILED; + } + if ((s->record_offset + record_length) > exchange_length) { + rc = STATUS_FAILED; + } + /* If all is ok, copy the record to the exchange buffer */ + if (rc != STATUS_FAILED) { + memcpy(exchange, nvram, record_length); + rc = STATUS_SUCCESS; + } + } else { + /* + * See "Reading : 'The steps performed by the platform ...' 2.c" + * Set to 'first' record in storage + */ + get_next_record_identifier(s, &s->record_identifier, true); + } + + return rc; +} + +/* ACPI 4.0: 17.4.2.1 Operations - Writing */ +static unsigned write_erst_record(ERSTDeviceState *s) +{ + unsigned rc = STATUS_FAILED; + unsigned exchange_length; + unsigned index; + uint64_t record_identifier; + uint32_t record_length; + uint8_t *exchange; + uint8_t *nvram = NULL; + bool record_found = false; + + exchange_length = memory_region_size(&s->exchange_mr); + + /* Validate record_offset */ + if (s->record_offset > (exchange_length - UEFI_CPER_RECORD_MIN_SIZE)) { + return STATUS_FAILED; + } + + /* Obtain pointer to record in the exchange buffer */ + exchange = memory_region_get_ram_ptr(&s->exchange_mr); + exchange += s->record_offset; + + /* Validate CPER record_length */ + memcpy((uint8_t *)&record_length, &exchange[UEFI_CPER_RECORD_LENGTH_OFFSET], + sizeof(uint32_t)); + record_length = le32_to_cpu(record_length); + if (record_length < UEFI_CPER_RECORD_MIN_SIZE) { + return STATUS_FAILED; + } + if ((s->record_offset + record_length) > exchange_length) { + return STATUS_FAILED; + } + + /* Extract record identifier */ + memcpy((uint8_t *)&record_identifier, &exchange[UEFI_CPER_RECORD_ID_OFFSET], + sizeof(uint64_t)); + record_identifier = le64_to_cpu(record_identifier); + + /* Check for valid record identifier */ + if (!ERST_IS_VALID_RECORD_ID(record_identifier)) { + return STATUS_FAILED; + } + + index = lookup_erst_record(s, record_identifier); + if (index) { + /* Record found, overwrite existing record */ + nvram = get_nvram_ptr_by_index(s, index); + record_found = true; + } else { + /* Record not found, not an overwrite, allocate for write */ + index = find_next_empty_record_index(s); + if (index) { + nvram = get_nvram_ptr_by_index(s, index); + } else { + /* All slots are occupied */ + rc = STATUS_NOT_ENOUGH_SPACE; + } + } + if (nvram) { + /* Write the record into the slot */ + memcpy(nvram, exchange, record_length); + memset(nvram + record_length, exchange_length - record_length, 0xFF); + /* If a new record, increment the record_count */ + if (!record_found) { + uint32_t record_count; + record_count = le32_to_cpu(s->header->record_count); + record_count += 1; /* writing new record */ + s->header->record_count = cpu_to_le32(record_count); + } + update_map_entry(s, index, record_identifier); + rc = STATUS_SUCCESS; + } + + return rc; +} + +/*******************************************************************/ + +static uint64_t erst_rd_reg64(hwaddr addr, + uint64_t reg, unsigned size) +{ + uint64_t rdval; + uint64_t mask; + unsigned shift; + + if (size == sizeof(uint64_t)) { + /* 64b access */ + mask = 0xFFFFFFFFFFFFFFFFUL; + shift = 0; + } else { + /* 32b access */ + mask = 0x00000000FFFFFFFFUL; + shift = ((addr & 0x4) == 0x4) ? 32 : 0; + } + + rdval = reg; + rdval >>= shift; + rdval &= mask; + + return rdval; +} + +static uint64_t erst_wr_reg64(hwaddr addr, + uint64_t reg, uint64_t val, unsigned size) +{ + uint64_t wrval; + uint64_t mask; + unsigned shift; + + if (size == sizeof(uint64_t)) { + /* 64b access */ + mask = 0xFFFFFFFFFFFFFFFFUL; + shift = 0; + } else { + /* 32b access */ + mask = 0x00000000FFFFFFFFUL; + shift = ((addr & 0x4) == 0x4) ? 32 : 0; + } + + val &= mask; + val <<= shift; + mask <<= shift; + wrval = reg; + wrval &= ~mask; + wrval |= val; + + return wrval; +} + +static void erst_reg_write(void *opaque, hwaddr addr, + uint64_t val, unsigned size) +{ + ERSTDeviceState *s = (ERSTDeviceState *)opaque; + + /* + * NOTE: All actions/operations/side effects happen on the WRITE, + * by this implementation's design. The READs simply return the + * reg_value contents. + */ + trace_acpi_erst_reg_write(addr, val, size); + + switch (addr) { + case ERST_VALUE_OFFSET + 0: + case ERST_VALUE_OFFSET + 4: + s->reg_value = erst_wr_reg64(addr, s->reg_value, val, size); + break; + case ERST_ACTION_OFFSET + 0: + /* + * NOTE: all valid values written to this register are of the + * ACTION_* variety. Thus there is no need to make this a 64-bit + * register, 32-bits is appropriate. As such ERST_ACTION_OFFSET+4 + * is not needed. + */ + switch (val) { + case ACTION_BEGIN_WRITE_OPERATION: + case ACTION_BEGIN_READ_OPERATION: + case ACTION_BEGIN_CLEAR_OPERATION: + case ACTION_BEGIN_DUMMY_WRITE_OPERATION: + case ACTION_END_OPERATION: + s->operation = val; + break; + case ACTION_SET_RECORD_OFFSET: + s->record_offset = s->reg_value; + break; + case ACTION_EXECUTE_OPERATION: + if ((uint8_t)s->reg_value == ERST_EXECUTE_OPERATION_MAGIC) { + s->busy_status = 1; + switch (s->operation) { + case ACTION_BEGIN_WRITE_OPERATION: + s->command_status = write_erst_record(s); + break; + case ACTION_BEGIN_READ_OPERATION: + s->command_status = read_erst_record(s); + break; + case ACTION_BEGIN_CLEAR_OPERATION: + s->command_status = clear_erst_record(s); + break; + case ACTION_BEGIN_DUMMY_WRITE_OPERATION: + s->command_status = STATUS_SUCCESS; + break; + case ACTION_END_OPERATION: + s->command_status = STATUS_SUCCESS; + break; + default: + s->command_status = STATUS_FAILED; + break; + } + s->busy_status = 0; + } + break; + case ACTION_CHECK_BUSY_STATUS: + s->reg_value = s->busy_status; + break; + case ACTION_GET_COMMAND_STATUS: + s->reg_value = s->command_status; + break; + case ACTION_GET_RECORD_IDENTIFIER: + s->command_status = get_next_record_identifier(s, + &s->reg_value, false); + break; + case ACTION_SET_RECORD_IDENTIFIER: + s->record_identifier = s->reg_value; + break; + case ACTION_GET_RECORD_COUNT: + s->reg_value = le32_to_cpu(s->header->record_count); + break; + case ACTION_GET_ERROR_LOG_ADDRESS_RANGE: + s->reg_value = (hwaddr)pci_get_bar_addr(PCI_DEVICE(s), 1); + break; + case ACTION_GET_ERROR_LOG_ADDRESS_LENGTH: + s->reg_value = le32_to_cpu(s->header->record_size); + break; + case ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES: + s->reg_value = 0x0; /* intentional, not NVRAM mode */ + break; + case ACTION_GET_EXECUTE_OPERATION_TIMINGS: + s->reg_value = + (100ULL << 32) | /* 100us max time */ + (10ULL << 0) ; /* 10us min time */ + break; + default: + /* Unknown action/command, NOP */ + break; + } + break; + default: + /* This should not happen, but if it does, NOP */ + break; + } +} + +static uint64_t erst_reg_read(void *opaque, hwaddr addr, + unsigned size) +{ + ERSTDeviceState *s = (ERSTDeviceState *)opaque; + uint64_t val = 0; + + switch (addr) { + case ERST_ACTION_OFFSET + 0: + case ERST_ACTION_OFFSET + 4: + val = erst_rd_reg64(addr, s->reg_action, size); + break; + case ERST_VALUE_OFFSET + 0: + case ERST_VALUE_OFFSET + 4: + val = erst_rd_reg64(addr, s->reg_value, size); + break; + default: + break; + } + trace_acpi_erst_reg_read(addr, val, size); + return val; +} + +static const MemoryRegionOps erst_reg_ops = { + .read = erst_reg_read, + .write = erst_reg_write, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +/*******************************************************************/ +/*******************************************************************/ +static int erst_post_load(void *opaque, int version_id) +{ + ERSTDeviceState *s = opaque; + + /* Recompute pointer to header */ + s->header = (ERSTStorageHeader *)get_nvram_ptr_by_index(s, 0); + trace_acpi_erst_post_load(s->header, le32_to_cpu(s->header->record_size)); + + return 0; +} + +static const VMStateDescription erst_vmstate = { + .name = "acpi-erst", + .version_id = 1, + .minimum_version_id = 1, + .post_load = erst_post_load, + .fields = (VMStateField[]) { + VMSTATE_UINT8(operation, ERSTDeviceState), + VMSTATE_UINT8(busy_status, ERSTDeviceState), + VMSTATE_UINT8(command_status, ERSTDeviceState), + VMSTATE_UINT32(record_offset, ERSTDeviceState), + VMSTATE_UINT64(reg_action, ERSTDeviceState), + VMSTATE_UINT64(reg_value, ERSTDeviceState), + VMSTATE_UINT64(record_identifier, ERSTDeviceState), + VMSTATE_UINT32(next_record_index, ERSTDeviceState), + VMSTATE_END_OF_LIST() + } +}; + +static void erst_realizefn(PCIDevice *pci_dev, Error **errp) +{ + ERSTDeviceState *s = ACPIERST(pci_dev); + + trace_acpi_erst_realizefn_in(); + + if (!s->hostmem) { + error_setg(errp, "'" ACPI_ERST_MEMDEV_PROP "' property is not set"); + return; + } else if (host_memory_backend_is_mapped(s->hostmem)) { + error_setg(errp, "can't use already busy memdev: %s", + object_get_canonical_path_component(OBJECT(s->hostmem))); + return; + } + + s->hostmem_mr = host_memory_backend_get_memory(s->hostmem); + + /* HostMemoryBackend size will be multiple of PAGE_SIZE */ + s->storage_size = object_property_get_int(OBJECT(s->hostmem), "size", errp); + + /* Initialize backend storage and record_count */ + check_erst_backend_storage(s, errp); + + /* BAR 0: Programming registers */ + memory_region_init_io(&s->iomem_mr, OBJECT(pci_dev), &erst_reg_ops, s, + TYPE_ACPI_ERST, ERST_REG_SIZE); + pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem_mr); + + /* BAR 1: Exchange buffer memory */ + memory_region_init_ram(&s->exchange_mr, OBJECT(pci_dev), + "erst.exchange", + le32_to_cpu(s->header->record_size), errp); + pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY, + &s->exchange_mr); + + /* Include the backend storage in the migration stream */ + vmstate_register_ram_global(s->hostmem_mr); + + trace_acpi_erst_realizefn_out(s->storage_size); +} + +static void erst_reset(DeviceState *dev) +{ + ERSTDeviceState *s = ACPIERST(dev); + + trace_acpi_erst_reset_in(le32_to_cpu(s->header->record_count)); + s->operation = 0; + s->busy_status = 0; + s->command_status = STATUS_SUCCESS; + s->record_identifier = ERST_UNSPECIFIED_RECORD_ID; + s->record_offset = 0; + s->next_record_index = s->first_record_index; + /* NOTE: first/last_record_index are computed only once */ + trace_acpi_erst_reset_out(le32_to_cpu(s->header->record_count)); +} + +static Property erst_properties[] = { + DEFINE_PROP_LINK(ACPI_ERST_MEMDEV_PROP, ERSTDeviceState, hostmem, + TYPE_MEMORY_BACKEND, HostMemoryBackend *), + DEFINE_PROP_UINT32(ACPI_ERST_RECORD_SIZE_PROP, ERSTDeviceState, + default_record_size, ERST_RECORD_SIZE), + DEFINE_PROP_END_OF_LIST(), +}; + +static void erst_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); + + trace_acpi_erst_class_init_in(); + k->realize = erst_realizefn; + k->vendor_id = PCI_VENDOR_ID_REDHAT; + k->device_id = PCI_DEVICE_ID_REDHAT_ACPI_ERST; + k->revision = 0x00; + k->class_id = PCI_CLASS_OTHERS; + dc->reset = erst_reset; + dc->vmsd = &erst_vmstate; + dc->user_creatable = true; + dc->hotpluggable = false; + device_class_set_props(dc, erst_properties); + dc->desc = "ACPI Error Record Serialization Table (ERST) device"; + set_bit(DEVICE_CATEGORY_MISC, dc->categories); + trace_acpi_erst_class_init_out(); +} + +static const TypeInfo erst_type_info = { + .name = TYPE_ACPI_ERST, + .parent = TYPE_PCI_DEVICE, + .class_init = erst_class_init, + .instance_size = sizeof(ERSTDeviceState), + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { } + } +}; + +static void erst_register_types(void) +{ + type_register_static(&erst_type_info); +} + +type_init(erst_register_types) diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index adf6347..f5b2298 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -22,6 +22,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_true: files('pcihp.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c')) acpi_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('ich9.c', 'tco.c')) +acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c')) acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c')) acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c')) acpi_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c')) diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events index 974d770..2250126 100644 --- a/hw/acpi/trace-events +++ b/hw/acpi/trace-events @@ -55,3 +55,18 @@ piix4_gpe_writeb(uint64_t addr, unsigned width, uint64_t val) "addr: 0x%" PRIx64 # tco.c tco_timer_reload(int ticks, int msec) "ticks=%d (%d ms)" tco_timer_expired(int timeouts_no, bool strap, bool no_reboot) "timeouts_no=%d no_reboot=%d/%d" + +# erst.c +acpi_erst_reg_write(uint64_t addr, uint64_t val, unsigned size) "addr: 0x%04" PRIx64 " <== 0x%016" PRIx64 " (size: %u)" +acpi_erst_reg_read(uint64_t addr, uint64_t val, unsigned size) " addr: 0x%04" PRIx64 " ==> 0x%016" PRIx64 " (size: %u)" +acpi_erst_mem_write(uint64_t addr, uint64_t val, unsigned size) "addr: 0x%06" PRIx64 " <== 0x%016" PRIx64 " (size: %u)" +acpi_erst_mem_read(uint64_t addr, uint64_t val, unsigned size) " addr: 0x%06" PRIx64 " ==> 0x%016" PRIx64 " (size: %u)" +acpi_erst_pci_bar_0(uint64_t addr) "BAR0: 0x%016" PRIx64 +acpi_erst_pci_bar_1(uint64_t addr) "BAR1: 0x%016" PRIx64 +acpi_erst_realizefn_in(void) +acpi_erst_realizefn_out(unsigned size) "total nvram size %u bytes" +acpi_erst_reset_in(unsigned record_count) "record_count %u" +acpi_erst_reset_out(unsigned record_count) "record_count %u" +acpi_erst_post_load(void *header, unsigned slot_size) "header: 0x%p slot_size %u" +acpi_erst_class_init_in(void) +acpi_erst_class_init_out(void) From patchwork Thu Dec 9 17:57:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17E04C433EF for ; Thu, 9 Dec 2021 18:06:59 +0000 (UTC) Received: from localhost ([::1]:53556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNoo-0004xr-63 for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:06:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgT-00088z-Mk for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:22 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:63292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgQ-0002vO-FH for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:20 -0500 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9Hfjvi028298; Thu, 9 Dec 2021 17:58:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=UV2OHrtAqK070qYO+KjN8z6SovMmC82NEbwQcjBFMRo=; b=VYPiwS4Gba0F91FRaaBk62DxS/zlGiwyDqMRdMyQ/qv8K2Pv3FZxtuMHk4YAZ9kmJGc1 pGNEogzOQYj3ghP5yKU7xWxin0EkZT2g0hOgybuUkogXlw/+R6Z2BBL+k2iZnwPnVNmY 2U/axNmhBxoFL57HejHbkBpAm22RXWR4LQMH6dv2ap5wppE1uD2J+SPSj789aHGY2mYi 2aZf5lHdJotNHF7s2KtPXzZ/h2EYUbOCNd8bzbTI4xLt8doLkN+iUCuTsMxqqcWn5Wwg bXgaldQ8tmN0OnlgibToEw19i0BynnH+sePxRkcRtrzBOw3sKqPjArkG7v20SjbXAhUq 5Q== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctse1m2un-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:15 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HpIh6078905; Thu, 9 Dec 2021 17:58:13 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109]) by userp3030.oracle.com with ESMTP id 3cqwf2j2ed-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PgdYSz6nZAe3dIeZzhOxgPfLRoiU/SbHcqLD8oMY9RBSHirL0YJoRGcQ+qYUvWQnOe9iGeewf55lEDk3eogyFzXa5/BEK2BtWwmOfCVBp+6h/cw7dEBw75g5NuC1aVml5uEJu3UEu4oXYHb7F+569LgZdAWvJag6VyaHpMKamsdKdXcK5f3lHWIcV3BPSl6Km4aF6i8+hkVvHnCeqhwcjIly18AIqWJ2hrinijykMzbO1vSLfUCREe7VxkIvr6JCFjO84fXX7ohizxIXB3rnqgGzreOM2Z0zxIKQ+dMcwGiZvz6g5kgDOb/997hshjQ++eCxFOIWiVLev3acGI1G2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UV2OHrtAqK070qYO+KjN8z6SovMmC82NEbwQcjBFMRo=; b=MmGhhXTKAWqvY653TH2m9yRMkP3J5hdTbyydWRoY3xmcNF/4T25hZ7cRTYeI2joMmlbv2o3K1SKTFAe1bYjlKQUc/rwDY6BUjq7PF0Deqqpe1yia+uxMIB3lcynwfjft/DHXvllQsq1tdEjZ8tb8IyUP3a2BmRBJ8ImjJt160TZo7a7OqHNEUaPCQynQ057J67FoOuipZP7XPqVDnb7ZzAiR7VWoCks89D44nOzl5k7WdQiaOjrB4nJcQFhR7FmMcypxsE74I/ZsMisEn6w3lZaRr/wImIGGYwkX/6Bn3cTEtNnTVSi7NsBKR/gLKG0+BgInfMk1VbRk2t0XPEGtZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UV2OHrtAqK070qYO+KjN8z6SovMmC82NEbwQcjBFMRo=; b=D0BslANr+a6VZ8Ju0zX/mLGclztzGu/1O0oFn9kNvJDY1DAE0H0M9RcRNoMsJPkxBUFCPqccj8z0/glgCglonEl7+bRUxMBXq9L2DFodSNv9n4GT5gj64fyDQdB/D00wxO2uTyAtlCjvKuTcSkq8I0GPcEWJInC+yLuCPtAstxU= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MW4PR10MB5810.namprd10.prod.outlook.com (2603:10b6:303:186::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:11 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:11 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 06/10] ACPI ERST: build the ACPI ERST table Date: Thu, 9 Dec 2021 12:57:31 -0500 Message-Id: <1639072655-19271-7-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03f5ea39-679b-47d4-09c5-08d9bb3d76c8 X-MS-TrafficTypeDiagnostic: MW4PR10MB5810:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 05f0oMhFkIhkdHXwmWZ6/SEIyTmxmul5teJdm10pH4U/54UAy11JRlv0u1dD4o8NKsD7Mr0GQJek3nmdBGngnaOwdN4+Rkm/tKDvaelG6bIAPXd9wuAGfz3Uc86uOoF8urWDCHLoKj/M0niy3f1fIG/q6uVCw63f6uMqXkkkmIjxYYHcEa+G3OImYMCOLzC8ryYPq6AU8nYweb6xW7rw9rs8ElHEAkXrdYr6fHf1Oz7F/+QHpGv1wGNCpTylbGH9xsLblBoyKgzTbS+vjmWBYHEH3Y92BV2SQKY58OdoHTNecuoOdgVRKHoEsqA81OdgvgwxkLnEEsaORuYRz52WSh9y2kh3dlga2N3Q/e03nnWZOJsMu+ploRRl6nYVVpC24T5i2i53203xcf5E3fmFFoXys9Zam6XhlBsFPh+mwk6WWJcJ6huESfLCLmCcf5D9yBpHzrVj05G/g23pwXfnAN6ZfhfgeA55Fdjq2DbkrFy4/du2r/bCHY8UNCOZJDKh8xV8Gg4vtjTnKOQuEr5t6GsLy9dIN1cHiM2468o1362/3K0GJRf5vmY4vNbGVGf+p9nz6kwltI81SHSZptL2JOxz0iD2abg8L1NOy+ns89EOwbUv9Tb/PXQSHRciFJkTyBUsmKx9tqWzW80YF4f3N9/C0K+YUnjDzo96fOhhdLE2UoOLdRH28UkU/rvxLnw6NT/MzuIuRMyZHGRk4D4G3w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(508600001)(6916009)(5660300002)(186003)(66476007)(36756003)(26005)(6666004)(86362001)(52116002)(38350700002)(956004)(83380400001)(38100700002)(2616005)(6486002)(66946007)(107886003)(4326008)(7696005)(66556008)(8676002)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FcCG/gwTQ75y4Jx+njrDYWv79CW/3KyzuUVfzm+UiuwgkEKjwKhwyjLKkz6nmG5bIXxmBFwqtkXbY+joxkL7BFSBQ9mf3SOtfPVCXEni7xjIz/bkN3jl9Tt/I091oqPweYGCG4CLQWLEBHr2RQ0mh7Rk0Njs92HK4qXbC9YzU104bVO/5a7oDRKappeR6hOdHVqi6FYvVLtqIkkyBZrKGgT4jrZ+tFoTgyAjPxZmZPkryWQB30AXAXkXJneRzJjPVSAKiHYw+sEqk2suCMS86wmOmxNIdpOz3KSQUAxg3GdR+lLDTXYJIPrzoz26w2B5Od5Z+kVG5o61s6vXp7rFM9H9c15PLIwfGJiFMyvowdKb5TdkIFBrx+0f3VcrX5QCpAGAJhk6VYKLSMDT/DjkoP5K0s4BGs+BgQSOIGiI4xKAAe6/Fx8+DIiM52jy2kho5GMjLFJkcs2CB5sKqLFm5fCoXorn0O8m0P2VcPs0bZpMjC2shu+iG0VWyIzfzrK/xkAIIKhw6Lkn8H/RROYfzQnK5ttBko1w1bwyN+HaYtWMoCwYtQ09RoB4Hw4w+RjaPlCjSLLO+2NB1wL9pyfPWImEBo7y96wSL2SxAw2gEsHRzrtR3y+E7RNSvzRHc/ZvN05NCYC4MO8+w7Ua13nhLrM7yEUPY40r0J+MSVhIaX8I6+8MXZbnJlf0XHgA3FQj7paOzvLvQssGn9l5v5jCNKWY7vXD+Is3jYDYLaihGblv0ZkpDKvolGg+wqzWR8ePh3GIzxFTmx1Y9xQzqFWtZxxQ8EswltsnkVWZiq8dW6Mi8+Bs+/hGSQcS3rG0B4AUY+8aUp6YX3P2P+9lk7G7m0nlwvmxSaPAvVFCeXIg0gbaOF9UGnDQPCHNY6ivRGaNO3qN8awT5JFdCMTeg17QD630A9RebRgoiD6FLXKZmPPF19pjBIvDEkS2usF05tFlEYRx/GYJC6tW80J1PI0Ea6F6VXiTgYvX2++EFYJn1PX2UAPBFKvv7+ivlK93fGHR5HBpDs74ySO2TRcODzMyMc9+pUs72h1B1M/iP/AQXjp/r9u0gCur9b+IRaTLQgJNoJzNuZJKgtoX54D3MK9Is6JjLKWDWbkob+tqjXlLc1CH86lq4RcHuDJ6mWJgb0EHKC+/w9gvlOD3LlnHpENuD7aX2qcNa0bRqOxvBkeXofeSVNNJ04MqMh3J3u5XaXSc915JCYHsza2iOxdHs9gP/756BjKiheWMcE/zAwGELMIY0fzooDbyrJ8fZF+n3bzy366PmkAyO4ee3w46jUg5lPg4CNF4iEJpkETfoJLAGyG4QzEVK61Km7k44m5nfKFMy11YjQMJW+5msSZ0gKXDnz+lcv0HYvSvMYh+T9/rLsuQ9rLCTVyy9V/HJGZq6SWhS5J7JXgocLnYlk8qIaKCLLkCqv2j/3RtyYtF8VUMyruRD9zy/bdwj7veCg7n3i9hvqRtv9dQ6DCg/wtvJU+XyUB7tXwaDzxO8qtWMz+poztVmoP8jnbimZLCC8gLFFLw92oKlEzALcSYtMM3RIZ3FRE6EFWiKqSMTvOBGjEZHzES/kE5Adiup2qlpFLiLhVCaXudwC4WcuCEVeK7NFWOej/gIGykS9zzGTg0kISojvAjLxQtIYYtN6CqWNw4MK6g4Lcw6JmQcBPrUl18BKGd4Q== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03f5ea39-679b-47d4-09c5-08d9bb3d76c8 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:11.0949 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tug66eRT0quwENsBWCk4RgmzkkOzWX+M7PlqpcbEmk1ScFbj5FLK6VPmB3YHLx5QGhuJfs39PJIrz0x1C9NbPHcTg7Nh1hzLZtp8P/mWs8k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5810 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-GUID: GmO0MmgL0Js4DPD5Ie-A9XFmapQhBlpm X-Proofpoint-ORIG-GUID: GmO0MmgL0Js4DPD5Ie-A9XFmapQhBlpm Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This builds the ACPI ERST table to inform OSPM how to communicate with the acpi-erst device. Signed-off-by: Eric DeVolder --- hw/acpi/erst.c | 241 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index 81f5435..753425a 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -711,6 +711,247 @@ static const MemoryRegionOps erst_reg_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; + +/*******************************************************************/ +/*******************************************************************/ + +/* ACPI 4.0: Table 17-19 Serialization Instructions */ +#define INST_READ_REGISTER 0x00 +#define INST_READ_REGISTER_VALUE 0x01 +#define INST_WRITE_REGISTER 0x02 +#define INST_WRITE_REGISTER_VALUE 0x03 +#define INST_NOOP 0x04 +#define INST_LOAD_VAR1 0x05 +#define INST_LOAD_VAR2 0x06 +#define INST_STORE_VAR1 0x07 +#define INST_ADD 0x08 +#define INST_SUBTRACT 0x09 +#define INST_ADD_VALUE 0x0A +#define INST_SUBTRACT_VALUE 0x0B +#define INST_STALL 0x0C +#define INST_STALL_WHILE_TRUE 0x0D +#define INST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define INST_GOTO 0x0F +#define INST_SET_SRC_ADDRESS_BASE 0x10 +#define INST_SET_DST_ADDRESS_BASE 0x11 +#define INST_MOVE_DATA 0x12 + +/* ACPI 4.0: 17.4.1.2 Serialization Instruction Entries */ +static void build_serialization_instruction_entry(GArray *table_data, + uint8_t serialization_action, + uint8_t instruction, + uint8_t flags, + uint8_t register_bit_width, + uint64_t register_address, + uint64_t value, + uint64_t mask) +{ + /* ACPI 4.0: Table 17-18 Serialization Instruction Entry */ + struct AcpiGenericAddress gas; + + /* Serialization Action */ + build_append_int_noprefix(table_data, serialization_action, 1); + /* Instruction */ + build_append_int_noprefix(table_data, instruction , 1); + /* Flags */ + build_append_int_noprefix(table_data, flags , 1); + /* Reserved */ + build_append_int_noprefix(table_data, 0 , 1); + /* Register Region */ + gas.space_id = AML_SYSTEM_MEMORY; + gas.bit_width = register_bit_width; + gas.bit_offset = 0; + switch (register_bit_width) { + case 8: + gas.access_width = 1; + break; + case 16: + gas.access_width = 2; + break; + case 32: + gas.access_width = 3; + break; + case 64: + gas.access_width = 4; + break; + default: + gas.access_width = 0; + break; + } + gas.address = register_address; + build_append_gas_from_struct(table_data, &gas); + /* Value */ + build_append_int_noprefix(table_data, value , 8); + /* Mask */ + build_append_int_noprefix(table_data, mask , 8); +} + +/* ACPI 4.0: 17.4.1 Serialization Action Table */ +void build_erst(GArray *table_data, BIOSLinker *linker, Object *erst_dev, + const char *oem_id, const char *oem_table_id) +{ + GArray *table_instruction_data; + unsigned action; + pcibus_t bar0, bar1; + AcpiTable table = { .sig = "ERST", .rev = 1, .oem_id = oem_id, + .oem_table_id = oem_table_id }; + + bar0 = (pcibus_t)pci_get_bar_addr(PCI_DEVICE(erst_dev), 0); + trace_acpi_erst_pci_bar_0(bar0); + bar1 = (pcibus_t)pci_get_bar_addr(PCI_DEVICE(erst_dev), 1); + trace_acpi_erst_pci_bar_1(bar1); + +#define MASK8 0x00000000000000FFUL +#define MASK16 0x000000000000FFFFUL +#define MASK32 0x00000000FFFFFFFFUL +#define MASK64 0xFFFFFFFFFFFFFFFFUL + + /* + * Serialization Action Table + * The serialization action table must be generated first + * so that its size can be known in order to populate the + * Instruction Entry Count field. + */ + table_instruction_data = g_array_new(FALSE, FALSE, sizeof(char)); + + /* Serialization Instruction Entries */ + action = ACTION_BEGIN_WRITE_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_BEGIN_READ_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_BEGIN_CLEAR_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_END_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_SET_RECORD_OFFSET; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER , 0, 32, + bar0 + ERST_VALUE_OFFSET , 0, MASK32); + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_EXECUTE_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_VALUE_OFFSET , ERST_EXECUTE_OPERATION_MAGIC, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_CHECK_BUSY_STATUS; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER_VALUE , 0, 32, + bar0 + ERST_VALUE_OFFSET, 0x01, MASK8); + + action = ACTION_GET_COMMAND_STATUS; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 32, + bar0 + ERST_VALUE_OFFSET, 0, MASK8); + + action = ACTION_GET_RECORD_IDENTIFIER; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET, 0, MASK64); + + action = ACTION_SET_RECORD_IDENTIFIER; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET , 0, MASK64); + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_GET_RECORD_COUNT; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 32, + bar0 + ERST_VALUE_OFFSET, 0, MASK32); + + action = ACTION_BEGIN_DUMMY_WRITE_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_GET_ERROR_LOG_ADDRESS_RANGE; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET, 0, MASK64); + + action = ACTION_GET_ERROR_LOG_ADDRESS_LENGTH; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET, 0, MASK32); + + action = ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 32, + bar0 + ERST_VALUE_OFFSET, 0, MASK32); + + action = ACTION_GET_EXECUTE_OPERATION_TIMINGS; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET, 0, MASK64); + + /* Serialization Header */ + acpi_table_begin(&table, table_data); + + /* Serialization Header Size */ + build_append_int_noprefix(table_data, 48, 4); + + /* Reserved */ + build_append_int_noprefix(table_data, 0, 4); + + /* + * Instruction Entry Count + * Each instruction entry is 32 bytes + */ + build_append_int_noprefix(table_data, + (table_instruction_data->len / 32), 4); + + /* Serialization Instruction Entries */ + g_array_append_vals(table_data, table_instruction_data->data, + table_instruction_data->len); + g_array_free(table_instruction_data, TRUE); + + acpi_table_end(linker, &table); +} + /*******************************************************************/ /*******************************************************************/ static int erst_post_load(void *opaque, int version_id) From patchwork Thu Dec 9 17:57:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECD08C433F5 for ; Thu, 9 Dec 2021 18:10:19 +0000 (UTC) Received: from localhost ([::1]:60078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNs2-0000r6-Uf for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:10:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgd-00008D-NB for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:31 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:2254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgS-0002vz-DW for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:31 -0500 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HnbTA010796; Thu, 9 Dec 2021 17:58:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=U4X+kP3CwRScn0nWtv3EslOHKR547J4qOgJuzP/6cSo=; b=uYKWou73mw0MtwBW21Ns5cE9ogJ8PmTOq1/QCuhO274pRC+P9/gSzLqDo2m+x3DnznoT pU2BYTIFs/W2ZmBy7b2mGpLn3Hpujjru7NRTEYjQ/IW41wD3HyOW/YSDz+9I8l8PmONA tPuo56hfz4P1Q3JcjqfxoY5OtCoOpcOUeW0k46oFrOyKjlN+reYf9FHwRCkpifCWcUTq EvmJJxQ9U0TKl1Hr87n+RoMokSXcqUJGadLla8x19UaVjDWoEWVnkuY8XdzE4c11+MLN naeuxK++2Oe9lYwObxo1TI2SYECSgSoWJXZV4lyZ8//inDEnubPJlB/ROruGK3b3hGT2 kw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctua7kqd6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:17 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HpVE8189876; Thu, 9 Dec 2021 17:58:16 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by aserp3030.oracle.com with ESMTP id 3csc4whmjc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZSeUaPYnvddc2yiY3Sfg6waKnFvI7jdp3RiOMk7+7MLY2VoAR3tavpKDRSS99pUUAPLcwxj1SEh9uhGuvFEN9LHvT1xiuHGfGZBxr2vzWFOzzPmrrXfLbgOyYmhkfEFpV2PN4VoldZZP/hgABiQio8w0TICScrXyUr42BW5XpXsfCUSH2AmfqtkhmqogeDyXMizYt3mr/ziVhs4JZ2ze3Ja318DJ+B6Z6HMnGujUWgQ+CqBbigmKvENYLfw/fRLa1ckkSkTnPe9ufWD8KXgcBjAmE6TMREqLnfYXmODt06OH/YNwxVn8/6bfvsevzSPy4PwFsD/33FbeAO4Z5tIKEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U4X+kP3CwRScn0nWtv3EslOHKR547J4qOgJuzP/6cSo=; b=ijNgFWu20+fINakrnBvet1cLCKvVputTvAUnyIXwYqFLGucp2EBIv/BOy7edM2OMLLc+eNZqQGMHv4FgrB3M0LZdUPrONij8rPmtkQdlF4WvVhGmx+Q59Vrlhu9Y5vDGni7A/Pp2Tjp+XNO/Vm00Ui/Ll2Zb0OVZDH8Cvk+tFa2MP4n1Oo634xth2D8MssXdbC5Q9LxlC1xtgWLDb0sys7sebzKVMa5LwnbejVe9frX7F0WOhZPpZbw3H4YHF0GPvLzMLhrNkvY8jz97AFiCUYDv4axw+t2mO7+hsglZsu3EFPqV3ocvR+ios5YFOUBjEbqtIc8cjSitaFFhVZCCng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U4X+kP3CwRScn0nWtv3EslOHKR547J4qOgJuzP/6cSo=; b=naMxiHxZYudTyROZsCPbpXpnGQtQoWoI2gTGWI8ebL7ussYmSZJEnp34yo/f2jPZ5lAMVg5ui4d7bgJQFCN1HWyg2AsZrjo6Hknruate3YsGEt7lpy7SU432qun02IMHe8Kef3qhPHRV/k41NTY2FvcnSqg2pnvBW4CxYp1m30c= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1503.namprd10.prod.outlook.com (2603:10b6:300:22::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:13 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:13 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 07/10] ACPI ERST: create ACPI ERST table for pc/x86 machines Date: Thu, 9 Dec 2021 12:57:32 -0500 Message-Id: <1639072655-19271-8-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 824d5e07-dde3-46d4-6688-08d9bb3d782b X-MS-TrafficTypeDiagnostic: MWHPR10MB1503:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S1OWgpc/o7DbgsL3ICtdYoXIU5ozfXqxRlKYZA8nPZULMbeoQ93ePsyE0U+KjLKVdRDDUBFYCqg3ZkAxsztSbyVrAzRHIGx8odh4wXy2E9oC15ylsj1M6nH4cjMesYBOsmrfsBb4B4hhFhd5fWtzZyOLSZQp8kfWd475Nu9H59dlb7MY7E8sjj/EzUBVlnFi9AEwp8NOLB6txU6nmN6scnzdxkjx2T0Xh3bxc+ToB1hjoquHfxDsiH/ynejad2tkf0gnTuccCMimUr0dN+fJbDGo8xZ0g43d3A82/G0q7Lgeiuo1KOJCCCEIcGVnFGzP01KvAsUoBRaR5cSBpE7iJ5sh4xWJDKniT2ib+s76zlQd3LGFCrZNkbQu6zgMqlx7wa3cbY428aj2is7CxSOohMAeuob6xIfylx2ESbc5oJMeFijDdqdP1ToVjcRT5V4yvKypLa0xxAfFz1H2cScQPAaXXZJxvHGBtWQhE5kB2PU78mBrBMx1NPPpZ1OByojI7xZNwIOkQZxS4cE/pFrTWP8xdGFE96/hRMCwMupIpePey1s/f3SoCrVNA1vwPj7MY5UgDXlaS7RScvsc5ZIPkL2UK6ajvopdUR24pA6kpG8ZV+se9AIJQpi1QLuci29dqGz9amAip3vU8UBOTx8z2V8bjyreSFErd1q7tm1dBwr2Sqha2c/cJwk9E/X7m4QeimFeVXPIPj4HFOzVRT633w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(5660300002)(4326008)(956004)(52116002)(66946007)(38350700002)(8676002)(7696005)(6486002)(107886003)(36756003)(38100700002)(66476007)(26005)(186003)(86362001)(66556008)(508600001)(6666004)(2906002)(8936002)(316002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 99Cqk514g++eic28s9Ev5AN6pLA58H+GHQaX6xxWXDcKHoB4+kPQv2HiFSfQbrnzFx99jTBBsR+/uP7hSodRHo0V+hfjzx4mBxKds1L4bj0yDNV9/l5IykJYHQyTUWUlgSNrpO/4fAeirSW4u7Tf3UJbJsKGIlRHPvE78X0vNznOD03pAg3dCZJAwkXxIKY3uWLTyfC4Fih0d/lmr3l8Dp/Pn3z2EWLrzUoEij17/2rgzg3soG2JbOl38Gikw/Td+Z7FPxfFBChRJdPueA577kAUe1/pVoK7njUQjxyzCHrAiE+z+HGNvuqSSI8o3kw6alynLPYnQuGiS7m0Gh2/zqg9VfyXKLfMcTM7apa8zhfC25PiMq1C2WsTBFbvyk4e/f3NkmMBWswATSyp370aZxDS4nEZIflpcozvvZQGTv2Tk2VjZHQnAr77LgnYbo2djpgp415/nxyAX6Ru11NuZIbOxQ1lVcCkWY1TJ6AprZXTVHkBADb/MskqbFWCOMVAqCGMO9J5MkGzc3c4YYpEsQ4NeuaS/69TcBOaWlGgByuMw+Mwk/gJDjD4yqfT1nqhdTCXOzL9Wy6Nik4gTbTdoWH8Lf8UJNl8rYlYv+kg2qhHO8KXXAuMRw4CLYDWE2UwB9hade/XpjBtfksm3xSnRRoSQAKMPhpjCOJBBUXLFyGreX2AG3up2Sq9x/85OTW68sDwSGGz2jmG1gXIx4WIkQV8UQ4cgnoXyUAmcK1+t7RQL/4dzLSSLiCJn/QXrz1t3oUloqcmHeNEAQe0pc5TwaOJvs2jiFZzJaYV/+zHVy7kIqb0aOtBRFlyfH94D3rKisKHz7ohUey8djHaWIM4euFIemDtFEo2/wYJkvUSM0ThtnhnEzvZECXHlSn0CbvZHDT7GQLTqFo+KiALqOCYQ+kBH7CL5c5SLGYvq23396XfbqXkJ+zJHfmXGP4FvLjbPaFVWpJV3XrmPQCcGakQ7TdKpYhLyaIuRFSuMlZKdUm+SegkjscoSSqY8OPSvw2kQmjXnbB3HJJTKjwsFYMlLLYf/yRAlaBIvu/Ri7d48h8a5OTW6uUMpP5kGuvZNdQT7wNHZyn1Dk323EEuRu9uqnYmsh5jPw7SDkeyKforWhqXLk8phv2go7kYDzdHnHyPk4mbkeFXrb36287UNVmO+oj0t44NMwwzJ6eYDUnJGQdZnHrBKloRoEOVBBdAXV4xa1z18UxPjrCM+sQPWg2dEtb4ssrjsaeryoS23+Rz159+9UIO6MXSNeFRyhbyjCQen2lAeq/xTrn7MHIG4nWqJtZKm6pF+zTxoB4BRYgTymPgoNyZf1aDHURW4WqIXtB36WqLcJwd7cNkNOgVWIxARR+lO3s1lMr2d/ilhMlkColv+ecpDsxk9sqxBmj+4OqI9duU8S9/pj+FbmpyE9v9013pRwFcKsjWvm2fN2+l3VNBRCIc0DHJG4kc6hEVko73DkdegJkawxuv3xF3eTv1cOPCk5LqqZjSQi//6oyn2VLgHKLyyU2M5MuJzj5xNTQnFP76AMtZSMxGXWTrzR+Zx5gtLHxCIgZ4/bT99Uwjn/fVmGbL9TOP609KDrOSKqOdgDeU+mNAMSXA8Rwv5jYoQl6FOFjBhq/BqszJ9lBdz9Sbl8c9R/FWT+3GpJD/3q9bivJmsj/LBNkqQzENaahda6wXoeRxp7pKPVokmRpNOIE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 824d5e07-dde3-46d4-6688-08d9bb3d782b X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:13.4863 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4Knrkcym5ps0qftH/jTnzjPausqmn2qBMYL8AplNFpCGTy20a1s6VrkRmwfrj4ouZQDIItjyWWgPaH7WOE0DXEOU0rJ2YbvR/AoPR1t5JP0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1503 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-ORIG-GUID: VQ00-E7lf3rLwLywlYAUONXAl3IIfU1d X-Proofpoint-GUID: VQ00-E7lf3rLwLywlYAUONXAl3IIfU1d Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change exposes ACPI ERST support for x86 guests. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha --- hw/i386/acpi-build.c | 15 +++++++++++++++ hw/i386/acpi-microvm.c | 15 +++++++++++++++ include/hw/acpi/erst.h | 5 +++++ 3 files changed, 35 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a99c6e4..55bca28 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -43,6 +43,7 @@ #include "sysemu/tpm.h" #include "hw/acpi/tpm.h" #include "hw/acpi/vmgenid.h" +#include "hw/acpi/erst.h" #include "sysemu/tpm_backend.h" #include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" @@ -74,6 +75,8 @@ #include "hw/acpi/hmat.h" #include "hw/acpi/viot.h" +#include CONFIG_DEVICES + /* These are used to size the ACPI tables for -M pc-i440fx-1.7 and * -M pc-i440fx-2.0. Even if the actual amount of AML generated grows * a little bit, there should be plenty of free space since the DSDT @@ -2566,6 +2569,18 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, x86ms->oem_table_id); +#ifdef CONFIG_ACPI_ERST + { + Object *erst_dev; + erst_dev = find_erst_dev(); + if (erst_dev) { + acpi_add_table(table_offsets, tables_blob); + build_erst(tables_blob, tables->linker, erst_dev, + x86ms->oem_id, x86ms->oem_table_id); + } + } +#endif + vmgenid_dev = find_vmgenid_dev(); if (vmgenid_dev) { acpi_add_table(table_offsets, tables_blob); diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c index 196d318..68ca7e7 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -30,6 +30,7 @@ #include "hw/acpi/bios-linker-loader.h" #include "hw/acpi/generic_event_device.h" #include "hw/acpi/utils.h" +#include "hw/acpi/erst.h" #include "hw/i386/fw_cfg.h" #include "hw/i386/microvm.h" #include "hw/pci/pci.h" @@ -40,6 +41,8 @@ #include "acpi-common.h" #include "acpi-microvm.h" +#include CONFIG_DEVICES + static void acpi_dsdt_add_virtio(Aml *scope, MicrovmMachineState *mms) { @@ -207,6 +210,18 @@ static void acpi_build_microvm(AcpiBuildTables *tables, ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, x86ms->oem_table_id); +#ifdef CONFIG_ACPI_ERST + { + Object *erst_dev; + erst_dev = find_erst_dev(); + if (erst_dev) { + acpi_add_table(table_offsets, tables_blob); + build_erst(tables_blob, tables->linker, erst_dev, + x86ms->oem_id, x86ms->oem_table_id); + } + } +#endif + xsdt = tables_blob->len; build_xsdt(tables_blob, tables->linker, table_offsets, x86ms->oem_id, x86ms->oem_table_id); diff --git a/include/hw/acpi/erst.h b/include/hw/acpi/erst.h index 9d63717..b747fe7 100644 --- a/include/hw/acpi/erst.h +++ b/include/hw/acpi/erst.h @@ -16,4 +16,9 @@ void build_erst(GArray *table_data, BIOSLinker *linker, Object *erst_dev, #define TYPE_ACPI_ERST "acpi-erst" +/* returns NULL unless there is exactly one device */ +static inline Object *find_erst_dev(void) +{ + return object_resolve_path_type("", TYPE_ACPI_ERST, NULL); +} #endif From patchwork Thu Dec 9 17:57:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668031 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 050B4C433EF for ; Thu, 9 Dec 2021 18:03:59 +0000 (UTC) Received: from localhost ([::1]:46184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNlt-0008Sk-VW for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:03:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgT-0008Ad-Oe for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:22 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:37534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgR-0002vi-Cy for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:21 -0500 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HnCA2007294; Thu, 9 Dec 2021 17:58:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=f2RnzeVRWCb+CCSMHzVlm1UuJbGX9qqDwVEw1Vvr8KA=; b=nWXispT+qErP8QZre6qqYQ+kdWip6vJQA1/FFEcxxx7mAkhJkASLFfHOR25gbt7YSVYT jvnG+xCz2MhK9PEur3N0eXJePTAdbvyW64IAyXxNEvdLIYoDaNR5HRN+BBZkA40UluzQ /htrPuV5g8kjh+ZiZMERQj2xWNa+XjAA92hK0CCPknZWVAp95XbqECUHlU6IRAHam4T6 9ovJUOuY3xV85ytY3Na/BJPlpafR2PcRHxfKCpKfny4I3JYF7+0GTZLccUaIp5Y4pIwM AabV/MLsJ0d5ZWQMpMIBkTovsRSu/xnCoefcvD4wE9PJFx80Gm0RDzUioQ/zCiLS+e8q eA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctt9muxn3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:17 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HpVEA189876; Thu, 9 Dec 2021 17:58:17 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by aserp3030.oracle.com with ESMTP id 3csc4whmjc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hEBOJC9UwFglwdWQF5ci2+B35yprWOzPRey340Cw8OUFvyKxDvcRY1in7f3fJVL4YL3L1mhZN/M0qY5WYF8TloqQwuXUHYH5OjrOTqNWEgg9t/zvheQHA3nExi+zS7yNshIJKpB9HB/9SzRJzkzlCzmT58TuJAXD16SUg64eKogar5JfL6T04ma+P7plfl5o1J13oA/OJh0ZgYLaHXMU29fxdgSGUQ8lLFl3z+9JpKwZA9qDlKwMgBLq3Pd9Ynei6GsVLSkqmOS1O/Wnys0xJc3RNHBE17YEQo5YqufkpiuRQUnNF91eDcxwKFxqqVCpTiU2xetdbPglimrYrUdmbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f2RnzeVRWCb+CCSMHzVlm1UuJbGX9qqDwVEw1Vvr8KA=; b=L41ls5dwHaUL8QCfNC4BpWCt/CBPexGcZ8/gICPkf8Lrx93yaS412ZUt9L9mqKSomNC08HEmaF8JS3fHKaYkoavnaTr8a6CAJ4icyImFb1NeHcbHyzIfN0qnxoEjZd9hcU6xK14lbit687bPs8ZR2MtOhUPW1apwKfMHHhBGJK6gYcNZ8VhMlb1vrV96dPDtlZ+wdptsPmeUmF9FLcHnRW1OLma4E8c6hCponBy3/auvDRLXIyjtfIPzaP1sPk1LJUZtF6RXP6nMaUWIvXCrs9IBJX7iyn9HKo05vW/z2BVfPS25qLRvqXkmsep/4S8rwExT/YxQ6zY4CUv0aDjlSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f2RnzeVRWCb+CCSMHzVlm1UuJbGX9qqDwVEw1Vvr8KA=; b=IqTTAEoYxpuEleF+eNUle70PrJrjNboNUEqCJanbWtOJZdavicky7wUUFojG6RXSRmWln4AIC6e7Q0qRRQ7tFjgIuZCKslgCR9S90CCQHcymrBRJttQiJou2iFmLBTNwqE/mCgyfxw/jzGLOqBUphHZYCan16cbDQVuBvg2YsdA= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1503.namprd10.prod.outlook.com (2603:10b6:300:22::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:15 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:15 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 08/10] ACPI ERST: qtest for ERST Date: Thu, 9 Dec 2021 12:57:33 -0500 Message-Id: <1639072655-19271-9-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d428d65-1998-4b40-ff6f-08d9bb3d7933 X-MS-TrafficTypeDiagnostic: MWHPR10MB1503:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:644; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eZj8HNTCmLgLnx37rxW9VyehnWhyvqgUED7G6UAxboy+lRtwAvThX0vdKIBM3PesBvSG+nQiSmcN+8s6/VHyt2hgHsBXi8VxXZQqqXiPB5asQflIhp4HTCdL77H/vhV768epqpNMCltjViFYCiHr92WzGR3N08NaPI3bkb61lWrij+lH8HfEOtRuRO1SnbjBnDLzn74AjLi36IxNy2LJfDLR45SLPW7po5L6gexvi2yoTRNNIWnVZ2HhEcVvHCsw8bGJYiWre5ymiyd5TncaaQ1iptp517bi2HCQ1D6R3ULRyKQkk87nfN4XYhlM9NrwAi6gYDzT0tAyL/pzJ1muCoJP6I82+x0Xqm5ZSTxLsA0WqlNyZffBdp0wYnBaXcZDl+r7TOMqQk6Qsg3oyMAJl4RfLzygLVzsrk8XP/Ny/RAeTdoY9jr8zitORbO080JPbUp/BJtYSoWwfZYrcY8Bmv0thRGs4ZBijVWfxFKWL5TBdY1CE9Yc8X+PaCbQqU+exj0ifNY8eKCm104gkRsH1zTcTFjRQ7IsxYzOJGGonb2xKU/BQre3xacFweT1jKSnuxsc374kiXJ7gOfylMEpJhkyJSQi/0D3FQpDD/x0/OGAoaVte2YTGZeBb/U4Uv4O5d0wnxAq/mCcZqCdwPw5HXSBzfpqMSZmdpcng7s4phc8zZ1szGVhLVVvE2A6pOGsizSY2S+cVmVnzy/MDBQlpg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(5660300002)(4326008)(956004)(52116002)(66946007)(38350700002)(8676002)(7696005)(6486002)(83380400001)(107886003)(36756003)(38100700002)(66476007)(26005)(186003)(86362001)(66556008)(508600001)(6666004)(2906002)(8936002)(316002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y7+GuPrnxt803icaBFDmDOQSwEdnAk9s+DOnis2YaZYPXkjmpnSmRNUSspLwSGX0WEPbZazG2W+kL+UIyqwYjgOoKG7AWnj59r2dvCib+hcyFpuhiAPMBuM4gvAOP9eoJyrql8oq+lyJtWAbc44ho0gDUWiPOIBbNyDvnqNcwlaCQhC01pio7Xr1T46rGFtBOnY+uDiHkatefGVQcwScFEFfnAaGNp6x3vxJZvO850mrqG7UXxjDHBkngb98zS+7zSL1U5k4ur37QavRh9S3BXCRVL0NM1Ao0fML09PAHB519vQD5W4zWc8zKhPYBCd+jrUftZ0pl3eTwT5zlYKU7H+dsxpJ5YkVhoLwWt8YJgZWjzk4riMP2w01FHUZ4g+Y0CcQ1b5DXHXZwmeINV0cU02LBh+/v44WQcWCDK55cE1cEAT7okFF2MBJIEocF6jfR/EWpVo0NlKF9bsr+6Ji8NM77+vnYhTluS2IA75U8AWsjvWkaycdAN2fAWCtVQe0Cf/DoyGLogyfdaon25CbdHdMXrg941SyFe6veVWW3figxz821CZrWYFW1qw187mBHKH25UuhfnuYGdyBJPf9wcogTBfj8+5r2DsTX0Hz5X+YMNaMT7V8mMgsj98osY5OgSCxv4Pjw3hbwaqW88M/NbkZ2RV7D8INaUHwogu7ZG2yOfDVxLEXMqXIxn/DqwPK/lwUoyK72HdtS0GDJl2Bs/yK8erUk8fcm+q/YuZ8TyUcWrHVxKgx048G86sMdcC9UQFEe6X1DpPabN0HTmn3lrx3DRT0hxJw0OPActjEbasdwfhE2Thk1XaCmQP84ASttc4CzGscXRjjDvUzYJOaXBTvDJ9hC+pKogPjCNWJLWdzieZr4x/DRCFktwSFj+WKOs8chOjhbvXFd1S9BWkMfhrIx0QQFErBk3I75FqJNOlafPJUp41BqNQFKyOnjgTg5wNlJNx7207BUtrhTzCcbp9Dr42BIR0FPjoeBube7JeCa0fPA1+mTwia3b0BmSAZlE4GJyqITujsgrvHqpM2Qc68DP7sF5rWrGzBABSpo22Wi157hDjg1jb4Taien65c5TIC+CF+/Mutpvj0glSJnsdUuDy2HuuvI9SVIeZ8zesunz1YAo8CXO3SewqIKRAoZ7e5WEG4kOWUJBovOViER6m72ItaDRDH6OrFLyQXwi7VQdxbHwSYQs/hp511gDV23SbbiC5NwQa8SW1IPrn8DIRXJBbHHM7tszI1swGaer4Pxu5PnQBEReR5EP/Zd8quyo0AJbdh2XA3XjqJ4ODN0wf2Tm8ds93XCy0eiM3T4TR5Id5XZTSw6fAHmZM6JZRChPG8dgQw+rRQ4/25QOSvXXpJRPIvMzZF4j0OdqPZP5ki6+k77dQrUTpUlfPzFlt7H60FFmEDvdv7r5yddGFDMooIX6OiA4Gxlx4GyZI98+9A/Mmz6oBoFsFsO0wlINAYUPE7a/s1sDA4YgnDcZfMnhZuqMYTTUZ+MfyV5IJPxyW9/weCV2/oszJpx1nG///hwVKk39qD4wgZHJ0LtiH8OpDb98mUaGYqVU5kSvcWDp7VmG7+3l2QU94ynnRqHjiv8y83+6kAU7hgbHTjBQfWr6vtfJUL0MtZNs8hvhbdpblsMft9qoG1Ndb/RHI0v4af8AwMFaV8KcnkoecY/zm4xmr2UmnfdkdE7wInBs2OhcE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d428d65-1998-4b40-ff6f-08d9bb3d7933 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:15.1891 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TS+Yrvz+okZm6o1rPiMSPqWENlvzIBgQe9ca7BLCouKFWChMXclZDbqWryK23d9S3n2XtOuR+YoTVgdfmXlZOZI8SieFt0TzEkZDBizN5uI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1503 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-GUID: 3D2p4BV7UZKSATpLyepRw4k1G43hU6Xw X-Proofpoint-ORIG-GUID: 3D2p4BV7UZKSATpLyepRw4k1G43hU6Xw Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change provides a qtest that locates and then does a simple interrogation of the ERST feature within the guest. Signed-off-by: Eric DeVolder --- tests/qtest/erst-test.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/qtest/meson.build | 2 + 2 files changed, 169 insertions(+) create mode 100644 tests/qtest/erst-test.c diff --git a/tests/qtest/erst-test.c b/tests/qtest/erst-test.c new file mode 100644 index 0000000..370c119 --- /dev/null +++ b/tests/qtest/erst-test.c @@ -0,0 +1,167 @@ +/* + * QTest testcase for acpi-erst + * + * Copyright (c) 2021 Oracle + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include +#include "libqos/libqos-pc.h" +#include "libqos/libqtest.h" +#include "qemu-common.h" + +static void save_fn(QPCIDevice *dev, int devfn, void *data) +{ + QPCIDevice **pdev = (QPCIDevice **) data; + + *pdev = dev; +} + +static QPCIDevice *get_device(QPCIBus *pcibus) +{ + QPCIDevice *dev; + + dev = NULL; + qpci_device_foreach(pcibus, 0x1b36, 0x0012, save_fn, &dev); + g_assert(dev != NULL); + + return dev; +} + +typedef struct _ERSTState { + QOSState *qs; + QPCIBar reg_bar, mem_bar; + uint64_t reg_barsize, mem_barsize; + QPCIDevice *dev; +} ERSTState; + +#define ACTION 0 +#define VALUE 8 + +static const char *reg2str(unsigned reg) +{ + switch (reg) { + case 0: + return "ACTION"; + case 8: + return "VALUE"; + default: + return NULL; + } +} + +static inline uint32_t in_reg32(ERSTState *s, unsigned reg) +{ + const char *name = reg2str(reg); + uint32_t res; + + res = qpci_io_readl(s->dev, s->reg_bar, reg); + g_test_message("*%s -> %08x", name, res); + + return res; +} + +static inline uint64_t in_reg64(ERSTState *s, unsigned reg) +{ + const char *name = reg2str(reg); + uint64_t res; + + res = qpci_io_readq(s->dev, s->reg_bar, reg); + g_test_message("*%s -> %016llx", name, (unsigned long long)res); + + return res; +} + +static inline void out_reg32(ERSTState *s, unsigned reg, uint32_t v) +{ + const char *name = reg2str(reg); + + g_test_message("%08x -> *%s", v, name); + qpci_io_writel(s->dev, s->reg_bar, reg, v); +} + +static inline void out_reg64(ERSTState *s, unsigned reg, uint64_t v) +{ + const char *name = reg2str(reg); + + g_test_message("%016llx -> *%s", (unsigned long long)v, name); + qpci_io_writeq(s->dev, s->reg_bar, reg, v); +} + +static void cleanup_vm(ERSTState *s) +{ + g_free(s->dev); + qtest_shutdown(s->qs); +} + +static void setup_vm_cmd(ERSTState *s, const char *cmd) +{ + const char *arch = qtest_get_arch(); + + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + s->qs = qtest_pc_boot(cmd); + } else { + g_printerr("erst-test tests are only available on x86\n"); + exit(EXIT_FAILURE); + } + s->dev = get_device(s->qs->pcibus); + + s->reg_bar = qpci_iomap(s->dev, 0, &s->reg_barsize); + g_assert_cmpuint(s->reg_barsize, ==, 16); + + s->mem_bar = qpci_iomap(s->dev, 1, &s->mem_barsize); + g_assert_cmpuint(s->mem_barsize, ==, 0x2000); + + qpci_device_enable(s->dev); +} + +static void test_acpi_erst_basic(void) +{ + ERSTState state; + uint64_t log_address_range; + uint64_t log_address_length; + uint32_t log_address_attr; + + setup_vm_cmd(&state, + "-object memory-backend-file," + "mem-path=acpi-erst.XXXXXX," + "size=64K," + "share=on," + "id=nvram " + "-device acpi-erst," + "memdev=nvram"); + + out_reg32(&state, ACTION, 0xD); + log_address_range = in_reg64(&state, VALUE); + out_reg32(&state, ACTION, 0xE); + log_address_length = in_reg64(&state, VALUE); + out_reg32(&state, ACTION, 0xF); + log_address_attr = in_reg32(&state, VALUE); + + /* Check log_address_range is not 0, ~0 or base */ + g_assert_cmpuint(log_address_range, !=, 0ULL); + g_assert_cmpuint(log_address_range, !=, ~0ULL); + g_assert_cmpuint(log_address_range, !=, state.reg_bar.addr); + g_assert_cmpuint(log_address_range, ==, state.mem_bar.addr); + + /* Check log_address_length is bar1_size */ + g_assert_cmpuint(log_address_length, ==, state.mem_barsize); + + /* Check log_address_attr is 0 */ + g_assert_cmpuint(log_address_attr, ==, 0); + + cleanup_vm(&state); +} + +int main(int argc, char **argv) +{ + int ret; + + g_test_init(&argc, &argv, NULL); + qtest_add_func("/acpi-erst/basic", test_acpi_erst_basic); + ret = g_test_run(); + return ret; +} diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index c9d8458..4b01c22 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -68,6 +68,7 @@ qtests_i386 = \ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \ (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \ (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \ + (config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + \ (unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ qtests_pci + \ ['fdc-test', @@ -246,6 +247,7 @@ qtests = { 'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'], 'cdrom-test': files('boot-sector.c'), 'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1, + 'erst-test': files('erst-test.c'), 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], 'migration-test': files('migration-helpers.c'), 'pxe-test': files('boot-sector.c'), From patchwork Thu Dec 9 17:57:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668033 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 622A0C433F5 for ; Thu, 9 Dec 2021 18:04:05 +0000 (UTC) Received: from localhost ([::1]:46902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNm0-0000U7-Ex for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:04:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgV-0008CS-Rh for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:23 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:42868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgU-0002wS-4K for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:23 -0500 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HnBjU019883; Thu, 9 Dec 2021 17:58:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=SfvJCp/7ima11pfl07B0iZGcklh+t4Q1+Pxy6cp8HDE=; b=X3dP2Yxzg+o2q5kK/g6JJ2HwBSHb7MNM9xal7/GEiZdITuUl8xZSQdj0S80zmFAQDBYW OZhunzJD+0Q38TjYwh6gUPaEu5fSF74RmE1ACIyswhU1dv0YPXYMlwdeO8fOFfXGaDEh gNJpEvXa2nU70UlZqhDxlHyasdu2jBglua+MaNiWmIHTruMmcMuKrULd0RI42pcSwJCG aJi76k3T8OY9n/+bvBPVe3WZrdKqb0kzpgikaBNkiHu6Uo6+baM/NZfsQBw9vSifaG89 qsiZB9sNYdfVnZGi2o7PK877WCVPBOUdwnySUBry7NHgB4kxT8a17RbOi3yf3ubzuz/+ Wg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctu96uv1e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:20 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HomcG119673; Thu, 9 Dec 2021 17:58:19 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2048.outbound.protection.outlook.com [104.47.66.48]) by userp3020.oracle.com with ESMTP id 3cr1ssvdpp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dUUT/N4GcDrLNd/Utmjws5btlJRhuKpWd6CcQjogdGGWNhIYdW+HGuVv7RxZxQZ+UehkZoNQBBKGH6EN17AenQ55tARCDkZAEztZU5L0ByvhSlipbGziGhbbCz9So3AtXbieGaw9HC6ql3ghUaDGFSg++0/5lQ8NGp8EiEO36rZ1zvCwJ0x+2mh+HN2w6ITVj5uwVZiQPqolB0WYB7xeFoV6LvtKJ7ZmjmGfsM74AqdHlYdyJFQFWX2ftldXP/NtaeRExyewaKSY5Kp1Sjz3hY3YsCrIbumP+R+TJ+p62EvtwnshqMnjdf+XmtWBQNNzpDkNCgpSClIeSK4bgm5mXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SfvJCp/7ima11pfl07B0iZGcklh+t4Q1+Pxy6cp8HDE=; b=iFBqEBSGb8Kl6IDgTrin9JiN3VDmmYFr+bmX1T7sN9ephxMYKRRe4to0fv+kfM7mjUwNBbUSmzo3ZaWk0VVBS3omvZ45oQV9uNCuss338AzBpMsSy44+Rxq8lMX0OGM7onn0MXVgfzffvZ4o3FruhqycOu7oq8lPHNS/fm6Bc7psV/LN+E4w91r2T0NIZ5wQ4wa2RBuGlGyMphoC8RAE/1GKgDYDnRDQEYvdvSpyYh7Yjy98iY1eyX0VOaHwPuQRd1142xFlxEWw79De8PUkaVwvDsEFQd0O/K+59mMZBLDQqFU6NkrKsSBiSNzmSmF7t82DsbKeVx1OTszLaRuEXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SfvJCp/7ima11pfl07B0iZGcklh+t4Q1+Pxy6cp8HDE=; b=B8v+GSRFNcl5Mmct3WGyHXsjVnNKT4CQFM0INdC6qn/d6bfkoH4KjVbCzwECwW62K+WYApK+tUich5VuYmrhA5IRS8+dpLMBeBy9uQxs+HxlqlBlx1Ouh/U7NugqJHsMeKnDUA/GBjZl1Kep6wAqfuF1uHYZoPY8Mr4QPqzy7a0= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1503.namprd10.prod.outlook.com (2603:10b6:300:22::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:17 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:17 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 09/10] ACPI ERST: bios-tables-test testcase Date: Thu, 9 Dec 2021 12:57:34 -0500 Message-Id: <1639072655-19271-10-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5ac2c80-ad1e-44e8-f33e-08d9bb3d7a7a X-MS-TrafficTypeDiagnostic: MWHPR10MB1503:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:415; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z293uyyY94u6y1ZsYvPh6Umu4L9PNwJofP6Cccl8GrfQZ0j1aw009rEQFcoAv+txL0MbhnoRWvFmJPgFgAfBdMkoxdoqYwrVf2lrWZK2de0G7aAUZIPISl7VJI7PHuvrCgOY408e1WzUW/3XZD+sSYw6qmpKikx7Nb0CSh9PwtsufyPERfk6b1aCV+t+hWDa5eoJrssUK673M322pp0H3rDr/YH1DxqCGc+XrpDBFbzLiA1oMxHC7x+80hSWWVpisI3jq9SSBD3pCvWp1AXo4zKWBsTHsym5LbQ/UFn+CgXsbF12uE0Lvs2ydZ22PasrREhwSLO71alX0Z7hyxvrNJbusBTykZNys0Ezd4HJdmxUiXZiSBh7ZlT8jLELOalMat+y46GfuPJhAij396y1V/yBZlU77wpPfijULKZs7az51Xgd00vC1GsQ75RA4qi31x9ei0Jna/Aw3j2P4cH6ReXfLfnkZDaDKOEudd0mh7gPLsFPD51EiXspQDwnBdc5UVOmiedyTTRt7bwj0RlyClpg8mPXQcOiCHokHjsznI+TK5lfyo56A5TZ4kXECTbuiH1202exN4thq1lZUyj12x5vF/F2YEZHQpjLnp4QtK77Kdm4vG/IL+pnu6z4OQnEzyExM3yNpFlWXVnmcuaxxdx47bbcGv+5q0IXTIgkVhaRyBbNmoDaOG1AlDGjSpm6W1Sg4qPKUmBQgdXL3DKEEA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(5660300002)(4326008)(956004)(52116002)(66946007)(38350700002)(8676002)(7696005)(6486002)(107886003)(36756003)(38100700002)(66476007)(26005)(186003)(86362001)(66556008)(508600001)(6666004)(2906002)(8936002)(316002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qasss0nlMDXhbN2ZaH2lqV+V+10GLpMffpcjMrLk2wqRaOi3U6YPGRuSl86AObpK6o5KLO/wEhRG6blSDYrH3BJcLffAdmFeWOW8q9F4o8z7CEqLjQHyqR0Pm2l311Et0/eeXpj1YIdG16r9rmKixxun93fXOpIm5G3N83guoxolhdeSQAGeTh3I7O+LP7HCNZk8JEfAJntaUe56oXZjzgXK02yuxqACeNSpweYqt9J9BwfS/rm+S+rrM55V9rqsqcFWiXNvQsLKgXhwCsjjgh6uREXnrDA95u69F+ODOiAusuor3JKek9gQz0aRS5onv67/gXp4Jm9uJiWqrlrqbjNVxGLYs6Ph4vjSalNiatJ9zY5a0fQjEOgVkXeo8E2ttQZ30LuZ7Q3qFcObH3VGEok26tTiPVRRPtHuwJMvs+44Df+523sWeAiWiZGyOVCtfujNj2t6XOJDaWDNE+BJ9tT8ZujUieaEdZNeoCTnwKudnzOLDvRxo92WOGWtK/pBsy+8RaA4Cw1S+PUekEkqBEPb1EjXWqE9BeYZfAjGLRXqCk3FosgcNinnScj7mTzq/N/1jyR9Q3KGdd2fTb2Qn7TIzcW6Tk1hj+AD5C2zeJJaMBbPR0cEnWWhAyZjHKyayyt7oW0VVCdy1yEVI7LM88y7/Zu7YcdvqIfdXZ12pGb7oEotZOS4lDEffK4CI0MY3ZB+IdLOwyTGh+vV5ZZoI1Duk0YYMbZCppiEay4cRU9nXOiA8hAXX2Nu9Kis7bFkxjY8MrqyH3ONCdutmkejuBWSZymBik4i/WnFJRt9Xiv6DrAEByZ1UCqGfhsB4ciHqBg4A9wcHpNC3ad5SYiUs6EqQJoP3HN/o9dNczQ8OHy/omxdoSNyFmlOQZBRPreGvpWZ86+eheIbbT5ypgDqJrRXasOasGQQbXOhJlLXC9oyj5eZTUQapsG11sUqYEXR78iQ26is0z/LNjl4ZaiAspFzZYNIB4akGVxM5ZL+R8mcfkP6JEDjYjXLAcqxwOwOX2YCY4HblyEjtYRC+VLpKQvhzjdnqoBKlLthfDWb5M89xb9Q1dNUJY1ds0YDZiYBV1gAoPKj3+mLMZWgmZz7GJMA4cjH7n2nnDVB8Pw6Hbghy2yodptznm+i47D/oZwUOrVyLIs1S4rP286k6LIAKXKq8k1UVB09hfiV17Jd/VB/uZM20HaBFKn3355zZf7M0aKIbFW6AyOTTRaEzLGb37YstMkT+jOdexZ1lFGE6MsA6s2gM5+NANFCPSuCfcuV6P6uJmf96X17XJUEhM407ovxSbkkAHeBsAO398Z9uMVEGAdT1zsMRfbSc5Vr3J1Yf+R58v0WlOsOfWrYbhm05jHqlyS4zXf5YZqlgHn3dAZbuWijMA3VG4J5o9B/wCuOvhsZCmlWOxK5MusjDmxsB7pieXTtRzqW07iBzS1yniLuP8K5dErH51OIuLO/Vq7uS40zk6se0E9SMDUhuNWrqbY6+GUXzzUJar4qZXVJ1kkf6kWZhKqWJTX5k0GnZZdQCt8ezE2r/mdvCTamKDJb94dznUbrOnathrdd+2yku853qeQWJmrhJ3XvTklQyr3sBbNazFQSTnyOH5nUskgJqeeW4q9/7shRMdFdkD5f98gOOg1iPowJ/Yjdhm2b8aza13mIuodF71XWX7PiAb2/jYh0ngznah3r1Ld+ZG4KzBU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5ac2c80-ad1e-44e8-f33e-08d9bb3d7a7a X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:17.3475 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /RYEuCivLY3vdcc1PiO3Z8P3kqa6qUn2Ex+GzI0pqrBPuS+fYtdQEy4/Gmi6/3m+dcO1R9Y6aS76nCq1p9Ejfi17Ubky13Odazdokoh3QAo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1503 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=934 mlxscore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-GUID: aEY3S4GR_tNwtjsP95pZPQwRnRRULtAX X-Proofpoint-ORIG-GUID: aEY3S4GR_tNwtjsP95pZPQwRnRRULtAX Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change implements the test suite checks for the ERST table. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha --- tests/qtest/bios-tables-test.c | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 2588741..2f073e6 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1446,6 +1446,57 @@ static void test_acpi_piix4_tcg_acpi_hmat(void) test_acpi_tcg_acpi_hmat(MACHINE_PC); } +static void test_acpi_erst(const char *machine) +{ + gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL); + gchar *params; + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = machine; + data.variant = ".acpierst"; + params = g_strdup_printf( + " -object memory-backend-file,id=erstnvram," + "mem-path=%s,size=0x10000,share=on" + " -device acpi-erst,memdev=erstnvram", tmp_path); + test_acpi_one(params, &data); + free_test_data(&data); + g_free(params); + g_assert(g_rmdir(tmp_path) == 0); + g_free(tmp_path); +} + +static void test_acpi_piix4_acpi_erst(void) +{ + test_acpi_erst(MACHINE_PC); +} + +static void test_acpi_q35_acpi_erst(void) +{ + test_acpi_erst(MACHINE_Q35); +} + +static void test_acpi_microvm_acpi_erst(void) +{ + gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL); + gchar *params; + test_data data; + + test_acpi_microvm_prepare(&data); + data.variant = ".pcie"; + data.tcg_only = true; /* need constant host-phys-bits */ + params = g_strdup_printf(" -machine microvm," + "acpi=on,ioapic2=off,rtc=off,pcie=on" + " -object memory-backend-file,id=erstnvram," + "mem-path=%s,size=0x10000,share=on" + " -device acpi-erst,memdev=erstnvram", tmp_path); + test_acpi_one(params, &data); + g_free(params); + g_assert(g_rmdir(tmp_path) == 0); + g_free(tmp_path); + free_test_data(&data); +} + static void test_acpi_virt_tcg(void) { test_data data = { @@ -1624,6 +1675,8 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm); qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hmat); qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat); + qtest_add_func("acpi/piix4/acpierst", test_acpi_piix4_acpi_erst); + qtest_add_func("acpi/q35/acpierst", test_acpi_q35_acpi_erst); qtest_add_func("acpi/microvm", test_acpi_microvm_tcg); qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb_tcg); qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc_tcg); @@ -1639,6 +1692,9 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/kvm/xapic", test_acpi_q35_kvm_xapic); qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar); } + if (strcmp(arch, "x86_64") == 0) { + qtest_add_func("acpi/microvm/acpierst", test_acpi_microvm_acpi_erst); + } } else if (strcmp(arch, "aarch64") == 0) { if (has_tcg) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); From patchwork Thu Dec 9 17:57:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12668039 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30190C433EF for ; Thu, 9 Dec 2021 18:07:52 +0000 (UTC) Received: from localhost ([::1]:54478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvNpf-0005a8-3D for qemu-devel@archiver.kernel.org; Thu, 09 Dec 2021 13:07:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgh-0000Kk-1B for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:35 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:21668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvNgc-00033c-OW for qemu-devel@nongnu.org; Thu, 09 Dec 2021 12:58:34 -0500 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B9Hfjvm028298; Thu, 9 Dec 2021 17:58:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=WEhbo6JhI8teBzguE/uXGDbztcnVPYxZmVXAS/fx+bU=; b=FdbZpxjXtF1A7h7V+sCPzYaPbw1uEmql8nmltniwRQJuNFa+FWEqNRj8mwZ5Ig4SanZu j6//Gbp+32vQ24V1Z8IReZu7BEdfGIDQx8opJy/Dets4bix1xzMijTYgvmiLs4x+kjzh 4s00WsP02K6gIYoBIyFZm9T2Kj7EYqDs1A8MSO1PZlf7cmTUR23cGadjeUxg07bhROQL mWdnBHp6j1Z6P1TxCPngbQqy4EPnxzIcXU3t6IOj4Tek0Nd26oIYbB96hztym53qiOwg es875hjWihh5R08gWIQpoyscRC0Q1MSJE6KQjVMwiyv7pTnOxbCX0eLn86YSs2Slq7F1 8w== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3ctse1m2v5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:27 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B9HonBB119771; Thu, 9 Dec 2021 17:58:26 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2046.outbound.protection.outlook.com [104.47.66.46]) by userp3020.oracle.com with ESMTP id 3cr1ssvdsc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Dec 2021 17:58:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eeM5jRxN99GX/k/HSNp/FK5RGfelBhMvW6o8D6Fdyif0gTwHeX6IgouSleFYgu+Fe9wRqMaus1+zDdtnZnwtyfPZl8xKV2J3Fxn6YJb+FPlJEF3xKnFwtwnW/4a/HxvnPtAlNm9X+TPvGe3IWUB26KkBHsZg74M+HiN9VhxpLyaF/3bHv2UfwS6xj1WapeUaz6KEN4VhDSbHlupdtcym9dO+2YwlHVEagtFEm0wzri9A2JFzIVuTvD/qGNMtuS7yTWMZPfodzrXKjFnh/04Hoem88NF10A4+QGLEcdlFD9YNjb/c883TtDYnNyvZerA3MvtMztB5lnwUNkG4QGQyMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WEhbo6JhI8teBzguE/uXGDbztcnVPYxZmVXAS/fx+bU=; b=BOT5PUVRrG8a0sNMW0bWREY/egV8tRsatXsa5K9badZNeN1G6XRb0T7LEwpkH3jy/Uvyk/mR7OCK1/2HS2wgY1bCsqPL6pjVNlocB1OFYN+DFQZGS4M9lmDoVuIhlLRi56WgXGxiUWuMd7v9N4FGAsWTkor7+sTP1m+Hr8xpq2rSbSq8A5tgPITg5XPTTN6KrE3GeelHBKoo3qFCokmtErDYrBONBMzr7qwO0M90FklbK2vQVm8yI0ctmYiNLM9/1+D7TyiqGNSgEV6W1y44WEKyPvYgGho1GPvqzPr1JPf1kbmuX6WXC/sB7l1XAQeyD3r6Xh5MR3gtaztHtRV4QA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WEhbo6JhI8teBzguE/uXGDbztcnVPYxZmVXAS/fx+bU=; b=RCiNv3SHUO5PGUKLqPfdeuVWZE9ow6Hmt8O4wRUjo5tZWbfujYsFSyuD3JbsHNB7aHaNufQpNhg+v1FaWcD6w42KuD7B1JN/QLvAAaOrQWDfY4w4AHsseMcL1Nt93Bm7hW/D1hAz3P/ZhJcWuQ+BNPWW2GaQuANfqixKVWlbXNA= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1503.namprd10.prod.outlook.com (2603:10b6:300:22::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:58:19 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::143c:ea64:7017:19f%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 17:58:19 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v10 10/10] ACPI ERST: step 6 of bios-tables-test.c Date: Thu, 9 Dec 2021 12:57:35 -0500 Message-Id: <1639072655-19271-11-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> References: <1639072655-19271-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by SN7PR04CA0073.namprd04.prod.outlook.com (2603:10b6:806:121::18) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:58:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d01ff0bd-9143-404b-c776-08d9bb3d7bb5 X-MS-TrafficTypeDiagnostic: MWHPR10MB1503:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:177; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aTgAcTmSxLB13fNlKC9uKpJv1BwP+h21V0tIsthfKiNyfUcJjFmLmBHdWSosADTZ2y0McUMmqjNg6+2ymAww3JU+9FZ/yohSGe4Dl1ZjbQUuKCqUeQctumfBTlDYIC9fXpjaDA09H5RMcKhxc++5oBN6mpbWQnZ5qasiZsTjn4BSh43WGknCkuTxTxNw08a9xK0NaSEZw09zFeLkng3H5bf50njHuQDB7WmGnI/e7uY823zP8IU9PzkfWnGCIAz5GppjUC/bMtX9iuR88fTEmAnu7kkX8hqRq/CMGWnVpLM3WJdhcKVV9jXArdt60Tvmt/rm5u7Q23oE9iturhP3HpAlHV3wZMVi30k3lIagJZVoVUXAPjKWHHz8wc3wPT3lFInxlazvYGT22BTs55IMePnllkyRTPv+LynMDXw2Q6+NBPngAhU4JyR3i2T/c6bZeT4hCahfaiIZRyyIEtAfwqzIF3LfLF3rCM4zpKr9SkGCoJnXAF6W2CC7r2y30olHDjhcH/rJygUI3l/vh8PoY9uRLPdaMMsHVKmZkC3p7WCXF/u+akzeuLydti1Mv86ZD5Jx2w/KCz5guE3tSzInwstKyvftSEEXIpJJ6Dvpp9ovjIGEuzOwT5vzM8K8U/6vfHDAPsPqR3KFHksT2KpZBHj+tnsR2WsbiU6igwxlNm1ayKTKt3ngRu5FI9ZGNmEoid8REsdx7N9/GkVx9/Si0g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(5660300002)(4326008)(956004)(52116002)(66946007)(38350700002)(8676002)(7696005)(6486002)(83380400001)(107886003)(36756003)(38100700002)(66476007)(26005)(186003)(86362001)(66556008)(508600001)(6666004)(30864003)(2906002)(8936002)(316002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YseFM83FUN6PIB9BA+M4cbmX6RZGE9nKDPg3SmKjDyegxGwbX/h+JtE8VfO4D0HYg8R/rR4HAfhs3DbtfkDov3O+acSEMCpgTQK4vqzC2XNKUKm81lH35n/Do3RWOQR7mopr7/4cOsuZG2WisoydT8LicGlNLwnDzd43rMNHb+kI5NsD5+B0YvY9L1gOVzYZZzgOo9hvFB4o6cO1ihrD9HKCy7IV8EqatddM7A3R4EJJ+wsMjsWhSsRvZuWBxIDS2sfY9TCmCKSVOZcrGNZEPzzItfkYzTF2olvVnQq79f/H4L014pz29g4z1qBoeHcW+IE4mxDnZdjZLEYt0rcURyTJvYkMqXyijvdjdsgA5fKS74D/RZNe5PO3dD6xNM5jeQGndP7vFfcGHotb6jnxp21GtOqGPQx+Xt26uS+syGVXb3fEbkgu1rVtE6pAkzdz9piZYDzCjHUrH9YdvRjG8G6fJ3mSfGYQwIX/oeUyjQlw/ATTw9S4ysLiL20kPYOSomY2YGtZO52Bfyn8PGwMJ6enbqqMuLqHbT2HAlGy2UNNbNODuDEHZQPKtPJftmxMxWXUeaPVfGQSmNPILFDqvBru8grtHFrxhNruNpl2F4JWoyR/NP8eqM7kYUl2CQwXTC1O/JFkIe5twOnURBb3penPQs4GNTPshO/etWq86lTjwx/xVXxnuinj43mkwrePORLZZt7GOCMQhpVT7wsTLGQn289McAMSFsdsICqj5tu3gPRWnmiSg+Rd/2WWsAvs/40b97eG90Yexr2cVz1vcgEfAkuFwCX+FEuU5qW2fArXefqZUkXPKn5+XKwvolveBToWbj612rvrsaqO4ZTSZ6XlmTQoFBBVmidzr+eJwQPVQVUjYc/0njH1IxNScY4zVbhcqa0hFXkxPd+ITeX9TmVHslagjalKEEKHELRyJf7TYMfTQq+Kzam2K0Jqt0P/RdakmPgdIVUQwsVOd7t14nknN/CaGZWdI2MOqDRRAQ+zleDMNTBHRb//3l60ddrfYeX5MnuidG0Or/2/Vxo74uUez7osqDUpm7TUZZT2eJFfDgLBr06o+dAybUS1I6NEUSPnP+HtCA+oydPGIePbEp2XvjSFmwJbgtgymjcPDgr3dZiVmJHOMLAu+9sB29ohLZVihweFV+45isUCVRP41jArb7NzzSnCiNG1PxZZkANWfIeRZBurcR4QZA/gzYd7FYRdepNAHHiW6ogxhxD25pawDOgpd/XTVD6j58tWGoGG7FstnjKC9gTzSb8Ac81hEIBfHnSbz5F2JGx6aYVpPTRtNW7wZNptC/CAU/j7e+p8bfoPHaA12QC6cGpmqSr4co9XaR50P2zuYprcqnqjaa3rh4ypS3X0gC5nOLs+lM02tF09O5gve0bVnr6gvU9kJyAn/9QoikVGmMKYEjaCEJBbPp10dAduGsAYCtBva/4OPJbCsGDaWLh8xEWmimXjNyk8ZVtlox13Y9HRmUr0PoMU1nMlzFTKtnInkdBonA5AGJzntEYfYtaUXxigpC5tfRltfaRAtPLrVfRNv6VnTCAMr7APkvU+SmhUt5uLuuC805zymBQIFovhcWodrTFqnlW7I3NQAcKZAMdqgBEy0MWGNj7coR/7mQoa/6xjm0p/GESLsMG+1n5pwLWhg4qdWb74k9IIW1sREZ6gjbVPmXy/DDelV6EQQ+2UTBLPQRk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d01ff0bd-9143-404b-c776-08d9bb3d7bb5 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:58:19.3795 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CmbyaMwTlOYNd+t4ULYI++NK3t+nEY8zvewSkuen/z1uHhrUiX4U9q1H6iyrAkxsguamL4qqUUNyjHp0L3mk7rxWEcKJqwLIwtOq8dpfs5Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1503 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10193 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=922 mlxscore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112090093 X-Proofpoint-GUID: xg7knWsO7YiHrnYr9R8ms5aeOq7ehHNI X-Proofpoint-ORIG-GUID: xg7knWsO7YiHrnYr9R8ms5aeOq7ehHNI Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Following the guidelines in tests/qtest/bios-tables-test.c, this is step 6. Below is the disassembly of tests/data/acpi/pc/ERST.acpierst. /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180508 (64-bit version) * Copyright (c) 2000 - 2018 Intel Corporation * * Disassembly of tests/data/acpi/pc/ERST.acpierst, Thu Dec 2 13:32:07 2021 * * ACPI Data Table [ERST] * * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue */ [000h 0000 4] Signature : "ERST" [Error Record Serialization Table] [004h 0004 4] Table Length : 00000390 [008h 0008 1] Revision : 01 [009h 0009 1] Checksum : D6 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 4] Serialization Header Length : 00000030 [028h 0040 4] Reserved : 00000000 [02Ch 0044 4] Instruction Entry Count : 0000001B [030h 0048 1] Action : 00 [Begin Write Operation] [031h 0049 1] Instruction : 03 [Write Register Value] [032h 0050 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [033h 0051 1] Reserved : 00 [034h 0052 12] Register Region : [Generic Address Structure] [034h 0052 1] Space ID : 00 [SystemMemory] [035h 0053 1] Bit Width : 20 [036h 0054 1] Bit Offset : 00 [037h 0055 1] Encoded Access Width : 03 [DWord Access:32] [038h 0056 8] Address : 00000000FEBF3000 [040h 0064 8] Value : 0000000000000000 [048h 0072 8] Mask : 00000000000000FF [050h 0080 1] Action : 01 [Begin Read Operation] [051h 0081 1] Instruction : 03 [Write Register Value] [052h 0082 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [053h 0083 1] Reserved : 00 [054h 0084 12] Register Region : [Generic Address Structure] [054h 0084 1] Space ID : 00 [SystemMemory] [055h 0085 1] Bit Width : 20 [056h 0086 1] Bit Offset : 00 [057h 0087 1] Encoded Access Width : 03 [DWord Access:32] [058h 0088 8] Address : 00000000FEBF3000 [060h 0096 8] Value : 0000000000000001 [068h 0104 8] Mask : 00000000000000FF [070h 0112 1] Action : 02 [Begin Clear Operation] [071h 0113 1] Instruction : 03 [Write Register Value] [072h 0114 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [073h 0115 1] Reserved : 00 [074h 0116 12] Register Region : [Generic Address Structure] [074h 0116 1] Space ID : 00 [SystemMemory] [075h 0117 1] Bit Width : 20 [076h 0118 1] Bit Offset : 00 [077h 0119 1] Encoded Access Width : 03 [DWord Access:32] [078h 0120 8] Address : 00000000FEBF3000 [080h 0128 8] Value : 0000000000000002 [088h 0136 8] Mask : 00000000000000FF [090h 0144 1] Action : 03 [End Operation] [091h 0145 1] Instruction : 03 [Write Register Value] [092h 0146 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [093h 0147 1] Reserved : 00 [094h 0148 12] Register Region : [Generic Address Structure] [094h 0148 1] Space ID : 00 [SystemMemory] [095h 0149 1] Bit Width : 20 [096h 0150 1] Bit Offset : 00 [097h 0151 1] Encoded Access Width : 03 [DWord Access:32] [098h 0152 8] Address : 00000000FEBF3000 [0A0h 0160 8] Value : 0000000000000003 [0A8h 0168 8] Mask : 00000000000000FF [0B0h 0176 1] Action : 04 [Set Record Offset] [0B1h 0177 1] Instruction : 02 [Write Register] [0B2h 0178 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [0B3h 0179 1] Reserved : 00 [0B4h 0180 12] Register Region : [Generic Address Structure] [0B4h 0180 1] Space ID : 00 [SystemMemory] [0B5h 0181 1] Bit Width : 20 [0B6h 0182 1] Bit Offset : 00 [0B7h 0183 1] Encoded Access Width : 03 [DWord Access:32] [0B8h 0184 8] Address : 00000000FEBF3008 [0C0h 0192 8] Value : 0000000000000000 [0C8h 0200 8] Mask : 00000000FFFFFFFF [0D0h 0208 1] Action : 04 [Set Record Offset] [0D1h 0209 1] Instruction : 03 [Write Register Value] [0D2h 0210 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [0D3h 0211 1] Reserved : 00 [0D4h 0212 12] Register Region : [Generic Address Structure] [0D4h 0212 1] Space ID : 00 [SystemMemory] [0D5h 0213 1] Bit Width : 20 [0D6h 0214 1] Bit Offset : 00 [0D7h 0215 1] Encoded Access Width : 03 [DWord Access:32] [0D8h 0216 8] Address : 00000000FEBF3000 [0E0h 0224 8] Value : 0000000000000004 [0E8h 0232 8] Mask : 00000000000000FF [0F0h 0240 1] Action : 05 [Execute Operation] [0F1h 0241 1] Instruction : 03 [Write Register Value] [0F2h 0242 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [0F3h 0243 1] Reserved : 00 [0F4h 0244 12] Register Region : [Generic Address Structure] [0F4h 0244 1] Space ID : 00 [SystemMemory] [0F5h 0245 1] Bit Width : 20 [0F6h 0246 1] Bit Offset : 00 [0F7h 0247 1] Encoded Access Width : 03 [DWord Access:32] [0F8h 0248 8] Address : 00000000FEBF3008 [100h 0256 8] Value : 000000000000009C [108h 0264 8] Mask : 00000000000000FF [110h 0272 1] Action : 05 [Execute Operation] [111h 0273 1] Instruction : 03 [Write Register Value] [112h 0274 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [113h 0275 1] Reserved : 00 [114h 0276 12] Register Region : [Generic Address Structure] [114h 0276 1] Space ID : 00 [SystemMemory] [115h 0277 1] Bit Width : 20 [116h 0278 1] Bit Offset : 00 [117h 0279 1] Encoded Access Width : 03 [DWord Access:32] [118h 0280 8] Address : 00000000FEBF3000 [120h 0288 8] Value : 0000000000000005 [128h 0296 8] Mask : 00000000000000FF [130h 0304 1] Action : 06 [Check Busy Status] [131h 0305 1] Instruction : 03 [Write Register Value] [132h 0306 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [133h 0307 1] Reserved : 00 [134h 0308 12] Register Region : [Generic Address Structure] [134h 0308 1] Space ID : 00 [SystemMemory] [135h 0309 1] Bit Width : 20 [136h 0310 1] Bit Offset : 00 [137h 0311 1] Encoded Access Width : 03 [DWord Access:32] [138h 0312 8] Address : 00000000FEBF3000 [140h 0320 8] Value : 0000000000000006 [148h 0328 8] Mask : 00000000000000FF [150h 0336 1] Action : 06 [Check Busy Status] [151h 0337 1] Instruction : 01 [Read Register Value] [152h 0338 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [153h 0339 1] Reserved : 00 [154h 0340 12] Register Region : [Generic Address Structure] [154h 0340 1] Space ID : 00 [SystemMemory] [155h 0341 1] Bit Width : 20 [156h 0342 1] Bit Offset : 00 [157h 0343 1] Encoded Access Width : 03 [DWord Access:32] [158h 0344 8] Address : 00000000FEBF3008 [160h 0352 8] Value : 0000000000000001 [168h 0360 8] Mask : 00000000000000FF [170h 0368 1] Action : 07 [Get Command Status] [171h 0369 1] Instruction : 03 [Write Register Value] [172h 0370 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [173h 0371 1] Reserved : 00 [174h 0372 12] Register Region : [Generic Address Structure] [174h 0372 1] Space ID : 00 [SystemMemory] [175h 0373 1] Bit Width : 20 [176h 0374 1] Bit Offset : 00 [177h 0375 1] Encoded Access Width : 03 [DWord Access:32] [178h 0376 8] Address : 00000000FEBF3000 [180h 0384 8] Value : 0000000000000007 [188h 0392 8] Mask : 00000000000000FF [190h 0400 1] Action : 07 [Get Command Status] [191h 0401 1] Instruction : 00 [Read Register] [192h 0402 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [193h 0403 1] Reserved : 00 [194h 0404 12] Register Region : [Generic Address Structure] [194h 0404 1] Space ID : 00 [SystemMemory] [195h 0405 1] Bit Width : 20 [196h 0406 1] Bit Offset : 00 [197h 0407 1] Encoded Access Width : 03 [DWord Access:32] [198h 0408 8] Address : 00000000FEBF3008 [1A0h 0416 8] Value : 0000000000000000 [1A8h 0424 8] Mask : 00000000000000FF [1B0h 0432 1] Action : 08 [Get Record Identifier] [1B1h 0433 1] Instruction : 03 [Write Register Value] [1B2h 0434 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [1B3h 0435 1] Reserved : 00 [1B4h 0436 12] Register Region : [Generic Address Structure] [1B4h 0436 1] Space ID : 00 [SystemMemory] [1B5h 0437 1] Bit Width : 20 [1B6h 0438 1] Bit Offset : 00 [1B7h 0439 1] Encoded Access Width : 03 [DWord Access:32] [1B8h 0440 8] Address : 00000000FEBF3000 [1C0h 0448 8] Value : 0000000000000008 [1C8h 0456 8] Mask : 00000000000000FF [1D0h 0464 1] Action : 08 [Get Record Identifier] [1D1h 0465 1] Instruction : 00 [Read Register] [1D2h 0466 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [1D3h 0467 1] Reserved : 00 [1D4h 0468 12] Register Region : [Generic Address Structure] [1D4h 0468 1] Space ID : 00 [SystemMemory] [1D5h 0469 1] Bit Width : 40 [1D6h 0470 1] Bit Offset : 00 [1D7h 0471 1] Encoded Access Width : 04 [QWord Access:64] [1D8h 0472 8] Address : 00000000FEBF3008 [1E0h 0480 8] Value : 0000000000000000 [1E8h 0488 8] Mask : FFFFFFFFFFFFFFFF [1F0h 0496 1] Action : 09 [Set Record Identifier] [1F1h 0497 1] Instruction : 02 [Write Register] [1F2h 0498 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [1F3h 0499 1] Reserved : 00 [1F4h 0500 12] Register Region : [Generic Address Structure] [1F4h 0500 1] Space ID : 00 [SystemMemory] [1F5h 0501 1] Bit Width : 40 [1F6h 0502 1] Bit Offset : 00 [1F7h 0503 1] Encoded Access Width : 04 [QWord Access:64] [1F8h 0504 8] Address : 00000000FEBF3008 [200h 0512 8] Value : 0000000000000000 [208h 0520 8] Mask : FFFFFFFFFFFFFFFF [210h 0528 1] Action : 09 [Set Record Identifier] [211h 0529 1] Instruction : 03 [Write Register Value] [212h 0530 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [213h 0531 1] Reserved : 00 [214h 0532 12] Register Region : [Generic Address Structure] [214h 0532 1] Space ID : 00 [SystemMemory] [215h 0533 1] Bit Width : 20 [216h 0534 1] Bit Offset : 00 [217h 0535 1] Encoded Access Width : 03 [DWord Access:32] [218h 0536 8] Address : 00000000FEBF3000 [220h 0544 8] Value : 0000000000000009 [228h 0552 8] Mask : 00000000000000FF [230h 0560 1] Action : 0A [Get Record Count] [231h 0561 1] Instruction : 03 [Write Register Value] [232h 0562 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [233h 0563 1] Reserved : 00 [234h 0564 12] Register Region : [Generic Address Structure] [234h 0564 1] Space ID : 00 [SystemMemory] [235h 0565 1] Bit Width : 20 [236h 0566 1] Bit Offset : 00 [237h 0567 1] Encoded Access Width : 03 [DWord Access:32] [238h 0568 8] Address : 00000000FEBF3000 [240h 0576 8] Value : 000000000000000A [248h 0584 8] Mask : 00000000000000FF [250h 0592 1] Action : 0A [Get Record Count] [251h 0593 1] Instruction : 00 [Read Register] [252h 0594 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [253h 0595 1] Reserved : 00 [254h 0596 12] Register Region : [Generic Address Structure] [254h 0596 1] Space ID : 00 [SystemMemory] [255h 0597 1] Bit Width : 20 [256h 0598 1] Bit Offset : 00 [257h 0599 1] Encoded Access Width : 03 [DWord Access:32] [258h 0600 8] Address : 00000000FEBF3008 [260h 0608 8] Value : 0000000000000000 [268h 0616 8] Mask : 00000000FFFFFFFF [270h 0624 1] Action : 0B [Begin Dummy Write] [271h 0625 1] Instruction : 03 [Write Register Value] [272h 0626 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [273h 0627 1] Reserved : 00 [274h 0628 12] Register Region : [Generic Address Structure] [274h 0628 1] Space ID : 00 [SystemMemory] [275h 0629 1] Bit Width : 20 [276h 0630 1] Bit Offset : 00 [277h 0631 1] Encoded Access Width : 03 [DWord Access:32] [278h 0632 8] Address : 00000000FEBF3000 [280h 0640 8] Value : 000000000000000B [288h 0648 8] Mask : 00000000000000FF [290h 0656 1] Action : 0D [Get Error Address Range] [291h 0657 1] Instruction : 03 [Write Register Value] [292h 0658 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [293h 0659 1] Reserved : 00 [294h 0660 12] Register Region : [Generic Address Structure] [294h 0660 1] Space ID : 00 [SystemMemory] [295h 0661 1] Bit Width : 20 [296h 0662 1] Bit Offset : 00 [297h 0663 1] Encoded Access Width : 03 [DWord Access:32] [298h 0664 8] Address : 00000000FEBF3000 [2A0h 0672 8] Value : 000000000000000D [2A8h 0680 8] Mask : 00000000000000FF [2B0h 0688 1] Action : 0D [Get Error Address Range] [2B1h 0689 1] Instruction : 00 [Read Register] [2B2h 0690 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [2B3h 0691 1] Reserved : 00 [2B4h 0692 12] Register Region : [Generic Address Structure] [2B4h 0692 1] Space ID : 00 [SystemMemory] [2B5h 0693 1] Bit Width : 40 [2B6h 0694 1] Bit Offset : 00 [2B7h 0695 1] Encoded Access Width : 04 [QWord Access:64] [2B8h 0696 8] Address : 00000000FEBF3008 [2C0h 0704 8] Value : 0000000000000000 [2C8h 0712 8] Mask : FFFFFFFFFFFFFFFF [2D0h 0720 1] Action : 0E [Get Error Address Length] [2D1h 0721 1] Instruction : 03 [Write Register Value] [2D2h 0722 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [2D3h 0723 1] Reserved : 00 [2D4h 0724 12] Register Region : [Generic Address Structure] [2D4h 0724 1] Space ID : 00 [SystemMemory] [2D5h 0725 1] Bit Width : 20 [2D6h 0726 1] Bit Offset : 00 [2D7h 0727 1] Encoded Access Width : 03 [DWord Access:32] [2D8h 0728 8] Address : 00000000FEBF3000 [2E0h 0736 8] Value : 000000000000000E [2E8h 0744 8] Mask : 00000000000000FF [2F0h 0752 1] Action : 0E [Get Error Address Length] [2F1h 0753 1] Instruction : 00 [Read Register] [2F2h 0754 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [2F3h 0755 1] Reserved : 00 [2F4h 0756 12] Register Region : [Generic Address Structure] [2F4h 0756 1] Space ID : 00 [SystemMemory] [2F5h 0757 1] Bit Width : 40 [2F6h 0758 1] Bit Offset : 00 [2F7h 0759 1] Encoded Access Width : 04 [QWord Access:64] [2F8h 0760 8] Address : 00000000FEBF3008 [300h 0768 8] Value : 0000000000000000 [308h 0776 8] Mask : 00000000FFFFFFFF [310h 0784 1] Action : 0F [Get Error Attributes] [311h 0785 1] Instruction : 03 [Write Register Value] [312h 0786 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [313h 0787 1] Reserved : 00 [314h 0788 12] Register Region : [Generic Address Structure] [314h 0788 1] Space ID : 00 [SystemMemory] [315h 0789 1] Bit Width : 20 [316h 0790 1] Bit Offset : 00 [317h 0791 1] Encoded Access Width : 03 [DWord Access:32] [318h 0792 8] Address : 00000000FEBF3000 [320h 0800 8] Value : 000000000000000F [328h 0808 8] Mask : 00000000000000FF [330h 0816 1] Action : 0F [Get Error Attributes] [331h 0817 1] Instruction : 00 [Read Register] [332h 0818 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [333h 0819 1] Reserved : 00 [334h 0820 12] Register Region : [Generic Address Structure] [334h 0820 1] Space ID : 00 [SystemMemory] [335h 0821 1] Bit Width : 20 [336h 0822 1] Bit Offset : 00 [337h 0823 1] Encoded Access Width : 03 [DWord Access:32] [338h 0824 8] Address : 00000000FEBF3008 [340h 0832 8] Value : 0000000000000000 [348h 0840 8] Mask : 00000000FFFFFFFF [350h 0848 1] Action : 10 [Execute Timings] [351h 0849 1] Instruction : 03 [Write Register Value] [352h 0850 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [353h 0851 1] Reserved : 00 [354h 0852 12] Register Region : [Generic Address Structure] [354h 0852 1] Space ID : 00 [SystemMemory] [355h 0853 1] Bit Width : 20 [356h 0854 1] Bit Offset : 00 [357h 0855 1] Encoded Access Width : 03 [DWord Access:32] [358h 0856 8] Address : 00000000FEBF3000 [360h 0864 8] Value : 0000000000000010 [368h 0872 8] Mask : 00000000000000FF [370h 0880 1] Action : 10 [Execute Timings] [371h 0881 1] Instruction : 00 [Read Register] [372h 0882 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [373h 0883 1] Reserved : 00 [374h 0884 12] Register Region : [Generic Address Structure] [374h 0884 1] Space ID : 00 [SystemMemory] [375h 0885 1] Bit Width : 40 [376h 0886 1] Bit Offset : 00 [377h 0887 1] Encoded Access Width : 04 [QWord Access:64] [378h 0888 8] Address : 00000000FEBF3008 [380h 0896 8] Value : 0000000000000000 [388h 0904 8] Mask : FFFFFFFFFFFFFFFF Raw Table Data: Length 912 (0x390) Note that the contents of tests/data/q35/ERST.acpierst and tests/data/microvm/ERST.pcie are the same except for differences due to assigned base address. Files tests/data/pc/DSDT.acpierst and tests/data/acpi/q35/DSDT.acpierst are new files (and are included as a result of 'make check' process). Rather than provide the entire content, I am providing the differences between pc/DSDT and pc/DSDT.acpierst, and the difference between q35/DSDT and q35/DSDT.acpierst, with an explanation to follow. diff pc/DSDT pc/DSDT.acpierst: @@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/pc/DSDT, Thu Dec 2 10:10:13 2021 + * Disassembly of tests/data/acpi/pc/DSDT.acpierst, Thu Dec 2 12:59:36 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x00001772 (6002) + * Length 0x00001751 (5969) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x9E + * Checksum 0x95 * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) @@ -964,16 +964,11 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS " Device (S18) { - Name (_SUN, 0x03) // _SUN: Slot User Number Name (_ADR, 0x00030000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - + Name (ASUN, 0x03) Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { - Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN)) + Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN)) } } @@ -1399,11 +1394,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS " Method (DVNT, 2, NotSerialized) { - If ((Arg0 & 0x08)) - { - Notify (S18, Arg1) - } - If ((Arg0 & 0x10)) { Notify (S20, Arg1) diff q35/DSDT and q35/DSDT.acpierst: @@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT, Thu Dec 2 10:10:13 2021 + * Disassembly of tests/data/acpi/q35/DSDT.acpierst, Thu Dec 2 12:59:36 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x00002061 (8289) + * Length 0x00002072 (8306) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xFA + * Checksum 0x9A * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) @@ -3278,6 +3278,11 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS " } } + Device (S10) + { + Name (_ADR, 0x00020000) // _ADR: Address + } + Method (PCNT, 0, NotSerialized) { } For both pc and q35, there is but a small difference between this DSDT.acpierst and the corresponding DSDT. In both cases, the changes occur under the hiearchy: Scope (\_SB) { Scope (PCI0) { which leads me to believe that the change to the DSDT was needed due to the introduction of the ERST PCI device. And is explained in detail by Ani Sinha: I have convinced myself of the changes we see in the DSDT tables. On i440fx side, we are adding a non-hotpluggable pci device on slot 3. So the changes we see are basically replacing an empty hotpluggable slot on the pci root port with a non-hotplugggable device. On q35, bsel on pcie root bus is not set (its not hotpluggable bus), so the change basically adds the address enumeration for the device. Signed-off-by: Eric DeVolder Acked-by: Ani Sinha --- tests/data/acpi/microvm/ERST.pcie | Bin 0 -> 912 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 0 -> 5969 bytes tests/data/acpi/pc/ERST.acpierst | Bin 0 -> 912 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 0 -> 8306 bytes tests/data/acpi/q35/ERST.acpierst | Bin 0 -> 912 bytes tests/qtest/bios-tables-test-allowed-diff.h | 5 ----- 6 files changed, 5 deletions(-) diff --git a/tests/data/acpi/microvm/ERST.pcie b/tests/data/acpi/microvm/ERST.pcie index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d9a2b3211ab5893a50751ad52be3782579e367f2 100644 GIT binary patch literal 912 zcmaKpO%8%E5QPUQ|KVrvh9h_c12J)@5f?5!k_Ygv*jGA8UW7?#`}+D#XXyDpKHiZ? z@anI_W$gOrZRl(SB7!yMqx}#E4EC&a5=}m^g_!0^0`kEl)DOuIXM6D@@*xq*8vyqH z)b0KTlmlgmH~xt7vGp5lnFb*Ui&1&BGpsO$pT3_)pk?J?$-jLiezjJ$6`=r)uYry0Rn7KuJIp&j)|! zckaizM=~sYzU*-I~PkUtAn>Dr`~u=;o(_O$t$PK8~R}U#&P6`{0u*{ zz`m8fl|Wu#ucTKJu-TjNQ`rN~%rBccG0yWwF_}_zQl+X71|-_g)Pr`x1*Xgb!&xdP4yUPQ>QealcAR5Lj8F@vR~&d_hFrfVBOumUtb3< zL8GI#8|W0leXv|!GGL=~vE5*uM7z%Af!czNXYqlQL#IT$!9xR0zORu68XY#=M-SGy z3b+$tZv(*Hu4BBt4F>MUo>Padde^ZZU%V_4TiQ&t&6ruaomTLcp<9-2bBZ=qyp40+ ziEQ&$6L)c>%cI)0;%&VWL5E5@F~Or>jX}g)!VlmH>3A6L#ZGj;i8(jvxl3w$XL%gc z#4Y0Q*ces>sy7Obm6bTnr@oqih!n=P&+!w*&jZjVy;9R95=2i+)QqA9kLa1VJk2ES zOh6C4;>puBt75SyO`ippr%I9Z{pk6j=(st4aP-WP=ov412KgP0p3z1}&)7R9%3U9d z&O-shXOD!>df~G};j<@%&-TL`!{M=J{^0EAj)b4{!p{wbpF1J^oV~LmWA@f?c-apx zmJl5aIOP$4%5j~Id6TV0{V^u0sG`|bSAOB2V2gb1@Ki7>g+T~D<}I$cZmy;lKl#kP zxAm*k{f|HWWb1z8<4?h6y1Bg6FLiOw7Z@DC0gGYf$3^AUwgVosAOD1e9Hex!P-c3u zY%#r3y2G$SrRg@$K+^S+fmJX`o|0}AmQ(0%hN|GcJ*{Ry{RpZVR_9(>4G!#sMm9K*-Kb2oqvI?7dL24<1WVww+F6k zrAwi@3blP`ov2|RQA!4yn|HMt+&l|rp;ky|p}*s4Bhi{tS7b7IwWYtO z($_%y0DUt+12O0t{g&d0!qm$i(>FX+UGsM;osE9mca!r!@5Ld6Jt2$-nabyyC?4*zT@l2 z4LgzF3U^-%E&8T*RhMxH{B|{Nmd$hyhrlm@q(4&m{QfcO=jBztZw|gWU^0Q+lFdc4 z;t%ATAUG5ws_1bncmXfi8SEC{UBmF!TrD{!GvtiVS87Q`#ts;JTa>Png~+QvKOAg( z=l%H)^?9Gb?Lui47fY7Bv8_MKSPiRTs@3YkU)Q{@YvnKAT;;J8U>fgQ>9qeF0+gJ! zS_V9pumOy9sSU)%^lS1X17&Pw`o1`MA>W^ePI^H@E*S%`|HOx^c$lLHVkhwcpCba771jDZ#SdZmhM`3K=q{% zNdudV5*`|Tn?lmSM!~R<_iYsI+Q3HPu(0YhlR~GImZVAKI~h z+O@D02|KpVC?DEYlCeYxd&-j!?Kerrtt;#;Pd>DJ8RM1`cI=OKE&Yg{vc{!8uv6Z~ u5j$m$OK@OMk$l8{6J=Z)1AB{Pv}@<7F~|QN>AydkHSF$IS^vS{(*FTuhT2R3 literal 0 HcmV?d00001 diff --git a/tests/data/acpi/pc/ERST.acpierst b/tests/data/acpi/pc/ERST.acpierst index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f24fadd345c798ee5c17cdb66e0e1703bd1b2f26 100644 GIT binary patch literal 912 zcmaKpOAdlC6h#XZC=fn#CoF*_7>J28jW}>wF2KFG3zs9lTPTnl;U#=7r>E_sr(1u2 z21W+{ zr+@MJrMD_~fBw&3-hS0e0dO9FP5iwO(II>Q|7$G zoVF=c*370~>q(Ucw2`X*UeoWjna$X}Z?i1bzv)oC^kS{!mHe(ZC>5U_1icE2s3nZ3 zY5U#Ka>9}Q$uMNYFgqR}u+hRN!)^AvZJYi3f9V5uU@eNi<*kJe=czCEzGW%K(3|f) zNxh-*?(d&$1(g9GVw69NuK2C)X2J?B+gV$DDk*`4>hC|jR`mcD_b7?pqgS%bacj9@ zge+u+(J-#EtN42^folEz$J!fPhpfdVjb&Qtb2LKz{qyU7Z&l__iTiD6SjWmWjJK0- zCr$I*9?yK<-Dn?j(m-Q0XK?N(?n{28O7Ue=tUS zz8mz6>|NV3acd}WF?L%e9K2G0FQ{F_Ecm-^;l^btaI59oMO>(M+Fc`iPtYiEtDUWO z$!~ctmHI|?-CbkF$9=bUG0}gNqVYJ|B}DX&ag9-q{`aZ*fEAypfHMn4xgt7*F*YoE z8Q%-q3#0XTYTSG7AO8uSdAI$^%Gd1^e{CtL5V)tERpa9(Exo7$}ef`$x|2%4;rOQ9c_Ndgx~!~$?ZT;n`I zWk^iq=hy^i0vkufl+Xm@Oh7pkAu-V#j!kl=>_L(dQ$mx12`FbGB&Mu_c_pwsPl_`o zG$oj_^9WU)X-#LEGbJ=Fn6mQ-Rh=14XNEH+G^6W8sOp^4bk1oy=X9M2Rh_1$)6{gD zx=w_uPP~DXk)GFd&g(i6syZ!Ar={t%be#xQomow1R@0f)bs|)C;$5iRPg~Pz>pBst zI&+%NoTf9U>qMyPT+nnbXgU{kod{K(i<-_wP3NMn6QQcp(R4bRPDj^?P}P~&bmldk zd0i($RcArdSiBQ#f zOw)Nx(|JtSiBQ#vF9|$-@;$Vo>0HruB2;xA*K{7&bRO4rB2;yr;LJ+=COpBJ)%az1 zLNMJ2Au+ueds1Vb)R-rACPI~YN@JeVn5T3mLX~-1W1iNSr*$SmmHCLqd_-eDqB9Yy z%rl%RUFHmD%6I%3!IUp2Z%2?G^a&V+#~P%=;f zu&LjgxD0RX>1(q{mpbC@>R6seC3>2Z%2?G^a&V+#~P%=;f=3{*fllMEE0)CmI> zSk8ojDo`>|0p(0GP=rz^3{+q_69%e4$v_2^Gs!>^N}VuJf#pmXr~)Me6;RG314Srx z!axOM_lrzad z5lWpfP=V!47^ngz0~JutBm+e#b;3XemNQ|X3X}{~Ksl2P6rt1!0~J`#gn=qhGEf2K zOfpb}QYQ>lU^x>8szAv=1(Y+%KoLrvFi=E_fg(~36rpOM2o(cWm@rUrJ|DqSSTCWL;la|0sTXICqsWK z{hL31DoOvP(y9incNl(mvjWH6tkS`ygJ&|Vy=>O#yiSJ(9hzowskMpKfYJPW*4{1_ zS>_L{Z1L&VrrVtdpj*x_SlN#=Y@V+Ky~A!(o0Z0~6}`7>EiyVoC%RaAS)aocbd=l=)@cw3a6JzzFxX9Om4yX(0O{JJ0c&&iFPv_PiZ&{@E zC&pkx>rc%Di%Qq*=H;*XaMEMlG$|lP@qP%>0;IjhLU98{gZN&_q^7upZI!-q^ zjjg<%4&NG6=|tPibW`)Ppr^wJ$W%JfHZ$GSJi`(&%`+(sUnNuNMBB`CQ}d>%r^Bbp zR65Z%Gu_lYSk}|w`(-MfXq%aC>bX9qr^83hR65Z%Gu_m4x}vAUm(El=(Wa+!PCZ!9 z-d_ybRcy6jTg6Ud&EMI0LF`U6t;-Kq{QYh%kWZXv#f^kmHm}%*jUwvC(+XRSGHyMZ~lOS3M;vOtz)>YPGGp* z_KOAptfED+^h6TSZi)|T4uzk5l{Vv%UlmSBs!U^xPGf# zUM*8M#Kuv&n0I^imlGpvxXV6t%jNR5Vl#u)`^tR((aTSz}YjKG}?75er8r zhm#jbLS!vs*?sED`r1KQY^O=q!xb_nQz665{Kfh)H*h=V5i(4-Q@d11j3c%a8CSpX z3d5^L#I8n07_sdy*6rU8L*ug@G=6ym-#}Cs3&$W3#Pd8>jyVA>NEt6rjfxbhF3)nR6Wl0R%y>`8L3X`Yd*9Nunc^1!j znn?6aIU6au#3z0{r^?T=;!l8GWi$|nJAz`zN@?)j4)3XkaN5gart(c8zE^rNYyIU` zjwP@}fZv!7*fG3s-?t4D?FQaS_wL6`E~j%9*^m>n0^VSZNHk> z#`=@E!v3gTxr=?-Z^f0nFWi0tTefjF(MF?1dtewi?ME?fQo1P&j@YHn(=;}&UM$mYa7S0P5HyiC?8xH z6f!9TeaHFJgMyi|5*8Nm5IsXzNQv{a2e+ZW|787=D||1vS!-|MF*;9ZZ04#xcG6Co z-r~+i`ZC|zYozHe_V=?vxh(dKF(f|<%Fl}ccg$cg<6zZe*tEpSd3kbyPWmvO)tCru Lf)z9L%&`9h*%QBN literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/ERST.acpierst b/tests/data/acpi/q35/ERST.acpierst index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f24fadd345c798ee5c17cdb66e0e1703bd1b2f26 100644 GIT binary patch literal 912 zcmaKpOAdlC6h#XZC=fn#CoF*_7>J28jW}>wF2KFG3zs9lTPTnl;U#=7r>E_sr(1u2 z21