From patchwork Thu Dec 2 19:08:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653297 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 F364EC433EF for ; Thu, 2 Dec 2021 19:11:21 +0000 (UTC) Received: from localhost ([::1]:60140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrUG-0000UG-IX for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:11:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSU-0006o6-O4 for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:30 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:19786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSR-0006M1-Tb for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:30 -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 1B2Iu78B024260; Thu, 2 Dec 2021 19:09:21 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=U/APcbRjx/kqPDFuYTLLcPKUU0+DOCXlpSx4XuLcbdvwLRLzwt2v+vMlQYpVBQBhIje1 a2JV2V82iXeR0wUAnKIccvEOlMP5qbOtAiSXddATl1DaCe67N5WJOSliUSqI9+4cTYRw oUhsrv24ZueS9ThCo73GHJBFNhY+EX8kh6hWMmXmGavgOaAED08jve3h34RSe9A0nhKr T6hpnWkrZrGo0Cdss8ctSYoLtGA7VxYaku+HA18JXlUxfqEKrtfF3m8ZQthReIW4q9F0 SDGa5UP4T4Vk4ksRlhIFs6WTvljtgOenruuMhI6eND/vW8jdUfo+CvN6VeXSPAWbxOnD 1w== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3cpasys3a5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:20 +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 1B2Ippc8051222; Thu, 2 Dec 2021 19:09:19 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2107.outbound.protection.outlook.com [104.47.70.107]) by aserp3020.oracle.com with ESMTP id 3cnhvh76bg-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NySA77rvV57pVy3t2+Xz8SMz6YXjfV5E+8OMFberjOkBpdGpqqLwiuB+su+XdXUTVOCLS9bYLhtU3p6KV0KZQv/imM+FfE+IiTmekGpFUF0sP1M6OJi9TR3LLGqzJrK9rJ/mtVYP/yVr0x7HtL8AvbI4K6njr2cRu6co0aCKU2acU0FajJhQCsFbkx11JKziQk5fJivILosbaBi4jxfE2KnrHixiq6Up0+mJDzrrZKgFsdj9N1eCRFC0XDgmMkznzqG3VpZ6s3q/HoM0nAFEEteESe8091vHvNVLEnWo+SlY/5vdP23yDUOZOzQJ62Al+X0o8/TUjPX7oUC4/SEbfQ== 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=f4t6uSOLDXGXgPGtXfVBSzRGzO7fUaT+DIFtcOt8XcePq6ZTXAqzejzoS0cGn7vsZI5P3cf5QTaDZkTq135vPEXKjkaWyaVf48+lz9lu0Em8HY7yBPHWCnOZAtzrfSlsVhukB04ARrm7CCARsFiM40PRNZs6bZvZjFAJ67Lnm0sY2+Q7CRO7XOXCd9KgmlHqZcrdbgOIK9cF1egxLI0+TPJeYvHtnPvAy6BEMeWwUlufalbtqCO5pl5hINw4fZGYziQ5UfmcCK6WfegktxphgET79hAga9xPdDloaFxWDKihfe8dR5bvQu5weD9PVtOTbc+PWCA+O+VFUFKvJ69YwA== 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=hxTgJrZy7SX2E1vfujGoUf+hx6qW0Vyltthz6Ujxg/KT2As7rCHW29u1ySlk1nQhIGBJINb557XoudPN2IJyM9UtxB/AWVyk/Hq80K3Oxgf93vtT0h/kHNbYbTADldfZTjAng1UpYxBLxI/2AiZKyRyAfCkm+rEpsq0Cb6uN60Y= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1693.namprd10.prod.outlook.com (2603:10b6:301:a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16; Thu, 2 Dec 2021 19:09:18 +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.015; Thu, 2 Dec 2021 19:09:18 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 01/10] ACPI ERST: bios-tables-test.c steps 1 and 2 Date: Thu, 2 Dec 2021 14:08:53 -0500 Message-Id: <1638472142-14396-2-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ad86cde1-2161-40b8-380a-08d9b5c73d4c X-MS-TrafficTypeDiagnostic: MWHPR10MB1693: 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: 3/HzaHQDlaHQNwxedLf0lrrSdT5GVrKiPM1uZ61TRCLaN+XvRfSGivjy3rhLXyuMVyu0hXRvqAdgEDtObINnpPUmGawbl3GAItoaL+J/cBu+K4MlXnl2Qmwe/KbXh9SUcT8uY+tXQZAK//+cmNPVl/HPYYAo+feJZJHgSggra9b5X03/5DFPFQjHPgutkJNQfnYOgw8wfKAvFSi7XIEcgLlL9tiJY4ijhMT9jDSTccaLHFhmYgYE1NmejUQ4h7/qvIClhZ5DqjtjO6MQh7vLfLvHPLLAXPokBeZzIVctsVuKLr/tQrhrevUCVI1bIRhFQhaJXJKuhz9Uu0PNlSUj5SI+8y9EW+iSHea2yaqGWa3N1Wb0cK+bKMPgF96UUZvi3gnah+dJGQsl7YR3TAf5HMsloYF+ZPN7/91LozNPUbDs3EOLy4R9vHBJX2l5gZIw639mwR66zq7Kbf0jSk1rZe6tQ+ksd1QqN9ff37ogeFi3BdurtOJP7uzZE58IgtrjP8crbe4hMGgfyYOLYPUwJJNnF4AlqLVofxFh7HssuafbJtA4zVJOZF7YbfEOauBq1oRTicFysgw4tpVdAJ9YcI0n0O5mJBE2/NU7Fz2InE6CRyRnqjIafqA0p07rlRDoIHs+CxlN3ic484+xCyvIX82R6TGWvdM5PxmRm07BUHpe4cB/muOCA9hXMtkJsQUXiFzY/IXEwam1h+2L1kPNjw== 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)(52116002)(7696005)(186003)(4326008)(8676002)(2906002)(6666004)(86362001)(38350700002)(38100700002)(36756003)(508600001)(5660300002)(6486002)(26005)(8936002)(6916009)(107886003)(956004)(66556008)(316002)(66946007)(66476007)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ohJfbAPUxpLVU3p6yCnKL2RcDrYp/8GXWF0pQvEkiqO3D6Mc7/LLD7ObFxOMUQ56BMMKDCX7yKSbKxEKdBZFNu8u/sqgq1soDB8gbjKJTj1c8XFmNKNFYAAHQST68v2W6ptSTZ6+tGe+tG1PNBnxTn4I+UF1ojy4h9OtWE1BMC/hk9gXSw2gDYQFQudpwexnZWXz5X2hfnoI5fHH4zBsieftIqexD+pPdSg8CWLW30RZXauVcKrV6XxoM/rCh7GeRBmwL5dTjkPDXgrCdOyGda0ySVj0xjSR6XZ1AunrkliwlohjONuJBqlTg6zwkFvV4gwEO08Wtv/Fr5kw92wMBXpK43HG2iBxhDoBnvJntC/1BMnQHe0IsC/FMMjpedXWJ1z66cqsd6fcKHYsY3nQYWOqY+f+WnkDrdWvp6IEvGOCItWa6bCy1VGLCLGFSw9YsjgTbcofolVohGJlOxJ5ZdbxuKa3n2ZJKLmxkaj2Hntk4uwtnTdJOmvrAjsJo8OfsmQZXM4vdrXRH0mxZ6g27hza3NM8tbbShIR4L+U8GPIiEmS23OE4Ppd2S3vVbaECX6HgXOhuMIY+LmL6nwzZ4gh3M7rQbR45Wx7jUDfjahk4sqt4+mtOJ0zYtwm01yOPAKDfVdtqCI4Wz+F5Jcb4SlBEG1rF6y70+3IkkPdm3yPM0k+2j7RoeaodTw9EVhe2CSH5tQx7D81bBQ30K78t/JWs0EZtkxqoXlWRbeLUjBOaCkBa9kxgDhffVTcyckAvLvjZD6yQ6Owu7pxfNP0YX0Ln9nZ8ffNEeRUeYa0Bdo2rS6saC6AkGAX3PGlN/XWmwT9yWufQhEYSVHAYQPfPVAa21bGTUHezoS80e0Oc0UJBZMMUT9lYivzY2E15XupugzgAW6N+zsEKBvtwz5Nmb/x7Qni6FMx+y6XaSa43cTZi+gMn/Isn30ZJ/DTHyz9fVyFa46oaXVuPIHp0SDoRUxB3PimyHOH3YV+vsFhi0ZRI3dtdoyLIrO+IumcAloWsJk4LpviMq7yvUMecGzEpVRkop6/oUCemDqwZV3RrRfTv8OLFwt6TJyQ93kRXZtRA5O3ZN11sSSgjesTHpeKCyAc2jSYxQgnZLC89NKP3KcklrLNZJ0qGx4xSqdQBBR79DrFlRjQ+h6T00+cfD/VbEWmsVn83dHsOxwbHRL7fS4r1AOK6fPh9+XTcoiCTkg3eEKtyAtOV6FRJc4rCOuIDSc3dz39cTHLPsgYxXD4pMeIdTgkMMlKaxIfeoc0772+ydSVfPme+LXOq2ux3Lu0TLONTbcdpTIibERsfv/dfwiMneshhhcmO3h6aQVtPA/h3djsSc+UKrbF1ADAghe27+u/HTQEJNX/Bk085RTNoFxJdtQpFEgHyfB8c/7j4bpw8EE9TGLTkU56G3/F9ihBdKCO3Q6chfodRRiprX6+R1ilpkhhhxI31XFUH6jgq/fdsXupMrrj5N49w8meiFLWA1sW5CP22Ly3StTLebE6w3ZyY9CVdH9BBdTSSY+fM+x4/KeS4g2aJ9A49D8UkzhUF5I3YrW9KbXLICk2FHA0Bg+5haHpWTJSGX0rWrhBn/PZEYue8/3/iqaaCy8/tGEUEAjz0luJIJNrWlVtg/Qhc1affKubJ7TVQXs1HpPcpYN7wyjM+tETCSBQk+FETDdgvsQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad86cde1-2161-40b8-380a-08d9b5c73d4c X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:18.3503 (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: tL7JhhJgQ/DsGEOyCEXJ91wUZkhTxJTBtrGUFzk0qVzZexjXEMC3uc7kx6wIi8cYQmVVQHMyBsFOPbUsv6lP8nx25Q/5og0GrGUFv1Xmpdc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1693 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-GUID: BhmCCO-_2H-OnBu37SabwDmr6PUrvSpw X-Proofpoint-ORIG-GUID: BhmCCO-_2H-OnBu37SabwDmr6PUrvSpw 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 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 2 19:08:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653299 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 C368FC433F5 for ; Thu, 2 Dec 2021 19:11:23 +0000 (UTC) Received: from localhost ([::1]:60448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrUI-0000h7-Lc for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:11:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSW-0006p0-8g for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:32 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:11626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrST-0006M7-AY for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:32 -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 1B2J2Ytl020374; Thu, 2 Dec 2021 19:09:26 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=BhC6IvSLnX70e5iwtntIJrbg7SBxoRNxhgcequGTvD5wj9iSs1a5iPyNjtxThnq/EHTM ZwkpvUeThMQyfnBkLfQi11XIj/qBTNpPpl7FuclBXMO1swcl03cCCOwgDq5PBhTQlS26 9TDTLVOxeUG5t0uDb/t+9hPe/FDW1HUmymI+5ndcJH9jDaFrTK9CloTIKJPIChRFplTf jSO7guzmknIq3AnBmW5tYwc1gqDoWfKXovRiLpFDQGf1o4pNHndbHtO74SrnUcbZIbtL bR//muQROV1b4fMv73nJZxM6UPvlKOZSU+xTvMGJ6Wg9bt1BcanBJEzvRNZ9KLozOhs9 eQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp9r5a8qn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:23 +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 1B2IppBU051304; Thu, 2 Dec 2021 19:09:22 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2107.outbound.protection.outlook.com [104.47.70.107]) by aserp3020.oracle.com with ESMTP id 3cnhvh76f7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h+E2DkRJ8J1N9Q+PTf7sH1UTy3HYhFHJbVkqz/8I6ydrcNkbf2JADPPT18l1+PR1lCa9mM+MSDBbrR1tUbtSkxLR3Xy12BCeujflWUDCUPRq5s/WVuNWm6WU7S1SKi1/Trxwv1Go6ixCK1/d2EjcGOXrVgCmWqQhiLoHsC0i7+gcj4yOxHsK5MZpBYopgxG6oRGg+VQ2N5k8xcvjISssz4qOHzEJ+Hdy5RXXcy8MjXKb2BWIbM3K7hSCYqm64wr8hcBtN6naC9ENSF1+/AlT7aAsgzRyXbswbNK4DAbRfxCiiRfFVMPKLxoovasJC846vOTwsH4Gv72XZU+UT8+Uag== 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=ih6+UJIM0mT74lykGiMkRuAex5uEoa5nHe69Fxui0GzH9cN9oMoFZ0+49Te8hs5lyqqiRbiGtfkEzibZ/yDbaCVJQKc57GZbFvQD6L+hGknJjCxWnev+xswskhO/BwQQKOAAXBJrlSJ0yBPAavuDFbg/S1JkQyxt0S5havr8XgJGWHNZt2cxJVZ6X++uUb9YXD0Ptsb/PEqVhiysIqqBG3nYUyYIAvTT39rVQhGvKd/esO8+lons9nUElSI749TMncCfC9LaDwHFEpgRlmbRVijbk+MAEiLh1/UTALypaqJLA/6u7B0wWjO3+EosnTDGvENBKSidwZuTxz7Dh5CrEw== 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=MZa7i9bVdW0lnskUq6e320gM7THSDjAhuRe3WJWXAoaeeWXqB5Uv2hKVd0YgCLQzgmaG17NJxFot0gAM/S6PYST5+nHpg34Y5IhNE0ijNs8+o7kSOOz2XGxqQn9wlAxUCUPEXXfQyZiPcQJ/b1HJbuI93YZiruYhoJI0GEwQaio= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1693.namprd10.prod.outlook.com (2603:10b6:301:a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16; Thu, 2 Dec 2021 19:09:20 +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.015; Thu, 2 Dec 2021 19:09:20 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 02/10] ACPI ERST: specification for ERST support Date: Thu, 2 Dec 2021 14:08:54 -0500 Message-Id: <1638472142-14396-3-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 56be0025-1da6-4e87-7d01-08d9b5c73e6a X-MS-TrafficTypeDiagnostic: MWHPR10MB1693: 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: /ljKcTr+7AQLuV64TEu918xWI2fnyAtKUbBgh1WXvCXVpubEEGLqfQkDKp//xETdU22HKcdhW1PImEFcPcm303wMr4HguncpcrAzpB5aPJh6AEGidqOrAtN1ofgyvhMEWIlDTnlqr7w7rBxgq0Fw5kE0SeV7CRlg4LuCx8pzPD5o9yKyQwGmBN83qtvqD60BPbd1F25fNra6U4iXCG2T+2w9ecxVfmo2v5lbG07+1vbeiidgXXdgldKkQS/Z1CE+7elPMX6ijiUIPIk9E8Uc+o+gOO1Cw1OzFWGFE59t45A4//D4wiRgrEQ+SdkcS3GY4YPjgs7daiYXYzq3vow3Sks+cNimPJKC4jogAxNXrqTdv9lwPlQ1ZVAJ+Z856UxzwU6vcSnINyHHlJaO5+x0r+fEsTCLtwiC+AShw2AMoY/PA2C7huyomamoGZyiKTZf0i1jGe1fHmtflcgbNIUE7H+kPC1vMLpoTeUMGecivtd/vvtqht3JqtS9R8MwnfRwIMtM7xTyeUi7q/q/UVo+XQfRPoyLV9SqMi+pWuVM9cHZd6kp4P7m32klR3CCuFLd4aqAlxOwUy62/d87egvSP56kwlG2G8tpOKpgP/NQ4dvLwt7/kDI3SX8zpZLsIFTjMZbpkFPTV6Qy98v6ANd6XLmKmSfHb61RmTh68GvxOoFgsikrKtz8i3LO8rcww8mBlvBZ33tvHXElh83tULGNag== 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)(52116002)(7696005)(186003)(4326008)(8676002)(2906002)(6666004)(86362001)(38350700002)(38100700002)(36756003)(508600001)(5660300002)(45080400002)(6486002)(26005)(8936002)(6916009)(107886003)(956004)(66556008)(316002)(66946007)(83380400001)(66476007)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EhssNvVeg5+r+9Qb/jEb6dc7pcREYR/IJtE0hTE5r3qZ93CL44HKMEigHUy6TFKCXoT6Nb+8qXp86iZdML+08n9d0gnzrTG1NFFlmaNlhykCEw5kRjTnwF7zYVCweFDL1DCtMSmcUr1NXEEUNnNF6rhK3XT0gEQV+ZzsM5rt54g94ttyjisnvuMwDg97I2MW2HTfgOw4V0+vOfJlV2QM6BH0li21RHrON/8ak2eW913CJ3V2asYXXLSM/ienwsyXnFL5PU3asADst6dmcNSJi/+Hjj0pIXDxmGQauRmlDQZ6xE6B9OEmVKX0DfuLbwbCY99NIgej0gel00YCHY1j/NeZ0joVDtrsJILR/FuuZtjMwFlkLL3nYqztZOoIEqzWe0YRrif9ZeZ+r5Pxt79kwm2U68PrCXxRwq5cIQlm5Ytrb8cpUfKX1PyClkQuEgJHOj33PrJxdbjDFtA0yqqHlC6uhsrnimYDNOqYN2DP/doWdARHychZ3I5V9C4ujSJCY8yyAtYOF5MWpYde90HmfD2Davu3EWHsDTo9CCIi72njmrShdlFSoEhJuUyp1xHrzYDUlyWlIoLAh7UJ8KGHUZ1vEBTJcLoV6Lmo9ZG+PA6SbX1Qw9/ur8GOQX4cxKefia7R07p56egqcVUeUwTBwvfQ1eTfjo+RNgfvnZwGNKDD3VHCI8p2b6s9hNLqbQPxrfd+7Ol6CYet0hH4Hi6BUgD47kpbJKxb8Cu6pNN1v8sRC3h0LkIDmPPY3f+1PnGt1xE3+ueeI8rybbC8uaJARU+QensfVO69Y6dLJlTVbMNqfi+8pfwybC3iQzrLlaxPLQe3tHh0TtvDKOr/m4uypO00mfCXm7u+gcHUVYXJbfwhwKLS8QKvFGwJR/rijoB5h3UudZ37gdhhmOU1GX8cVJkU0U9uLb43ALhGxY7BzYpq49SQO31tvgUit88m+XbV4sVzd6ZBFmrvIHPfm6q4qZVZqTEacq/cHDjgqKqNxl9JYkOzhHxaU9WwUwOqbx+yRi92lVOVjbUGJjg0+fHzRAqJod8lqY2v0aO4cPeszyQgwAD+QygnFOt1Poy0c5pcuns1r9tCHZPeMmNZWXnvOsOCOmICqj8ed57KttwVGTVMV5PEZTCLw7abeWV4hz9BPco+k7A88a4Jzm2lB+3iqG32agzfLs2C7F3eNSokJabXiFFsvExh9E+QiLbKkd2qviG7Q/6fB8x8tIAsdmpUyFfc448BYkZDAYooMHhZxvUpnHM/1b+zwKnK4hVGb7wm6YwHX2m/SWUqwCvbxdhPEbWGBzs+5QP4ND2F3nJJeKdzuzo7U1Xh6COJoa4+lsCRCgRwtpkSh/sAKQ1CZCTk2orLAc8b/wZgdIwZ+obKtMTnafiBQksA74SZEaEb0Hy3HROVkY9K5c5GOsBdvc4ivUU0P4BUpz+xcjoecFCM9fKOUOQ6/j562vJn8XSBkKxIW7/fRh8vcgIHRyVMZonywlNC6dwmGh5k12971gtuDw+pKzAG256gSck0Pgs1Bboj123p5XH4kKlAa8P4Hl30DKWr8J+1mBlUEBgj0aK2s4wiu2Fkxya4dBreWEduSHC6oyXK6nj/2XXtG4IHAQ9iRDO5fmMSgmgLJi3ugO4tVr0cs1TzaEIA9ALlCkWc0pzQgvAQ81BbDF3x4ytYYTbHKg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56be0025-1da6-4e87-7d01-08d9b5c73e6a X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:20.1639 (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: QOKE2/TF+bQR6BtL1FISRK/VKnM0ea4epmIrw+UqZE280vu/Wx5UDBVgVUPGLIyN9EnTjOCcLzo692ISE6L6xH2PnFhhRQhQxhv672moJK4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1693 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=500 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-ORIG-GUID: 1SqUAxoU8sLLPfH34-4bh-cTE3j0z9Ow X-Proofpoint-GUID: 1SqUAxoU8sLLPfH34-4bh-cTE3j0z9Ow 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" 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 2 19:08:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653307 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 B1598C433F5 for ; Thu, 2 Dec 2021 19:15:47 +0000 (UTC) Received: from localhost ([::1]:40716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrYY-0006Su-NK for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:15:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSd-00073w-PZ for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:39 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:32508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSb-0006Mn-Ia for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:39 -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 1B2IwqsL020410; Thu, 2 Dec 2021 19:09:36 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=GTycuGdpK6o/nVsic/mqjsy7MjT1KGFO6ZBh/J+Odpss41Nj9P9HAViClk8Lcs0cJ4x+ boWwXvI21KIKQPN5tJrwfd/U/lL2Up/grPu0lGhJwteoZM0IeSFWNHIzb00+ysmvT0MY hpmXvndl4B1yHdsgf50T1zq7iTc92GuIMxXDdxiCVZa1CDuHeJfLJ/jaD5twkzlkKVam 5C8kHi+OUc0TwzSWEQ8KTv1QSrkmLK/x2dYOm6lBqMz2Y+ouzwUtYfkNprqKOhgRNmJe T3QO1HjqoAUprXxFqp2kaLD/D3BsTnCJHJcWP+pm/bxZeeYJuNxEOUU9CZInwoZ9c3eW 2A== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp9r5a8ra-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:29 +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 1B2IoPRk115619; Thu, 2 Dec 2021 19:09:24 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2102.outbound.protection.outlook.com [104.47.70.102]) by userp3020.oracle.com with ESMTP id 3cke4urw6s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fP2qbDB+Y3Js0Sxwei+9KkLwVbbPHwyfUT+ApC4gCf7EqLYGp5UHUZFMQOQbfwC3YbKOpZ9q4aVdekc/u5krrfgDYKRk/ngXBAWxhMdQ+pM4a1N32Imx7rQJxPXHeNkwcaqR4nktk+HuoJvbGtEANEuXEq46P7sdwv3y8tgvXvYZUD1XvsewPc98pX9kE9+fZzfQkrqTMMk4gFQmWArNkMFiIw6tMySNhurzEILyiUfAwpC/lzz4e+UAjpl7bXMP+ET59t5UH9h1BDc+l4DDQR11bT3zYa7ms9+yONdPJbLL0vpiQD06rc30tCVTOBgoOPcEXNFVa8Dn9YeodHD+eA== 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=B3/JMbagZmhyb9R0vzHArILNOXU0PFtxNT+a8CqAQmwxCnNgoKN9cBgALqF/bioyBg1wOPZ+e68NnQaz/B9d+LS+ceoaphk2bnByDaWdSEnoA/QIXJYUALM4XwLfq++0wECtN1DhNnLGAwxmZkEi7OW3AX+SD+Z2DptYpY5xEFY+Fb6Jz0OoUNZVKYrMdPB9Af38+x8bPZRF4Pk8OxGJedHyRrk1pf+0WbO2w1L/UjoZCwXNE+m94cJwuoXMawNUkubD5uEonwlif3leufsYFu+RQWRI4aGrWNDVKSgafRpifCiwPwmO426qtg09zI7NFX0bvw81QZ7S544TuSDP/w== 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=GnTstZ4uMRkSXtG48X5ssA/asOWHQeLcWmRKg2/4frSFG26QT2z0RnzeffB6rWrOSMhSIWSvjNmBY325vBqIlu0npVYwRT5YXKOVCmaBq8EDnwhqhFKySG3Ez8F6TxeWyvf3HrgzN7NY/sm1JaE/pShfOCRkebMkkTndcovaxeE= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1693.namprd10.prod.outlook.com (2603:10b6:301:a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16; Thu, 2 Dec 2021 19:09:22 +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.015; Thu, 2 Dec 2021 19:09:22 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 03/10] ACPI ERST: PCI device_id for ERST Date: Thu, 2 Dec 2021 14:08:55 -0500 Message-Id: <1638472142-14396-4-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0707a636-c863-4b99-c034-08d9b5c73f81 X-MS-TrafficTypeDiagnostic: MWHPR10MB1693: 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: cBCUr2jdanylsYhzS39ZYbX9DGv9O0weNeFiSdJujUOR9dUz/xn4hGnS0inmUa978UlS55NvjqgACQdqhb9JMXKjeXKSi/A0zWz0DEtyhWNpZjgf/GumMGaYBbfhRo+zwMK4kuetLKS87qVqPOgBU2+3JkmMVE+A0r05e97HGxjbTrrfHlwd+0a7vGttHIwQozgKYmuABurw7vW+94nhV78scyYzuUgKLl19oam0OAepUES6bHYZPyy/hca/fRXgaO9oRXgyDQ3uEI4c6UCWH7IO5rZ8vSL3a3xPBZ+osm9R00dcr4bi1Q2OkqucTeLSkYoCjomHjF/o5A0O6vCR0Vr4Wr3Wa8RCWVBcgab3RvOpBMSTbbDrvKvnqm60+L5R0ENRKB8cyNW18crzX1fqlymTznhmhItAr9HQ+CEZ0onP8g7aDEo5dRFcULMpt6VcisoevwYThhN6fmjkES9IlXyQ+dqcsbarM3ebJNw/5oOVZcvF9iCXe38c438gMd2B/0PcN2+NMUBSpMbalAm9unDxL5B8X4D17iAqMKGp33umNyd8zhp/9CUIvJn+TINJMEpJAxk8N+K9XcrTizWnT498323wreit6ndf8MT8crhuyY7V1kcp4w9S8qubvsyB/jwJW4anweE0BOedVZo+7BBzMhDh19d+NeeuN4jAKJpINySObkHA2JbcuDEqmX57CWw7fsLxut+X55vSeXVVhA== 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)(52116002)(7696005)(186003)(4326008)(8676002)(2906002)(6666004)(86362001)(38350700002)(38100700002)(36756003)(508600001)(5660300002)(6486002)(4744005)(26005)(8936002)(6916009)(107886003)(956004)(66556008)(316002)(66946007)(66476007)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FaCq3yfOr9QKoC10rwMjxjNl0iFIwdtyqm8PD597UiLeD+hMKn+vJemQWRsOBDLVCWod5yjhHuC3mkJrSE4DGCfLoEH0+4UPGL+Xl/T6tPAYlbNHLiJ1jOutTuRA1boo9mRD6sjmPtpnDw4f/Xn02bApVbY3WaKoX7fwJrNcLX6DuVtEUy3jLbEoyVB7/Jd4XZj8y4jfRO3lil/QZpcjAWSXjyAXr7dOQGYnSlxuyArw/ztGHrEU76p8qcdC8A4/mBf4g0kWJgK7Svc/gX0Q53HqQeYr+9HI4h27OVhEaoCfKuUHR8Kf60nfNGQ4P/h63rG2wbq3L0HKdUAs04AVqLHbvtkwHi17MArBLRzDCK1EFrzop/DPAutNbDmWKQzidJAehv1GSJEhUK3yCmxqVWJ3g5vcsVKr9fa48f2RxrGrxPkxGED4EWYjK8EY6UVyEamhjR7/yycFbIPzSfRCt/LpJZSVh6Pt5BPbcuiad1aD06Gxv+4FurUbTS6o36y/NsizXSzXIqRyxqmVSjY57YnTDcBaSL8DDUsrHXEbhxuRsgGfJuMqHx730b+spCqApucuQKbuQKWe7G5uluMvnTkaXp92PkXVkgF13l3vd2FiDweRmTRMwKNvmPo4/BXCwbQO+xt6Ae6ZLmXiPQTrptqCxsHz8k1RTjJRvQgeW1qsuQqDWUAAHvI6SXKVUscdY7G8gQM9lG8D6yFwOUHJ4EMBoOWmnc5s2x4WjDHAz0y+XFILQfSXixqRljD6rv/lr233rMVWEYDssahL4WDMbG9ItvXtBvXPA6j8HuE37nXnO7j0iFsnI3qrqDIOuEOXSbvSEAshQXjBU9XPEf5vrDPSSdM4l20EW8z+TXTjRNAy79SNnG7CcSIoP9cHROclaepRFBz7Z+TjnuBbyz8NpNLljScQZK7ohMqHOc1amLMy3qyFBHt2r0E6Da1Ghw4K2dItg1Ipr4C9YnHSPMoEIQqe8tJVe0n+Bbyi3Cy6s2PnqgSme+BLYxMfE3woxglV0k+kdVvAHX9r2BrSH1JTEegpnpa8g+pMB2xExMiNdbSqcuadsvGMMGkK63gxpKFIt8EYY4X+HItWL3tRIhA5D7818dcibC7ZWDCMFL5/G/7adCbsrnV6Ssa3CzpuT8LGH7MNIni4rKdgo00GUcePhlsIvsvmJkG5+SjKVrL5mym9e5zlTV/540Y7I5BbkDcQkakwskUAxr5o/Qm1MsA7K5HDpQ3YgYGOFZRUg/1FkDSGT8tcKVxPUeBdaccxzgDbzPAvhpxXPq3rimKxevyCEJg/r16m54Ppwg5W2rqc0LJX5Cc0mV9gOXxf7I6BFdFMGlv0xQsmVEeaX9c4lN7+6RGTi8r8P/e6EyOJotk3MaLLOSjrBr2XG2cy6dwiiMz3N4FxIt6FJa4iJUcO2WaASUbzmc3Wts/DzlzjJMCfUevEPzy1PvtYZcOhodoVDvabKlNTSqT6ULSCig11hRrE4ogaSBuDuzFNc6vj/+xsozv8etZhSSxB6jkx9DJd6ja4PKpTfdb28eU2hENiHjm1gEjFAuOm9NmElN34nvqraREOxAp9DqATwYcqaa6ehKbrTniyIyefsbs8N7Xy5K601Qk6XAJ2X6azrmRZr78p0DQeQ3PElUKYdYWvtv4kVaS1u75H6GZuP4spEDwtatOV9g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0707a636-c863-4b99-c034-08d9b5c73f81 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:21.9941 (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: MbM2m59B4ZaR02yEgtHtbRMPx/ReuFTwrQ2aZPh6erkbM4MWwvDDr3RqS3ma1Vys5J+Wd/oVdKbZWpipe/AoG+kBiBBpFbWnQjnQi5BRLwI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1693 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=924 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-ORIG-GUID: HS7HiGz1u9EY9-F4KeiArbm3YToWrDrp X-Proofpoint-GUID: HS7HiGz1u9EY9-F4KeiArbm3YToWrDrp 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 2 19:08:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653337 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 8D67CC433F5 for ; Thu, 2 Dec 2021 19:19:36 +0000 (UTC) Received: from localhost ([::1]:49290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrcE-0003rR-UM for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:19:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSm-0007BO-4C for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:48 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:52624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSk-0006Nc-7W for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:47 -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 1B2IPJNH015766; Thu, 2 Dec 2021 19:09:44 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=r7nwrnGRl2gkSYbtjAxYXIMnCyPNB1g9YnGJOvn/WPeDpi20ViAqMubUXBucODFKrSzY zF5nAzu0SqOUiKmOL+j4V6Ezw0c7hRMWkIu7gkj9m5l4ufwGnuaVc7cJALAqmPS/H1a9 uKVNpd/Nhk8TZ3Fm1sSwWbUvQPW0X7JtYDWGQCFnp34wU27jUU0VvJu9eI+t96hwsSEA zT4nGNBv/9wrYQ9wBg79rPcJRkCau4j33z1C47hPpSFZjA8oSUZnOGOvHYR+AwfDIt75 cIgS59SxcgDLGabWLh2mUvYppin4gbD29XD1h8V9B+v8Bmy8sOrPQjJ1jFQQSgUjjo2G 8A== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp7t1t6wk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:40 +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 1B2IpgJP085846; Thu, 2 Dec 2021 19:09:26 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2044.outbound.protection.outlook.com [104.47.51.44]) by aserp3030.oracle.com with ESMTP id 3ckaqk1xwr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nf3TKSX76d+pa8yxyNn1qFyVXUBwZYpsQac0LbUeoc0udo7aA8zEyY5HoJ0puxLcxSVHQjHivZoxLg0ApsdfpEnmBKQE3aSi9p84jmEpbRR9m+nTHsIL5K28QwmBZ2TURKLomSLKGCU8HTEHrb3R+4puUf27j4r4Ad8sTV5AiKNXIA8WoZzDWkj8w1l2nfo39KQSCtLAQ2Gs+k7nRbZd8OPuTEmiUX7cVZH21gP+d/TUDZnyn0+8z1TmJbtHIK158lVMpM3Q/2Nf+Stys5qj+oNpk07sd3LMgos3wb9UNKBkN0FuSKDjt62mZZqyizt+JZRse8hq/XrzkPBQerEoWg== 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=KzQRIImRE3+WvutJcO6Qy7eBBc+d/AmALp5FEm9WHvNz+uEJZfdpsVq3/BuUcQTEf5WsdUbkZcopCiE1Y1mghR6oZ/YMceGHFU2MyALodPQQhkGRH90iq4Rt4I+086bGov3ht+NixTltFg+DKDNlVm/M6l/C2B3kWsFL67el/YZkiRzL9x2mStOIjEuuCPUEnivYxf+tHjVbQ/P86VtVibud6vtTvzGVpoC9gtGZvQjbtxXcP0n0lrZFaau3q/CmVJ8HrpA5yLpvkZkgG3KuvT3mtdfon5cQ2hxthZD2/hGJRiAtHEyuJWmt/pieIKHfEFtSvpr6cNWlEoSHDk5cGw== 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=AzQR+/gd9+V6oNLoTp5hGcHyjGp6BVsqoMljNN+CHbeW6o6E5wE0UWTgsP74Jg49Tu9jsLzwGo1A4nAEilAEcpt3JrbaENqV3gq3ay9zVbCKvnB4+Lq+1yFqgS4YOoK3+NByWTWUJZLRLiexjPuWCqMDJRNgM+SfvkS5NO9LJ8Q= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1760.namprd10.prod.outlook.com (2603:10b6:301:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Thu, 2 Dec 2021 19:09:24 +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.015; Thu, 2 Dec 2021 19:09:23 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 04/10] ACPI ERST: header file for ERST Date: Thu, 2 Dec 2021 14:08:56 -0500 Message-Id: <1638472142-14396-5-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c290a90f-1967-43a6-7245-08d9b5c74096 X-MS-TrafficTypeDiagnostic: MWHPR10MB1760: 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: BqX29643LkW/P56MeVVyE3sFgSD+Chf0wqqnykFMosxpFQ1NIZgShUqP2iJuT0M5ZTqfEN9+XRPdCm5nAx0UL188qMplzmwEevxkzduI92qTqfY3O9hBKYmAiSS07yPBTBqSk2GGAXvHP/ETkp7IwEmT0VbAXzoclUhIHoPR2eOoauIqos0J3ApAeUehQdhszVMhxhSo02sXUJExpGgGrFMQ0kxf6nhnhn2h96c1y9d3ogX855P2+oPqWVJN5nr41uhEcP2KJO6tv78T+cWknHy8g0lKfHdgly0mBGFzmHs9bSFU/IsBn43rk6rtURI7L/n5kmJmLsvAj/fp3GNLpYsQbfaGN0yA0j6QV+t0+l3+7pBduYplsNclb2lqNpTgbY/k9j/lSuWw85GXzLqlgMKDRI6azNa8pLm4FT5aZtF+KtflCiP0Vf5nr1QRcjRPKGc2dAb3jjbGJDEbWSqeukIe8hBrRX3xwdkbZha+mQ66s4pDFYxSrA/MFpE93Eh84Nck+GUL9QiQiIdTy2TxUqMzq8vrKygzDOkr2Ct4wpnmNuulCHqAb+vJfvm9s3CDwLRCCS7SajcrkufwiZt0prtFLIE8E7e6MTlyMxiZ7/VlyO8XVijSvAdBFKwcC8eMvlAz+ixlnSlAAc0fPWqTnvdKKq2Sc1bTdnFya4HCmu/h50D86mNTNDJCQ9atbHhuilQU8SgM3vmMbzgnb0qM9A== 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)(6666004)(38100700002)(38350700002)(66556008)(36756003)(316002)(66476007)(66946007)(2906002)(4744005)(186003)(6486002)(8676002)(6916009)(26005)(5660300002)(107886003)(52116002)(8936002)(508600001)(7696005)(956004)(4326008)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sENA7feRbgAbdR97q1uen2zGpfvQ8YIkzt97+r5Kvz7qjrf3zbyrtD3fhXLeen3oLpIYRdC8Rk2DhKw1Gmmb+Hmaxbu7nAZ359HeTQ6WLew44MI7WNnoN0zPvP1LMIVOJqlBqYiKuAlsf47tiEKfoLXKcFr/FL2IOHRsKxSOLRW9Emm6bnFflurGR3pcpnm2ElH+Ro65mlU5xp1gJ8om1OgTfK0q40NG4ld6+JNBaUDiLv6JSyTToc/9SSHE0p+iIG8YtJcg0LsP/4hn3bbvTaZm5jGJNOvcs8BYf/WyKaOyM/+ABnswJ62DPF5MonwKOp/n18tnO1Bj5Lg7AiApGtiGDMe080pKXLqj/Za/cGw8SyHFd5ekmk8r8GRSe0+8+vfPExhi8ceuqr3uPeDrbz5OY3UP9Jd4ipTD3fnAHg1X+akR1WYXRmiNUPvEG/ipctlW4Y2a7rLyYRWeC9y6tZ/hB24vGQ8XwVbfU1N2KrRNLKBSBylvIU+cNGmqxjy34tSisq10DKbKR/V13gwP9A1AUUQEmHWyTgncWfKQAw23pOdi0cunrM5B8IkMowQdDLm6xzLb6v91vwGnLiaFYUbbASA3BCJugaPlFjKwJPtV3qXiwGKayV35Gv1Tmt960tBR7uL4k54VsIQ/qWwPNdH58AM2P1JBBduP/Z/T6gJJi9g+3eM6eHmeFTVy5YIiXCkE99iG76g8TR/CjGJZJYau9gmTShqy0a2Mz0fu3tyZRthhIg85WVHPb/nW753hN3/hgVOrwypXQ0bKwjEO3vqWxDcXFdjJSsDVO5F+3Cyg2upUIL48ibecEOqpAk7J6iCnFwDU37j8bwYi/eIxF0elSyPLVWXOWEF9veE96COlmG+1jzWFAtrsudCkpOC9aOnvL/5aNZlOqVs/Qxrw3DRD+05qwz5DD7gCvoPVa157gEKDm5YWg9fg9ixf0FagK3FwGpUFOWmvOg5gHXULeco/OluijjU1Tj7IHjQ6gVyVMhdVIRkc+83E+FUouSbPT4J3rFAMIDLpbBUFMgeA5nz5o2n1+Xf1iXzT1cOVf4ayDEY+LVyHqjuHnDqZqQ4XpyTG1XxSuKK7xtWGMaZ1C9qyW90d35WpngX8Z4ntI6+OkCnnhD4FuMGkcE1468r+lKY5jJq50O1GwnDprlwM1ZCgSVQ/Bj9NOD3cdaV2ehrCvXOoUYZ75tatbMVFc00hKeqp2+sGviPj+KxOn7oK6GzTRO64Pqne5kbYsUsw0QMrPcU090e1HPP98KvPnOZSLwDOzWJpxFCtMKaQN1qxtNh+xXwdDNK7m2ClRPo5YMoa+PCc5vIZ79bxsyr4cw8ioyDiNGkl/cDuaIbuC0CK0jTvWiKsw6PKBWtC5xppm8LXbnHV+Z1iYmf+WkSn8cRZiac4smctLCHLXIpevGBZDP9rMXAcCbpFyiDvZULYfu3efL+oKBI6aZAkIaBc3KAr9iT6qwFU6nQcpVIC8clIvgO6Ko8BM0pXLzz8uz8lvFV6xUWGOLWxX9soK33LbvigGSYTTpeJeG6We8+RncmY1TsJFQG9j2ktgEfx5yu54kcDre/fmGC5k1GHh2KPQ4enjnLQjQGnrVTE/kfqxgwZ4aI4IJeqWEHVXdhtVfM6zZDbmLi3r/Mu1OgPMaknzFOormylS0nI9HZ4QzzB5SETfA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c290a90f-1967-43a6-7245-08d9b5c74096 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:23.7918 (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: Uadi9rWxxRZ4gW6FLFotL3x6Aam9Y4G/X65+bTgHN0m6i/2bmxt/H4zUIMGrm5SulPWkYAtpfvT+WYORxGtMpZcPuGWK81V33L7wuF+JbzQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1760 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-ORIG-GUID: k428dbZxr2uCLdOJiqSTiE_ngbjT9R_e X-Proofpoint-GUID: k428dbZxr2uCLdOJiqSTiE_ngbjT9R_e 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 2 19:08:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653301 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 43381C433F5 for ; Thu, 2 Dec 2021 19:12:52 +0000 (UTC) Received: from localhost ([::1]:34308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrVj-00025r-3h for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:12:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSy-0007Tg-UT for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:01 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:13358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSv-0006O9-JW for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:00 -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 1B2IPJNT015766; Thu, 2 Dec 2021 19:09:55 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=bWk/r8zUH7q3o9L1w2KGrCSMoNUpEy8mu9QEq+I/LEc=; b=Y3Pl8xPmo2lxH354u2Lc5Po7ci8Y8zmZpqnVNyYH/JiYiNezECS1vYL3845LuN1VskVi NXChXNo9vPzQcrnmbdh/TbNtViuBKHaWWJSknDLcLYgV0RYmGHsIvPpAIuXc4nVv5FsK KBlSizHv95QJgX+iLghMpvgTbkxuUmE1tMW3Sb3KjPoMH0OfvjiWwz2ZzA9k2bqQWV+W ho8mp9te/4+YjvnYewv60ciid3j4yqeGW1h/0p+QJC8IO+u6Ct8dEDx3d5q7dTZXDg6+ uQw/o/GsW+hUfkoz6eY7Tdmro2og1V1TWWkWNUWdb4UF6JDPWjWKyqpu/rLXxbc/znuG tA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp7t1t6x8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:53 +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 1B2IoPnr115630; Thu, 2 Dec 2021 19:09:29 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2045.outbound.protection.outlook.com [104.47.51.45]) by userp3020.oracle.com with ESMTP id 3cke4urwa1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O+A6rONbHLnnqUee1DyaUJMyOfNmbsOudF2VymI/d0uSHLul/+tSqVBjl8UdegI/kHG7nWZxZIpxGj75/dF/iUS9548NfcDAYpjdlPJ3cF6wYmxCraGrLqKT35jYre52A/xv1Cus35XTwZfUINDDb4CDz81wOSSariPx/kyg4+SAoZOcvtQYriGj3Um6Z8mzqK+BUIfz0C98VychiTMx+ll3WNzkoeHiMc7bCu/sPWOzLnUxcs6hStYQboYSo/0Z4peqJElDhKt5RKIhrcxPRjKoUZNGd47ygT2pB0OBw2Ew6Q0DRW9aBI6ig8aEUAtycktIQ4SyViKNXIi5nixfaw== 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=bWk/r8zUH7q3o9L1w2KGrCSMoNUpEy8mu9QEq+I/LEc=; b=j0UCw86QggpVqXFeBnYXdBiOlVxTnf6JAbA6PrUdOg/d/Q/69mX7CFEVq1SIqYyxl2mkDMwFroIJ2PIeb+fKAVoxcnEYZPRS2zO+U5hI/u38Lw4Jtgj+yscxaZs3ITnDiwwjkOX1pVEM0kZN9gA14FJf6eN7zqr8zoxIrlYKylWaPrNn0G5xzKH89/QaofIt1niP49LmVNSRY1hvznvafdxU+AkikrC/A0/qgUrGyKeof4xSK/zSU51UYhZwPZBmz6IrmPxmr71xkjG3Y6D/Fyv4bkugEcgy4hWpd9VmvM/vt9UoeOTWBKxUFR3rL+tfNS9YP3HrzayV0xo611xZKw== 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=bWk/r8zUH7q3o9L1w2KGrCSMoNUpEy8mu9QEq+I/LEc=; b=QbUiG6Rt6H+Ufr2VvB3shfaG5kCYj+A+PcaN1thPsvADRtyY3dnknwAm34I/gbt5stujgvk96QGMDpO+VdgR5OMCfgMcU+O8BUaQn7n2lA9Rdtoy1f5UaK1mpQoSXGUTt9RQx3JoawbdTtnyNYMrhl4dMmOTJ11s2l+ciJRY4W4= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1760.namprd10.prod.outlook.com (2603:10b6:301:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Thu, 2 Dec 2021 19:09:25 +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.015; Thu, 2 Dec 2021 19:09:25 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 05/10] ACPI ERST: support for ACPI ERST feature Date: Thu, 2 Dec 2021 14:08:57 -0500 Message-Id: <1638472142-14396-6-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5f70ff0-dddd-4502-310c-08d9b5c741c5 X-MS-TrafficTypeDiagnostic: MWHPR10MB1760: 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: gCpZUB4pQhDhgaC7mffNiEsY1MGhZaCdaFsbB/k1RhzC5ggnJGu8tJGcO7HKdGYcWeb/n3MaZG4QHdIPn5Ak1/X5+uNDAzNDprnhAW35PPx7D8Xld5GKW3znyqpODmDvX1LFkB4OMS8hhwxiggrKSC6TIAT8TBDhLXdrrIFlsicA6V965LOYnUEED2Pa/kRiEyyU5us5QoVSlHB8ZdtXhO6f8YdIi15tZhDnRU637j30u6UAfjjA4/BJIwPnnqdtWPEG9qwixkDQmBBxz0yKHpYgsaMaMk1b1NxIo8uxP0HdvMvGlqkS0JlCdY2Xzfy/2JuqhpQ3Ptluevz8r+ceo+rGWaQJLxS3JJjQVQ/TOUlC32gNtbroNQ3Q0IH59PwIsKTPG/nYMo+VC4Yq0giQT9is32phsYxxg5k0+N2hOtzTgxGZbSsFNoHrwWkG4fIaql9d7XTmsXCkWqw+loUlH+NQSlsgG3fa7lNwW+lAhaQ8FZb2nsCt4nmdtmJUC6s+YMRJAhkwAHwF4GYYTccHT/m198IhCx/Ulgkq/uAWis4Xc8Lxth2dUjrmfwjQ8duGrvq1DDjSXzItST91OWeyf7+KHjsHI1TpcryuuYGMH8YiPYgUHQy3BWM0+N+iW3FFA5V+JDE9auWbwborj/hys3j/IG24CdB9t76Y0MjLqthwZnSas27V7hkil8UtoKMpIwgxLRoBl/P+bSXooYaaYw== 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)(6666004)(38100700002)(38350700002)(66556008)(36756003)(316002)(66476007)(66946007)(2906002)(186003)(6486002)(8676002)(6916009)(26005)(5660300002)(83380400001)(30864003)(107886003)(52116002)(8936002)(508600001)(7696005)(956004)(4326008)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tJIcojWQgHKQ0qqykG3TChkB8u61tAUUmQAZDDT4dHJbWwh0FvwRtPymUr6HP3VftvZZ5vFjQQGjKMdKkz1IM6pIeaZLAH7FIdOKKC3Y1XoOBOVKpvLKGMqbFOYcojkw+4jS6OPFsPSQ8Gl6yOlh5vFJYRkW4BmW/4xonfvMgFgQ7aG5G2ysP/7DHJwbyzbVjKG7p/gUVT/NcFVI7kCEHw/tFFNiUxBfzgfeEsytBJGVdNua1bjWsZ5LxHOIxjSXwQJLxWMZZRlNKgMAv6dGrCCtrAq9qbKRPsLI1OhbmBswHoiFBngrQU5UUU4ZvSwhk7yrytgs/wNXq9kPkOLAUL7j08YzaekLCEiMSZAmGYnSQ/fLxC6RKr+lVcy/ZfYxnrcLmCzFXIs1QVRaiwID6NXQcNnsit3pxr+1WEXf3zwU73B3L0DuH5yfECHNHltoI1cPHDrIynTGHWwc4yEwz1BSwfn6bib94Kp8bzVpVFsNNQ5Nf1+UaO/Y79qWpLjcn3sCuzrl8U1cU+msdRqJuABtA/9raGtyiGhaC1aX9AbB/BgqulfgwktRkPfAiWQ/iVPIKmbUWCKVI5POxFPRYO7dGcMHA8v9CN/f+YT1EQnushjrhu9cuU40yIoUIKH4bZsF1VmablTEpxeg/lvAokHSnH2BJJrEoriFTP5Hm+dttJMU1zWAWhclT4niadiK6hs97/hjuUNCj7vmU/h+mxVu7BIbOSj1nCNiVYEeHp0C39hBMT4vqahXiKpMY6KxNonQH+qY6ZUj2H8zvEx5MBsgOD1C6cYN3wSk40VOoVaF1BBbPWnpFGsI7y9DBNIGgLtRg8vgWZRsqYWZJnkvuvZ38XWUtQeOruU3v3tfRjqJ6/mmhb70fytJdPxIyK73zstHv6hUeb0QX0YzZe3xukIhi7mv6Ls5LYd7SuBB0Bia7g38fUs9SNzXhrBIC2MvzRUsCwGjc/CpnhMzDSnfiWynelMUatMWLhftbIsZ0Kpn8CBPiy3KJ2ZQonYhABUBZEkh8BHfLmVguYxX7pWln92c7gkdZscZpazZcGJBymgPfB9nQSN8dPrEg2QEaAJPuoQ1fpY0sWxFqqoLqwtZOa/L3wvvNAcD4KbH57vITUewA548PHzBy1XlYfScwZlx+ygqCtHNyuHTo8zh4sdYPBjsM2u6m0o7UOJE/yUakT75oexrpHGFXKlmaCZOa23N8pE2QOBFVDF/UqeQor73psqVnw5rZdugnemDnUjzXBnhbekGgUBzpXE4BpU3iZAOGBmARtxNqLlJUShOxilgb2sy9gufsdKTdR/vrdvfZT94WJJMwpPKFZlnjOIJmyvMrutmq/+pCiX7Hxr6f5Fh/sez+zNxGfr6bB+Tosvy541+1HmEBWhjvGaAaHv8P7MG1wxpErTgiabZhOFBeaDOrZS30b2a9Rj9XvdVandPmjsP1YucxsZfOfztyUf4n6pVm2ndtCHH3g077s04TysOZ0QbPVv/r4d+/LWoAleia70YYPINDAGEHzMPsHQReHXowVWOQEs82kJ0H2ezjvDztmqNWsmGjA1aMNvnECRuKjepAenWZRcogTjsalqlZsqVw0zoCKKtaieQjYPRB5JMhFA5uiUG1/n0A7mO67C1V05ICLHPRWzejl09DOZUogEohhYIxWR7lYB12+sILsFZ3w== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5f70ff0-dddd-4502-310c-08d9b5c741c5 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:25.7915 (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: PYFAf/IVqYGFt+Ym5/fxpUty/s2rskY5g1OXm8sf4R5c5HThAPST2aad+h2c637gDHUtJBhu+wuExg4Xn0DlvE6ByjsJPGp2mBRjkt7gLGY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1760 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-ORIG-GUID: UAcb590WABf4lt_MbHe0emOHKe-zHiXW X-Proofpoint-GUID: UAcb590WABf4lt_MbHe0emOHKe-zHiXW 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 --- hw/acpi/Kconfig | 6 + hw/acpi/erst.c | 836 +++++++++++++++++++++++++++++++++++++++++++++++++++ hw/acpi/meson.build | 1 + hw/acpi/trace-events | 15 + 4 files changed, 858 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..4304f55 --- /dev/null +++ b/hw/acpi/erst.c @@ -0,0 +1,836 @@ +/* + * 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 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_EXECUTE_OPERATION_MAGIC 0x9CUL +#define ERST_IS_VALID_RECORD_ID(rid) \ + ((rid != ERST_UNSPECIFIED_RECORD_ID) && \ + (rid != ERST_EMPTY_END_RECORD_ID)) +#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 allocate_erst_record(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 identifer */ + 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 { + /* 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 = allocate_erst_record(s); + if (index) { + nvram = get_nvram_ptr_by_index(s, index); + } else { + 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 2 19:08:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653339 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 D4F02C433F5 for ; Thu, 2 Dec 2021 19:21:16 +0000 (UTC) Received: from localhost ([::1]:51854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrdr-0005kE-V8 for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:21:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrTk-0008O8-5O for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:48 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:47174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrTd-0006Zn-9U for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:45 -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 1B2IwIp7020451; Thu, 2 Dec 2021 19:10:39 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=hsCQ08OMTCt57ojTlBVlHNET6qdDThP/HZhwO0+IHTI=; b=sc1loxJD8ojKOJBCP/BfHhdeW3AAHkMwl0baAqiXBfBjmMEkQqLOerog5bHZUV7+nJ72 SEVkjI0HHmSAM0dNMiTtl8IdE23cd4QHUEOONSICKmshQ1rJot04UCOBq+qu79RruMvJ wfaPu0SvKPJeCcE1rY5bsuQ55Zh9ey/gUSs0ZMp5Iad/JI+lfSdB+y3ZgU+yYYKEerI7 SGU8bOi2Epo88N87IeLrojxkmlt7+19oj05/UQrRflQUBDqmP3YCFTkRAgMPcuuqyK8E UnC1Lz8VF6FTFJS//6N/ipzP0GkE2QK9JHuKsNIKE/vcI9WGVJkNl1zc+K4wJi2qItSR jg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp9gktb27-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:10:37 +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 1B2IoPns115630; Thu, 2 Dec 2021 19:09:30 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2045.outbound.protection.outlook.com [104.47.51.45]) by userp3020.oracle.com with ESMTP id 3cke4urwa1-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P+2mQysxKD5emzjGucIOrfTsjxmFgwYlPnqPpifBD5Xc9K6zReWXMkvNguDzL73D0fACZkYOGLwy1P/xtIdsVxQsLO6mcDuCiDeXgtIwIfLXDw53iu94ZVDRazkDGIvydKM4GxJTaYnGb8UQVgNT2fYxNnWUdnz8i5yRd9hWYf7azsXe1reogeMnwbh9LLpzYFrh+qEWLoNqC6d9L9mOd3eaGLMBheHuBpmpQ5+gtPWqTaS5Ij4X7yw9Z866URD2h5NFH0ZBF5yVNpBhLSDj5VxxxjIpdnmKRlpnrIEoDCYcED2PW7rkw4pdLyTrLTF2gQBsSWnZ6AguLLbroVM0kg== 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=hsCQ08OMTCt57ojTlBVlHNET6qdDThP/HZhwO0+IHTI=; b=LKqTtrCZNnUHWXQ96ZiBUj2jnU3sGX/ISxnBZI2C2ZUKacjZihFjlzSIdYyrYYMDcQOOIgwS3sZL8YE7q/wfevD1ZMc5mHgRuBFcMU/EYaOylLuxv3tO/gGv99Oz1RxOib1sMyIks97j5pUgQ1K3gJL70nnBXHcXmxD05tYCXsgmlbyv657bX0ZmsJPC9TgHxFNh/Os3SPtkaZPuUr8aaEjv6PyQObY4KiIjRj9Nuhq+bsbzsEKryYCsCbeFUXtDPJfr7svtltmPKKaj9T7uCbwlrSKMznzdnaU0pAZr4iPfkjxFchc5n9zFApKKIVFLZpIwpjQ0JjXrZOM0aU9QZQ== 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=hsCQ08OMTCt57ojTlBVlHNET6qdDThP/HZhwO0+IHTI=; b=icQVKqJKI/J9fOBwuMYeaODq7FA6xvKqCw13oimcEOmbd9JUivNxwoy1oBK2NTyLK24MDYaBhG6hZkeozhTodsTsQHT6rvA5aSrJjU5NwwaWZOrKueAYbcNcgir9xI4+0RB+zpTmQgyGCCajLk1xc7IMPsCby6+Ad4Fy39mF8fM= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1760.namprd10.prod.outlook.com (2603:10b6:301:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Thu, 2 Dec 2021 19:09:27 +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.015; Thu, 2 Dec 2021 19:09:27 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 06/10] ACPI ERST: build the ACPI ERST table Date: Thu, 2 Dec 2021 14:08:58 -0500 Message-Id: <1638472142-14396-7-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5dc19392-a4bb-41f0-47d9-08d9b5c742dc X-MS-TrafficTypeDiagnostic: MWHPR10MB1760: 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: wwa8mkBFkPYmv4+G9ZnEOpmh0MeHnMIkaQ9d5iElVbHmOF1J0iQDhEAEBUUe2CZihswSTMjX4PkqFAyMi+ksg+VvWlwlMFZnr3VGirsi5CRod8BUPRozV+CmcXy/rajvDrxzUt+bJbsn6RwKVu4fOY9OgdbTm5xPzYzyI/xOym+WsvMwAB2dmqsv+IxoRHtDb+vIGx+mUjILon0GRboTozeWGReNvhiDX2K2HYbwJ8l9s/kZBeuXp5HhZ9vm7EFCKHIJcEuOMZ5+pPcNbCm8R9fp1XCmqatmWyZUPx37soZweJzuNrSS9pTWmevyhU73326lN5Gf1UfKVtqzQ04SsAVNgujSCL4fnyhWQEOGnydBD8o3SzSUIMbelfMw8DBZCy4rQNxn+exMkKdsREYHjEw41pm5UJ15cZ8YAbFe00+Mf7r2EsykrVryPvDzsNCeoaELgBHzmokiCChy1SWtjV0ObR9lsad8BNYJxiT3qLuWRc2mmplyPb2bPKZ9gAe7bi/Fq6YdQyFu0VNBmIUX48LehmFQw4OeF/47B5eGAHkL6nQVnf6MHBYblLwnCyBj16K2gOvnQq1Ul22KX6J7boCPsJCHrhcU9jVF7ULw8KzMQ31nHVBrQ9sfwYfPErDGW9RIL8Axz2xSpa6nQkCteUYpnuWqDzySEOonBHrITI8kzKVCTP8wSLLe/+2VeNSfSZCTIRPiG3qkAu+Nnx9DCA== 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)(6666004)(38100700002)(38350700002)(66556008)(36756003)(316002)(66476007)(66946007)(2906002)(186003)(6486002)(8676002)(6916009)(26005)(5660300002)(83380400001)(107886003)(52116002)(8936002)(508600001)(7696005)(956004)(4326008)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: l0TZbE4mVBmG1MVI9pp01DIzWQ/zaqpr+0iHWFVf2I4sPxOiwLlyNAMF375z8g+PB8crrZK2PPXZOGDIg67MgKuAVKFGzPvzAeP4MgNtCTcL+SIMAeXdbcZtM9c0A9aM1Lk9gAUf3IWVUxVU4IuNUle81ImOZmXoUhgsvI3SK7TdPMnX2IgJBbIfItDaTOZ7HKu8s1V06JoYM/h8xSAtiGYVvtaIP7q5geV4hJnGghynDlUoXAD5M9jmkbd0TIPXt1ce7YpDzfLQloCCpQ5H9DXDDRc7nQdzpUtuFHgY6e0kevc0Gd0ZMXS1QfheY5RZ3UapGXfkGNg/ohdePkR2C6/I/0hshA+T1dnXFVJsLNhjlxqcZMRyiohgChi9yLbZb+Xb19s74ffV5jk097WKg71A38pSWdkW6pYH9Opsh7IaOInvvp4LuQxbWvqMIXdBf8/kC2H7+tJdzsffX9gRPrgyh+XNHoTPhWXUdpOHmoXcdF3gMd0POvHywNAmsmvzFgK2XpuDCTSHkbQo/9ifWB5OyMGri3/iQP5tgpgL6lQg6fAqBlGhE8eg+AsoqqyfzHHRObU4li29n+IbRNdaVG12zK5wGyHMrpCgLJhpAavA5Iahme4j/CwavA1bPR88W5XhMozp3cR0mDr/sZn+0tuvtGmcMyBPiuSgfHUpRzDlWWuVUp7r2A97rm2OrF2bBArxmXwU8TNGiAFKBq6Vk8nW4Dz1WJkM6gESADsmXV8EpNs55fyDYtORhN4QkLhpbpPbkplgb0OqlwvNEsNV44XPifdsKdFzh96/m4ldZe5iLeWzVDqlyP6oEg8BS3F0KeHYKCjofm5ITcZ+7S4Wu8PWt5jlyXxUcQiVEnlfaCTshxg2QeOB2yKtr56pH0euu0rg6Xi5aSheN2MX8Hww2Oh5K5x+SG3MPt3PXm9rWh3i7XIig8pAsxfReLF5vd+7r78Jbqxg1VWK5NEdcZ+K3YFrv6cx9d6MDb4WBBQeBWfaP7C/pyiigk3fHMVkzhlKevjjcfY1i3nouIGhx4KS6i0UGxA1b1L1muxUvqGwMVLlY6MH4Ay4DY0pfaMwdW2EJWXLsglwgjf/N/a0vlSqbeHu0pi16N3pvXTo3KowLfgp4VX+F5CBjK0vW0CJ0nPYR4ZujKDWSaAajNM53lgwIWhEl8LsfibWsOR3Dirr4VanOwPuXAdNK/N5iTQxzQMvKvjrfcLe9IOYpT56INe2YSx9aPnMVX68syJ5f1nhW/g+/9mIQRLtcNCN1s39XjtkxX4IYBzTNuFzt6mmXrj56lSnBCMFpiSQn5pE7aq3D+ZpXtdJ+Tetz9VdTyInHVPcl3PBWWtF3cYmFHBebvzHa+IaOjwpUr4fUtOL5B9iwkoKX4SZLEAB+IeV3VuTzECGZuVlh1Q+O6FwaAhfBN47EXo+O3Uc7BMjUqNgXveWG+ma8ywS4YPdTcEkdD8I+tJlousTjP56YzYYiCG15LLuzRNZsWo03/E/VU/ZFKayCmMZ+jvZgZ3KEjw4+kpi0mDzflk9wdjYzcxPP0F+dMys/bLzbSChIBPutL5F0lU2qtcSvjLh1bEj69SIgCYqRzt8rJzRCwn5e7pq3AsFXRYSlqoJSfM9fV/n8eGpD7NEuohvfAhCDbgfXE9KE6ZWb+a0TANV3tTs2vi3WTz5cUV/RA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5dc19392-a4bb-41f0-47d9-08d9b5c742dc X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:27.6049 (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: LqDmZ5kGgfCjGrxLD8MT4MqFfFuV9LYCJyi4LCejG/5ZUpgQi5iB3/MaUXir/lSlSu3NDTndeRpwbuOXvebYm6zZA06peFev+EeYLQe+sSY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1760 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-ORIG-GUID: De5PMlFXA0C64KSJekNcwrevSMsQ9yA_ X-Proofpoint-GUID: De5PMlFXA0C64KSJekNcwrevSMsQ9yA_ 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 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 4304f55..06a87af 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -701,6 +701,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; + hwaddr bar0, bar1; + AcpiTable table = { .sig = "ERST", .rev = 1, .oem_id = oem_id, + .oem_table_id = oem_table_id }; + + bar0 = (hwaddr)pci_get_bar_addr(PCI_DEVICE(erst_dev), 0); + trace_acpi_erst_pci_bar_0(bar0); + bar1 = (hwaddr)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 2 19:08:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653345 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 21D61C433EF for ; Thu, 2 Dec 2021 19:33:50 +0000 (UTC) Received: from localhost ([::1]:43104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrq0-00027e-R7 for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:33:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrTU-0007yH-Up for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:33 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:1440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrTJ-0006Sw-3D for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:22 -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 1B2IRjZu015785; Thu, 2 Dec 2021 19:10:19 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=MzROMZhVhh/fxWqlr70+278QWEXvlwgSOAUExxVSFvQ=; b=zbqpIfFCBKUbos4gBm39/Cbh+5sKlG2pjYV9YR7mcXAoFhjfuoKVZTczMHZSnEPUEoI1 H5YIXqtPtsrxIhDdTbD87ZA/7WC0D4Il3+CCW7/04cmGxV5KWtCRZ7IzwD2CmbDk2gyB o55p7oUlq8G8Sfn74F/4gigZR5f5ui8QgvScjHN7J2RfFxqJKS24zWjSLVPy5jJJU7Gt Y+ourDHZUYrTu1U1mRiMxwzuiwH51WRLLNlMkq0PhXJVM3PXaDoGGFwQOoiLm48krJj9 2hRM6FIRMUZEsFKuL1BtaaAc9xmpygCauebDfw/S23yqHVfXxymUp+lL8yvJfi7geipi hA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp7t1t6xg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:57 +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 1B2IoPnu115630; Thu, 2 Dec 2021 19:09:30 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2045.outbound.protection.outlook.com [104.47.51.45]) by userp3020.oracle.com with ESMTP id 3cke4urwa1-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mEvSjJMwOjOAAL+62BdbQ0DfKJkK7HzHqX/VyPp6V8a0Jfo63D89AX7SSepX4KnYwN6tC07ijmr92Qyg8JbCUX/2tMjjvyU9pC7m8J1il+AIdxgwBzVOAazfEXxY+mMUd2O/yCkVTE0MhEfYg5l99WJEbTyb7txzB2qEdvJA3PHRDT+VSCAjzvPg7uSqBu305diUAqADYLGrHXHI8kRdXpwqWHsx8kH+VMcKZ3qIfciyklCYCTdFRXRA8hKvNWWTniWxAA0alOgCZ0VZcV2+fxCgtU0TEcz+mKWjKSmZjLGScmDb9dp5z/6F1f38+S2St/NIQZZ02feJ/caDLgL0ow== 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=MzROMZhVhh/fxWqlr70+278QWEXvlwgSOAUExxVSFvQ=; b=Bkj5l4rCB4Cd1qrLnNZDrPAJo7Xf0w4i22mzTsXI1k2Rk0ZNox4NeTQiwSNDezyQVEF56R3XVHWzsS2glDh/ufDzJPbLrDsS9QehoobkBzLdFJPaaVfW7OWb9aFD53q6czlKHy8IDwK9OYGhBotjfYF+0AttGYcVtFikA1i/M3eost/HJv+ySBlx3WweEozeDaupIqb+3vTrS2OcDSxsMw7CYq+ogIv8ARYJd11WlVdhlpZoHIn2xjI0bNgxSHHDB2o7FuQOMAqV8uXzWX9OH0VoDwh5DpKJz/zYgzEqbGszpOvQaT8VthbXSd+rcjksNpggOSImlxepa7dLOdUZKg== 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=MzROMZhVhh/fxWqlr70+278QWEXvlwgSOAUExxVSFvQ=; b=FZL3E+kycVUmv5jcKr6H60YS9xIYSda43HBzVRgwXlmTkiJp3vhh145V//7dWoIGcqDNZ3Q2Z2nK0rULzvlnEYO9Ld8PddCpO705k1/vyCP3s1jO2xQmevTJfbCiwQEJi9KU2PRIkVEzxrBYiRhK4XM2RhXI7VHyBhnKBDsf5S8= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1760.namprd10.prod.outlook.com (2603:10b6:301:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Thu, 2 Dec 2021 19:09:29 +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.015; Thu, 2 Dec 2021 19:09:29 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 07/10] ACPI ERST: create ACPI ERST table for pc/x86 machines Date: Thu, 2 Dec 2021 14:08:59 -0500 Message-Id: <1638472142-14396-8-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bca55b1a-e200-44b1-941b-08d9b5c7440d X-MS-TrafficTypeDiagnostic: MWHPR10MB1760: 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: lDV2/bIZrr3jFJ9l7S359XXse19Q1f1s+jitvQiUleCwNqeFvRgDRSqdZzeRPzy//3mDvQNfDASZVzdJIodHDAVYGPYfY8OK8xGPAbUgnn/TNeY7lZe0L1/UBK01Jx4mvWURDudyQ8ZN24a8R1TT2wP6NwOBVO6lkjZ5fvAeYtPEPOVQGEBSTSmnXPi7Yx46/ah2k32RnatOOLUG8XWSv6wwr+fmcWkCVcUX+RrOpIuipRtmpkfgc7QipBj5THGK/oou+TQ4VumLoI6q/yF5Fg9smsUmXfsaLusHfsHXfAfli7xwZ7W3QZCQrxSYwrZ5+/sJb8ioBcdwRUD1KSIBKqoK9CXb1ItWr+sVPC50RUxL12erh+qLMiteZebZl5RQhjfiEOJFBHU2oMhcN9DTuBfoSwvZduozVnYrBQXuvrFP/RceBhXmfnWgVWKUWboKQ1OdPwfkNR1orJewgqBnjB1JMNhzqPV9u0oOclYQYInKn74c2nDhbyfab148meRFeZcwbxJIiFnWQQwA3gDRH6dWoZvy0ua7CYf+4SrqmJjXzl/IKTaSo59qedrJhC2Kxcuwo0jeVseWJE3eR9dmRQY6wpRShYySCpA/loi4QTmA8gLrOCNCIuCWHAaWTWZX8vs7OH6fuVT8FT5fWhw+so6GYYMGOnAeZf12jqw7MYEGEg8g3/pcyTA0X2SNUG43pXNK6EJnwn3VkfeD9Ch5oQ== 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)(6666004)(38100700002)(38350700002)(66556008)(36756003)(316002)(66476007)(66946007)(2906002)(186003)(6486002)(8676002)(6916009)(26005)(5660300002)(107886003)(52116002)(8936002)(508600001)(7696005)(956004)(4326008)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Pi4xPaaULYnMfFaz+64PViwWn0fbSsSDqaLmxo0+cT9kEQX1Pv77pqcQ/hU26MrsTbIQD9wenRrvt0nSqYoBMBYCLCcx58r2NnUA5HgYWFIssfU5xqwwUeOg1FiLxkxKEO53MDLMO4XoMgHUqpZi1G4hsS3HPo026Qew5cJLa7IWDlhvydIj/X4dIBgv8K6InkJfRNKblGVgPT027pdQ96Y24Wv8ylJ0ICBzBR2dwbAjLMxYpP1+S7DxNVAwOR/54XaNq8wDqJN/Lxy99umQ23COI5zI77ffh6NmaKsJB1lCCkv1nyXQFB0DBBgS0vw2sYzyg2QkFqPaOoy0fTmRoZIS6zAQOmQyPkLEXBIqpfGP61kfGPEpv2M29Uqt3NGzNaU+lI8lYeAbgRRLBkjHojID7H5+/nIZRe43lc0JsCLsbpfpr/i3Ye7zRhWHJClKujTqjJYvCxdBlns6G1qRxHqkTGfEog3+IzMalxmCKkbFBeW36/GqQAh4zQuc6FMwEZjyedu6RSiOtnlgY6yfgFPSnzVj+1tsR+J2YJj2vEq+gEFIxG6RwIhQsBQyY+cw46pjKwv5cZXKfJ/OZqnV5BlAl1shzIoMtBvI94GAK1Fng5Y+yxFe3U2536LmrVc53mQ8nvkJqRSPxOIBYuHHlgQzO2sD8f+zPtYfD8IOKJ4jLsNN+5zuGJTamiWBjHNyD3q6FZFp8i/su2V7pu4iA70Zgg5xsA6tZ/VDnGXE8KwO/GbVaw4PShbLw8iJQxw1TT9paOiY+cCkH+ZFWHY1iVmeeF0S+UdZlwGS7L/9b8E4dCycpLTN0+ENWWVwDJud57cHXrMzDYxJJytPXA6ENzCJzoCXlbzBwzeC/Cble0p+8HBMJnltW/jpWQt21YUcPg8KSu/PEwMBUW0nl1ykpGWFHpeUX4Nl0E0odiJeKb9i1QkMCrdkzpdBIGdraGdKwHgChhJGoFskWiOaO5WMvmC0VTmAKnX3rNHCEno9L4qG9oqtXUxlC0LsbgKYpAvydcD0kbSpEP7C7GET5s7BV8YmEVU1olzxIyHpPLdEDN2pkI1p0luOloUH2FsJ6yaRDKu4rXFc3vx6AQSMiwcvVZylfU53OWwmL1CVz/Co8w/6PQ3tjlAKI9kJU6huN2FXH/bSPJGIuL8Sk5AD75lp4enHjxdfQyWx8psMUmPCgFraaY0lLaWcuadSb+/B73O638iXjQQHF/wzePHimCuMsVLbZU29vF1/oqqTs7z/KWq45LHB03nBHu7aKNJUfH9eizNMeQ27ln+G1/z3s9/cYFr6NNI3T0sqwyDLxP5mzJtn+PK/X0d0/j+UxMkLctk/DDTbHHcpKh656btmDkKbzqWV73LleKHJgJNnS9gVkFNLTIFQchKarysXpqkBQSu7bN+4+r9uryIvhr266AUylPWzx8jODvhafZpoBKbc9i1pNtjnWa81b98sFlXKbrg2w4eBT6l5I1e1SFIi2tJ/hqNV0SE34+9khaFjQHDvoNWIftHg7qPivQF124W4rVMoLa6LfneDbugTyDKe6vd85kBDlw0e6rOEXcWfN9Eyl3w85X84jp2wDzAq2lKxdQ4tkHU36sZPn7jU4UUwbfn+gD6stKeeaYoNFbPVo527wjAfKNGSl8m+cUIQNtLDILQZVkoBX8ut232dMqSJdROpSQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bca55b1a-e200-44b1-941b-08d9b5c7440d X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:29.6358 (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: 9gN4sX5Z8IHSsc+daOqkZ4zs2W62kPDDoOZhNT35WySPd3j4EOyn2glT3vCPjPYkQ0Kf++++T7st20F1J70x7qJG7rLE2YiRArurgw3L9pQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1760 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-ORIG-GUID: f5k01bcl1fMVFRxLYb0t0wuv38AKkNDH X-Proofpoint-GUID: f5k01bcl1fMVFRxLYb0t0wuv38AKkNDH 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 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 2 19:09:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653303 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 9F807C433EF for ; Thu, 2 Dec 2021 19:13:31 +0000 (UTC) Received: from localhost ([::1]:36854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrWM-0003np-Gr for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:13:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrTk-0008O3-4Z for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:48 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:48994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrTe-0006Zw-4N for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:44 -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 1B2IwIp8020451; Thu, 2 Dec 2021 19:10:40 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=JQGsay7cIAOF1KwSuMzOSBXpT6ToikRNSVgCQksB/DFj2dPzGsPtI80x/qRtNP6JpDiO tLFIINpvQa6TTUxuGj2kB/g+8psB2vbT/NKxNCCG9k+IgYlh4BV5Om9e6azKWMVFr55W UshvDUlDy98gMDLCBh6sZwYvXriw6x5GiRDf5Yv36nxZ5DQsZ06B2O7ppdn6Oda2HD9a T5AEk0AA0qlm1PMW1OUeQPXwDQJg7kjo7MwRFokTNHSURTsxa32l03zq0fd9JowD2F3j lN6RrNwVeFsVP3ZbAhdM2hb4l0R103h7lWlgtdDxanPE9vOjqKtARwfEVYfovbn2YZu9 EQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp9gktb2r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:10:38 +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 1B2IoP4H115582; Thu, 2 Dec 2021 19:09:33 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2048.outbound.protection.outlook.com [104.47.51.48]) by userp3020.oracle.com with ESMTP id 3cke4urwd9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kOvwhNF2u0CN2vmocQ+6IvPNtR5p5Px7zPPbIHY/anzdUL07Gwj93cmAugfPN06XG92bONpnUTsrYJUZKmGkyBecXeQrvPrGAQx2YuuQd3DkD1t4QE7ChkNwfA3jUb0JNrH3sjHHB3a389H317nKP/cbK1qB+OxPRS/rPPR+zfheZmyWZ0WGSAmecai8F89z+80COcDEay4puaRYcxr7n+OHfY/TPTBQSKaot5b83RII5QATJhr6t8LqikWIcdwM/VdgAIT2RG9H2i9PTjWJO8zqQQfi2tmD4K8ZpX8qRcHoc+JDdpiD7JCdvP06X08AlDM9HmLN8+tgjgKqS0fpnA== 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=W0GCHkRCo+MsUU3fl/3L7sCr23bLGNTGvVBojOnzcMxQIyQnC0w3oHxzT/plwT46645CAVlKVJI/jCmXl5rckbVsySF+OOgGePGBTlnB2VERxvDOVpvIK/0kVC/oXoql0F7adrNDbX/Y9h0dQFxIaAFnZ7RMNiT9z03bsxCYhVsiX0tDPwjG/lONGt4/LTcD6Y9BUo71NPvzJIrI7brPpRXqg9Ox4X+3qX2z4oz/VP86YuIwOP0K/d1pYwNBPP+14YQK3BgUaHyea7CaSuK+VfxplbBkXpZrfImpb+GR43jNwdxboUfiv+9rQZaxx7FDaRrvV2NhZjmAZwPIRCzh0A== 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=h0P2c3p6aktOe5sWMzLnTHvSjfx9ZPRVB4tAqSEhBnIf9bNuAkUDD/bcLe6ykTdaVCvp90D+f5+AI2D7O7hxFjwxaBqHiqIP2IKClleLNTHJFhYhP6Y328mUooGAuM7WqDEJdIp3xAYLZpP1XuTy2CJPnZQMALRllHHcwsdhd6c= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1760.namprd10.prod.outlook.com (2603:10b6:301:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Thu, 2 Dec 2021 19:09:31 +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.015; Thu, 2 Dec 2021 19:09:31 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 08/10] ACPI ERST: qtest for ERST Date: Thu, 2 Dec 2021 14:09:00 -0500 Message-Id: <1638472142-14396-9-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0770db10-511e-4c82-ac02-08d9b5c74524 X-MS-TrafficTypeDiagnostic: MWHPR10MB1760: 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: hScctRByA2MyrJFwL2Aa1ljcjzI1Qfw6gJqXUy4ha0yD7n2f+8BKV2ra8onP2AoTNc1Q3M/Gzh1Ic+7ORaJMWLpe9lJ69AqhXKKD8nmi3d3+RwRnw4h1cZwHO+BqXjOjmcHzJJI/aU/gzcdoVGzs9eG/y2+SY+n+IAZXQIiqQlVrsdcZIPY03oge+eozhl1F006tcEb7aN6wnSOQKge/tlivua+UstQgx4NVFtYo6PTKMjj4xt1foVsXS8XV/r7snCG8Vawc7O25f0Duzm8nkUoQ22pRfI5Tx/O9S0Tiiza5yVBOiB7nG3hBFQDKRz8bFyCdr4I8F7ZwUf9Tmj9qusayypZQQ+ln+bAw9Vzf+Og93sVxuYesfP3wkMrreHad4LrLx5L2DMZezEho9fuinjuF2/S+YPESkGmgvrNkFP5WxLzNboWZfscANg+pvlWZJWxOJ8OdHQ+LneUJCRdsKP6NXRsrZL/XHKsvOX8bHxrnWxm9+RPZ05dK0+mzHgheoLzPzWNDSiEwBEgUiZNVupFgVbC3bfU2TUTLBhR8vpR0X88hnFCaHMnffYkJx4+s1zrZAWedgHIq0BhePbv2uE+eaXCyYvKyI5z7oDc3CtRWaS+xuWIPomJo+ycHtXwivzJXYWPwyM2BPKDEOiuNLWm42U81d/mm1B6C7Y/aBnl+3Gjfbv9ljKh8rUepIRWVmSnaY/ijALHpN6qzCbt0pw== 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)(6666004)(38100700002)(38350700002)(66556008)(36756003)(316002)(66476007)(66946007)(2906002)(186003)(6486002)(8676002)(6916009)(26005)(5660300002)(83380400001)(107886003)(52116002)(8936002)(508600001)(7696005)(956004)(4326008)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TNT94/CR9BItA7wVZlT80hC3/76OaigPtUVp5YkTYkG/oazyLoeb9C0/00BGzyCgDTWi9CBuu0iFnMne36b2gmgVL1n1Ymt2wsWhJi9nDL54AbYtu7WnW3ehZ2ZrNnbMA+M0mKT5NoniL28cwI6LKbppkEOBar1RSPCr0wO/qSbyy7txJEjR765V7Pjszhx0M1zEN3+A/4AA73fN2WJVcJTPSuAnPUGrjP6LYQcMiIYF1BHy2erck0iNmcT8EE+qgtavGFiRmwMZkx2piBtlizru1cfSPCIUJbFuJgtffLlTyr2mWDpYADXHrDiQCDyVHjZC/t554Ue7TNQBTwF8pDg3ljpiB0mV3dDyS7SCzVJrYA0W5tYqPfa8Sff44EdQChIi54QSsQC839crcE7g86mGmFmxKdTLzU8rPAC84ktIOBqOP/LGxyzFgrVWUfIfXn8ARJC5NFFhwFA5OpvA2y+4fZSQ2A72H8ELm9QT0VpqFzZYebNz61QnGHTAH18MI8vSZByR+KiOfHIrOKvozgB4+RdcYmBU5m2+zDnQB+cLw7vLaO3J3fYgUMssGnPV5pMbtW/nTd6lWXgoxGpu1YX80BnbP1hNVwdtd0N0vkc/5plhyTS3cPNVlipXY71pfchhgWslpGuwSw1mLVfyMS7msf0IQZO3vzMseNSC0qVjEINhv1nS0mTYwK/8yRsyjwHDYDkuqX4wd/DQzGhg6BxUNSFpbdC1JpAKKFT1IyOTZWEu8VOumSyHmjprALtPPb/f62t6AW81Q691+dKmLluaahtiDdvurfUBMzsW8TiS2w3mogJMlnnmWe8f2mgJNZcAg1OELW6YKUlP8dvRpHFGzLSjScLhyHOmFQxSxWNlh2tCIurBIrhJrqrMKmGP+1doP52QSo5Fwbz6dSmCZznO+P6CWid7prpmAW63+rhwVvxusY53ZZi6Zf/TIsxW+2Y2tvYo045V1viAB0cmuorFb/lAKA/glJZGHTjYkb33iNbUTUjKOlTSEQutGgvPzoGUzUk/okjiMg+xrIz1YDsLAzyCM6orSG5xTubGskbAssATcy03ERGp+ukG7O4d3yrK75ytguyClQpqCLi286zEZUo3lAk91m2jnpPAN6OMBF3hOdYP1dTjgghttLalWkeDNdapAoe6k9yv7n4Clx5IyodKCjmSMh3VHH9qt4cWF58Umde9D6jmQsS3M7+5H9lRQHaw7mpazraaTo+44BGUrWpRtfwsmpwnahQUu/njCveeGpkLX4GL//Zs2g05jzW6Xh6l2LIK4tHazZHJHCAoFh60L9eZgy4iDHvKpr2Ay8dO18BXiXtbU6Xz5JrzVLyVbiwvCZolvkOYhnJkvhlXBP5zRB/05xn3ey7M7pKiPRn6I6AoIv2JrIVUJIp3+eRrtXE969rCaSyZ8K3RTJc4FbHtmMICf4FbUwvlo+LmYXfzVTUQU3qRwUgm+DdCy8JJQ8hjoPJye5NA4SjWBTqdfHnWEhz+J8ZQTRa/DrueRQyOzypTbUZL5gEURJFaTtgEZFjcw0OMGC/Yz52nA91/ITczE8YHg7ao92lTOf6+F0TjDPyh6+jp0SYzwGyfWhs+piWl+3F5H6XRCKjf4uSdsvkG5Tpsg4ThHPuVc5/+SpoyZibZ/ifTLds0OFBvEbzE+/NYoFfeqgC2X0rDLQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0770db10-511e-4c82-ac02-08d9b5c74524 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:31.4348 (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: z7tBP1znJPNA4u5Kf4ovop+LPg0O+BmFdTErj92Bxeijrw3mqG3FeYA5c8Jn8x/S2FmdwaR9AqbGtXvrHTkyKvbF9FKHBjlm50XrRkc/JiA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1760 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-ORIG-GUID: Ks3X1Bk1nH7KJVXrai7G9f9KfuZAwCyB X-Proofpoint-GUID: Ks3X1Bk1nH7KJVXrai7G9f9KfuZAwCyB 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 2 19:09:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653309 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 3E790C433EF for ; Thu, 2 Dec 2021 19:16:52 +0000 (UTC) Received: from localhost ([::1]:43128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrZb-00083p-6E for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:16:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrT1-0007VH-C9 for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:03 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:17978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSy-0006OV-MO for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:10:02 -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 1B2J2Yud020374; Thu, 2 Dec 2021 19:09:59 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=hue1FbAQNu+6fNtHW6xreW4UF9J/jJW7uHhvWwkmuQk=; b=wqeXmH6SlDdCVFt0TJvCeXkzzrGmzj/BpH2tH/tXj/zUwsYrf0EymiIkxSULxs+03rlP klGv0QiTQ3tk8F93qy2gKdkF/URMVZCaD+CqGs7NXTnlxhgF5/bKu9jwXPSxKDB1kadG C66S7FfJQ0xGTr2Y5ilJ8R6V/SNhMhb/EQWWVyPachxfHxH1ZvsFhoWmBJ2k+4H5+CPI BcRfoImvmr7UtOhwEV8jXtUaYX2em976jkBJO2J+1ZzN9MTo7eBfPJNTUWlinIdi/MrQ GD+bDPKk3oUgmO2zC9FZUXvnhqwWo7U0hqjkfKxbU3oYpoN20L8V4G5ymNhcHPPNT/tp 4w== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp9r5a8tx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:56 +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 1B2IoP4I115582; Thu, 2 Dec 2021 19:09:34 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2048.outbound.protection.outlook.com [104.47.51.48]) by userp3020.oracle.com with ESMTP id 3cke4urwd9-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i63AHNCWBslZ+PNjsGcDrcYNcUpTavsRTeJe5NJqRncQ3sVSGIfNzKHZpmHCso2mY2ikc0aVlOrmZka3J/RT29fGhFILM2Ix6oO9gXA39MIIFKSiVw57URhXYC3fUWNKwNyy8OWs6Bj3VNwUMIDl4AxDQB9lGDp1e1eqzjHjphIWAR4gEteEM7CxVVd6xWc0mTEo8IXPsg/yZXU5uNn5eQ9xwZEqdLvv5jBgKZRqUx+ksTuuy/nvagw//+/SG3Uvj1Z0Clb9a16h1pP7MrNMlg4vyzJ/nreYPlAYkDNTtZUzo+YrzwZqQNl/u2htxesQhSn0XZxjA2W7pCSn4LqEwA== 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=hue1FbAQNu+6fNtHW6xreW4UF9J/jJW7uHhvWwkmuQk=; b=hrimXqcnxskqRO+6/fHmGY5VEomNCsLmamaufK7laciDyGPmBsfSDPRBVvh3FE87EBYe6F2Pq4EmbBlOEfcqjIo/FTTcluZtSQoruD39XHpkfL10PrQl+qoctkD1gEip/NE1Lep5/sotw+xZMSVUbKUfFwc6U7Lig6OzgZyaRIdjTIZzyMsf+aFxWpekbK4GC6vJDsTpbrfN+J9Sw3ZmmM7apujRo6V5ZFad1m0UGjoClN7J00OadqTA3+6V4mf5SD1hZSlOoYMAGrK3ZD1RX1KMNpzFATnt8KM/NopqmGDL/KtEPgjisbHUVwbs/vgb26Pndb9oLtt7ahr2Zi5BuQ== 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=hue1FbAQNu+6fNtHW6xreW4UF9J/jJW7uHhvWwkmuQk=; b=aedbL0AKzrABlmkyXc5BjJwG+Xp/XSp+6rzMfhltOhQEZutlSXZfXqyD60ROY3mIsEMMSsKdQWKDbckAz+TvcrpsxsEhYtNu2P2HtQvzE8paT4+LXGSipSu4SY6pT5pVq7VQgu5pff0sQLpLM3svnnz+74wmm8DFx3gcZTEbzr0= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1760.namprd10.prod.outlook.com (2603:10b6:301:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Thu, 2 Dec 2021 19:09:33 +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.015; Thu, 2 Dec 2021 19:09:33 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 09/10] ACPI ERST: bios-tables-test testcase Date: Thu, 2 Dec 2021 14:09:01 -0500 Message-Id: <1638472142-14396-10-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0cf2cd2e-3eae-4e90-2f69-08d9b5c74639 X-MS-TrafficTypeDiagnostic: MWHPR10MB1760: 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: fiAvkfzIdCoRWsO7gSlA8pnqGHKS96snYdDTaRd4xioKDv4ueLpIDi2VBuxXKFu0TgeRyu9hn23jYSWUSkCJ4aZrl+SuloiStbB5j580Onb5TjDIsV3ZJjtNzMxvNL/7m6ypMBHkt7EcPF5qaGZI0mc3goqaSlX2V949ru+dWJeHM8SMkceo3DgFJTe3ybuLP/YLCrF0PJ0WhPdUX7duAHwJbBVdRN56Jglz/pk+tqh14B4P7ZTbShL+0EtstMSUaxZrY3har9fCCQd8UnVT9qCgKYfSBvjSgxyfHAsqJzzzb0XASngJUAbeRiHbA9NNp4Z55MFd/7UTJny7RWPVdB+IR6Z66RV8z0MzTUqouhIGMPA9QrojIlzbUu45CrKxwGX06RVVCsw0pSjRmqp9bZeGPTKRkN5qq5eL2XxmNqON0CeI7IPs2iLEdzKPktJ2z/994YGm0KyLBQur7SmFkYyxLrcxsktvU8oKR2EDm9lHoj/KaUUcYSC5AXvNK8vCluMkqNXInhPNqj8fUW1Exut9boa6XW862ROZ8GqntKeIgsI43PIpmFehXllx+9Pg3jgses1tC4IJ1peyRxleBQm5da3v81Yrq6eX1hjP0fkKK0GRCqkky9z3rIJviHsG2hCFXOHt1NbplhP4sKKf7Ua5tjZ+LF9TE3ljRkH00jSUdquXR2NVaaJArPuYkb4W9zJB6GRMlcCPbW9NdAR5YQ== 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)(6666004)(38100700002)(38350700002)(66556008)(36756003)(316002)(66476007)(66946007)(2906002)(186003)(6486002)(8676002)(6916009)(26005)(5660300002)(107886003)(52116002)(8936002)(508600001)(7696005)(956004)(4326008)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FKDxZh68gZwz93jDdOB1vyreDl6s1Ch9YmBtbWH8aWr29H4KD+Zn1My+U2kKDEgW9tu1jkeBAgTuSQnoWZv8ImPj6xV90iKbe/mRh9OhJlMw1tm3x04Ynk4gybeSjyb6WQv/D0mK5SjZh9VbaiJz0eUKvGr4RFBqzO0R84nCen9x/4Aol9qar0UC/uf+9TG15CC6K+fq0rCZ/SrV1Hl/19n1HLH0IuJxpNBAoKXaOeZbqPK6Umh8sMqRqWTe+EdZl1wlg11rnqhgFgWUSjoQfyFkmqiZWWP3EYATybsG08skeqomdA7V9ZXRGq/EfdhaY1jTdu9gtu3ESZuqadR8Xnz99Enxmw/9ZNJSfvYgrfHmuFaGjy17iGZyXWgyW60mYszMqI3vi4tEGHzPrbHvv471tCgc+a3SnzNsaG2pEEaPNZcDEico0nvM3LqGi2SA9rSl9xhfllPFRPep4cf2bzkeoY6qTM+LnyMcfpisdJHbvevePt5OT1VTuXY5hRx59T0on5pkD8TVaJxR/1Vx8GbcP9DvWSP/kJGxn84JmtOnmjaddA1aPeFSihWVd+Z6LHiBZC9rVlnG4Y7IavrOncUnDSOp8MRHPjIUI/Du5PVpvExk6sd3RZi7XDkW7FIYrUVLhxNfsCNkptGvMFD/FpycTrzdfREcrDW0iPNoPKkRCHDpGr5JrdJHfXVEC4QXmNj35Hs5BgMl4E5hqGsJf5bqpGS57mA3ymoMdrHnuifpqy1b3QGSjs8sibffIonh+x7GD8iH1BtvE8FBOb93eAiTKeZsxET2le6g1LdG7QMpR7mGnsgR3AhhRnqktKKzw5lYmNRLw2f6n+OJ/qH8JFy754Obo/Nlvu+yS9sFWw3/j1gdHg+6s3GrQbWalTpV1Y/QLc62Y3nhFa0fq0XZSPcYV0wl4PEx4tVL7dBpuupPAabhBUMJARlfDuhCOTGIr3eh3xf2kOpBWF7LkXb6KQcNDDTT0UUH/cxN7SvhmI8lXIMD2KxmY/PqpJAMmWh1vwWeyLNnNkAy1J6Fsniyti8bvaNSB9uTnr5BQcMkXKiddrV8UyjA0j8f+FXX0DVxqZDlPGS+V3R5JgCXfsd3kaO5n3MZ4uMaXeY09LRZ09RHjxwCnxCJp+SKJnLnCwFZXuVa5ElK2zunOWxdytsmELxTjKIHpGVmwMp2iitm2BbnQwY52A3HCbQJ9eKXb6Jm2Zh9T8QncSVwScrgiyj2w40GGCf4XnFGjtGD30pQ5yxb516tJeDE9GOQtEmK+5a3Q6LmikiWEjNvR+nQmFlYFN9WaeplfJyi1SIzq5U+yorRdaLxUhggy8GFqPNSQC4icioXs4lO/hC91514aMJXoprrK+TwD9l/My2hcMOnRKKOAnFaxHkAJYiOHg/8LTjqm1dqjq/QIj9CGDnE/BQmsRkzmCByuOh+aO4csYp5f7UQQYQaDnwpKilzVUbK0eMnZTx82tEcfACpQtHE7Jsu5abIZ41yADyfaJQYp0/Qko2ynIh9N+mfjCdNU+9d/QDjQOQs2cnYXqDXm4DPIrjwVh9fazqiMGm1HZwQoTFJeOhdtn7HY5frSl38LxNaDMDWsZhSwL5MeX+ePsBmf+xyz1bn/7TgODIkMNE2HC/MOr8rHYOSege/DGWUnaszhCqqltwQ2SIrmhuKb8xC5K/Zpw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cf2cd2e-3eae-4e90-2f69-08d9b5c74639 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:33.2797 (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: tnU1Sf7FeJzt6jZhRPjj5vjejDOE0b9/HrxApERKEB4bHgDePv8VBS+Y+jvdF0vPwZOzakGkhADcHrSH+N7zKSGiQgyvApGVoKeaE0MSuMs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1760 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=984 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-ORIG-GUID: TYbAeKKTzKpVTBZhZrG7goyGsotJyusy X-Proofpoint-GUID: TYbAeKKTzKpVTBZhZrG7goyGsotJyusy 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 2 19:09:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12653341 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 4438AC433EF for ; Thu, 2 Dec 2021 19:24:32 +0000 (UTC) Received: from localhost ([::1]:56696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msrh1-0000eT-5X for qemu-devel@archiver.kernel.org; Thu, 02 Dec 2021 14:24:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSx-0007Ri-1O for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:59 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:21726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msrSs-0006Nn-NG for qemu-devel@nongnu.org; Thu, 02 Dec 2021 14:09:58 -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 1B2IlR1t024274; Thu, 2 Dec 2021 19:09:48 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=wjU8eZmaW7smmH/zhs6MyIuQE/spXPGDYehAbMF8yh8=; b=ZVl+Yk50HbgOtC7yb8oippqhT5ojqyiQ72qWnou4PeSD7Yz3c1b4Y1vOjANq7xAqdmZ9 3kwipks5zufUAhNA+dqk0QjZ7cNi+nvY+YvyyfJGRfMraAQ8dE5I+7eOcWdlq6SMBNMl fJIlfNIcBZ2Kc1ZRyWgJ1MmyqKDupzFzcEZsPECRw8dPhydje7VERivus2UuGKXZ3gqR IdY0tiUHo6jxGNR3Gzssqoar1J7Vxc+pal4roUtyu2sseP7qWgPjv0HNoREYvAt7vaV3 ww19+tgTMeE2xtU1YMBe6Udj+WEY72uKvavBk6TeYKtV24kLnzPlUZ8y7/psriVss2MI hg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3cpasys3ak-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:44 +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 1B2Ipfrt085637; Thu, 2 Dec 2021 19:09:38 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2177.outbound.protection.outlook.com [104.47.73.177]) by aserp3030.oracle.com with ESMTP id 3ckaqk1y4s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Dec 2021 19:09:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eRsiy/vrwm5FF776D9Oha7sCfOd8RRXaPzhhfVwOwxmMhp2Dx2+XDfZugOVgExtLFuZQQxrVD7Rldu43cOa6Yt7OIPjKrlyTBmFvoprm92gWv5Do94emOHJy5yuTiTuOrTUNMWv+BznIm6aV4jj9GTm7F3kPF6ybXbd28B/vuy3Cr2MV6F6I391Fi3RCf/WpbT7XRtfGdfTM20xwb1CxspvKjc8O8GMFKhi1tc2h19vlMIPmYFIn1Zl7XvQ8DUP5HPgGSyEy4WwINDfGTNadD54O/+MdibyOr8Se/3Zp2WBwjcgxuZmO5vMGwrodIh3gUrLruluMC18PSHPVtFBNUg== 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=wjU8eZmaW7smmH/zhs6MyIuQE/spXPGDYehAbMF8yh8=; b=B7+LNR9ZI8ToFXMG8tw1a3JpboPai26Pybrmr+EVyi82UThgP3LzQtankIAgTgpmUMnZq9q60Whb6J8qjg3H/+GAIN8Z3YcEil13Db1Z1C0fGX5fp43fEjCFrRH8z0wN0PUUrwZSoZ0HjHlngSMUAlsYM8cAln2LLkq0SRIH07BPldB/Shnd7e1Yw3qdqnW3ZPw2eDeP+GhKJapECN/AKAQi94XMRpyMrwtoxgsWFmJ3jhWw+fQOqoGeYRonWTonpBRVEvdNyfZzr73AsrgbUX2d4UHeUM6iA1xrL2qFLXzH25FQuwcgmqgFWhP5daxzRR7VqAtZrFgeDyIEk2xLmw== 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=wjU8eZmaW7smmH/zhs6MyIuQE/spXPGDYehAbMF8yh8=; b=Bwx1U6UmUjcK/3yWyH4G57rCE40jvNkSpovTk5Vo44Bam5FRDBHUPD6lQiukwS1PoC9q/1lUF70L4k5648LAmacfB5EaO6MOEoPO4vLOoJPZWoOAdT8mC9ALKmcm64IKeEAhgyQqf7dVJvXv1HMR+4m418bOMdvMc/+BvqeHNwg= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1760.namprd10.prod.outlook.com (2603:10b6:301:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Thu, 2 Dec 2021 19:09:35 +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.015; Thu, 2 Dec 2021 19:09:35 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v9 10/10] ACPI ERST: step 6 of bios-tables-test.c Date: Thu, 2 Dec 2021 14:09:02 -0500 Message-Id: <1638472142-14396-11-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> References: <1638472142-14396-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) 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 SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 2 Dec 2021 19:09:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2587caca-bd31-4da8-2fae-08d9b5c74768 X-MS-TrafficTypeDiagnostic: MWHPR10MB1760: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:126; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BVD3FfKgDoWr9SQIYHUb2mWFmVgxiGDmmmn5uMxz2KslLk6o6lPP2IoMHMkGQNmqMeQr5thu75fL+DfJfEd8kssuVH1DJU2im55FRW7MC7IFEaxd9N+bXcyuTr/+y0/AGd7aY3P5yI0B9tNSfuCnn3wWa044OJHwa7eQKWRLG58nAUIVX9wXabvh4f+X6UdWGt3iYXiCNwcqwAgYIEagMKrvMgSI5M5HJkAFDqHhyK2QK5S8gjUXFM5henCK7o8QpwJPDrYbahc3ofJ8A3SodMhsehbBLVo21ehdBclH3bIt4iKfUT2kehjlm3AYye1kAufCR8jEscoADPpt2HQihZmUx8tJzJ3ZxBSgKGtowY0st3SBo2QVBQ2W+/ctrZCM7lAfVgHiMBHvgt6CdR3Xt36fz5CpsjcbefqI70r82XKU8q/zthtvyzpgcR087VJfgANE7wt/0efpIMMzhKY/oBOLsCh0yaw3reXYsXAPNmbeYwkk1jrgl+eUfVsIFR5vxkCfesgBjk9js1fyW0KzFJhBBJXwnZ5nPBdeRdE59XckgfLyNzCEBchVtP8Ix1Q52cvSCv0yf3EkqLYaqGlDxlxhf1qx+rMjKZbG7fTFeUSAfYlIJaI43UcFw/jAtRSoBkIstqJy9sQTl3l58GaRtrW9xg83QPW0BG2LohqnJta1BT1LCjOAb3fIevJ56EIJizQnI9e2kDGY+qpGSUgODw== 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)(6666004)(38100700002)(38350700002)(66556008)(36756003)(316002)(66476007)(66946007)(2906002)(186003)(6486002)(8676002)(6916009)(26005)(5660300002)(83380400001)(30864003)(107886003)(52116002)(8936002)(508600001)(7696005)(956004)(4326008)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eUij6eL54asiKNteGCzzRPSD7Ni69bklZSDkLyTnOfpAelTxIS5lyZbHs4Zhsgi47fWuiheAw6eSZSj0k4ikSMXOLc+GYMZmosttrn8GG+ArBKhu2/EcYi6E2u+wsqM92ZGoo0Va77uPjGVj+fxKMBnh8lg7AxUHwnsuvLhgS/ORRzXIZVFzHfiHlclZT06rG8xVWhcs7JDXt2ZkfhpSvqV0dXX/fa1UQf2SnckqD8s1m6q5JNOuJ6mb8XV3BjOB0nfYrc1cZUfW/K3EibcisGTrChTfeKl8k/HcTRxLxLp6jIrNm8oUa8jLV0e47SCNA4LHO0+xVaC1VBJxUKh8j5Yf+/8asu9deJXK30Q10KqLhfk6EZ+8oKXdWsgFTzG3wTiAcyI9qLNLDcIJaynhWqC5a73KFKoAeht5HXU7ZMp3rztnv/L4KpemxfeNAM9CatYhqUk+ThM6GKSu5FzgbYas6EJu6dabEOzMrQqJ86ZS0FU74Qj+vzkNwjfz+Xvq1KtKZgXFP9aGhno2TKDe/1E3RuDAcl7gddSeUCSdQZR+rMWUZKty/OR/Do9dM9NBDlANK5GnbJuFsEUNHLaYaDEIRzNag2n2d+1QtbCsky0/Ekj6yx656rgxS5uWKiqvven1yUbI2eDqGExOSe8krSQ8//23hrw9pY0891D/h0XyiDceJu93s2RFkuD6ZNIUa6U56mvivlrkehSKlRPZWNhz2N433r2JLiD993OfgB/SuKE+BJ0bB/fRnfcHQZRnE3eLWcki48sgODU+1ae+UZk010XnU3bgd34AAeCe0A/ZqBfH6EBUyiaXYJDEdl2i5hknph4UULpyXEakano5+AgJUMtlgyDgz3OlwH4qmEY5g0E5jMjuQ8LJ75mtDo2xRmvDhhXwA/78SYDpyRsU4jYuGY0yRa0dASjztLWJVyY1cuptfFLncnXyDfejrC43EzczaHSTTfmnNnVxRl7+lhySh/1GLkOEl8xOjnjN0vmh5kHKBMzHXuhQHHg7b1At5bsYHut6NSGn7UQ9u0UkgCte4MaSIsci/P/Mmm2V1KDJNQJdkpMizt0R0qnoD005rsEgNpffNv6zP92F5e4wn4h11/E3npOsqAzfULV6uyKflrgnSi6t190YZiNPqacYM07GZLzf9tNY28EGEcBczTWPgS6OHws2X9rLL0F5/Ov9LvgYRod11WaCmLIVV+5razcHCe8/kspXrgjJluITnXMGdW6tKAPtkFI3Y6OOpqP+Gm7CK8n0jIHLCR4Ji7GU/mis74c2GYJCGO7U8n9augeFa5hLmL5hgNRwJuk0Bn7+zR9qrj2AFaZq+DHP8hzg7isR8HdFxcgd/5C+i8Zos5P5GOnF/3CAUZuOwTF3JjGcSC1HoPn87CNs2VJ3WvjGj+7uKOOqXa3e206RAX7ZhprOUprUiPtXjdjXIRZgFs9mEvj/Uyuxvm8VqzNss2Kn4B1rDJjURFTe4to+Ez1hg+P9F4k6qr6GAoMpLVjzdz6fuTvbNGz578rlkCF4/fFIaFkt9C3YHel73osg2HbOnVdR8SZB4f6N4O3ONTpX+/x1CfxuJ375Aw6ovTYrE8BtXic6VlrWl3HfeBrRgdZcr6yVHQJWUkUjad/jmTR2t3ReE63kbWSJgajWKD/ikws6NS1+hGzIG7nlF2M730OIug== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2587caca-bd31-4da8-2fae-08d9b5c74768 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2021 19:09:35.2578 (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: dq0mshpLdaqwqyyPnoToo0byrkHGVsF1E9W2oUMIPGxq/t1S70jtcgW9kk+x1rj9w2+AS4oDstkHPUjqW9wZCmyASUiXqNjt1VTM9yd3OEE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1760 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10185 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=967 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020121 X-Proofpoint-GUID: YGCjmyOdCIGH6xk7CEcgvnlrsn6vDF9N X-Proofpoint-ORIG-GUID: YGCjmyOdCIGH6xk7CEcgvnlrsn6vDF9N 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. Acked-by: Ani Sinha 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. Signed-off-by: Eric DeVolder --- 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