From patchwork Wed Jun 30 19:07:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352741 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C75EAC11F65 for ; Wed, 30 Jun 2021 19:10:24 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2B1F961462 for ; Wed, 30 Jun 2021 19:10:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B1F961462 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfbL-0001Hq-8f for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:10:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ3-0006s9-Bi for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:01 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:64920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ0-0005jJ-Ub for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:00 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ6T04005964; Wed, 30 Jun 2021 19:07: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-2020-01-29; bh=wZfAvjwjzb4XNzJEnJp2r64ok9W1vDs4HG855mJ8SyE=; b=wpGji5wSswCG8QBpt9tKWLMkLM4KpmskNQzXsT+yS/bB5+oBlzVowSaQHrEiNEqsULia wYT6et+4A0+x+xw8Hxw697cj07zYHBy0CEuQvuDDankniPb3fD6nXVmlZo5Fc8MavOLj NXLBvJqFIkKI99BwBMW9Ib5Q2o5cFfTuHFhflYqRvtgkfSkeu3ijLz3n4wfG66GJ2ekB aomUGZgulhA9s6oelK37a8egyxz241/duASAyixyAFqMyVgaDr3lWAR/beZr14wtd8E7 +VwUeo+ZJTujn6IDW7k38FWOGhLXf0DcKZVk7e6wzZTveCLqEOM1L1xR3aSTbYozhYmq ZQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 39gb2t26wv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:07:55 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UIxv97089833; Wed, 30 Jun 2021 19:07:54 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam08lp2045.outbound.protection.outlook.com [104.47.73.45]) by aserp3020.oracle.com with ESMTP id 39dv28kyaq-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:07:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I3fKz2A9vLQ4i1+d92+l3L5RqqBpPz4ymFWudzA03kfWm09qea0Q4KXF70AHnKkWwwSmIcxffO1p5fnGCMeWGa7bN4B2MEWrBU+PbaxsI4HyBopaYLjLOF7wC45AZLoa2hQ+OTtzw+Agb8QbGZuPpTqejQUoCFbUGzakl8yXAo6w+/Ua/UHzkbbocovPLhAq2O0wScdmI+pUr5j/axPc9BVpy4u1lA4BMJMam7HOfGk/jcpxwoo8tUwzRh+OLe4n+CWo8kWustPXhtoJpJN77AJQkxYP1Lf3Q9xHdTtxayaEX4owex0JS7gyrtGt7XRQldimMByGY1zcT6d2HpXvDA== 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-SenderADCheck; bh=wZfAvjwjzb4XNzJEnJp2r64ok9W1vDs4HG855mJ8SyE=; b=X0de2MXm5d/LO7YANEaznkJuepjYC94Z3WmXFCeOxvX7OuEmxEYJnKm/YNniPow9vNjeH9Iu7igZaM+lkWJkun8TC9jMk1NxwIPJDagsJPt565dKmRfzeiECW0F5/7I5vBD1EjGOES3pHvZkYGIkytPVXvb1Jo03PcWAtzwp5J6vn1pzJGIk8g7f17nkCG8vsTWKoIvLNhN+PDzcKDBsCJhbrGgPRtU+QylYIoe4kRkE7kjRcc2azkY/Fb4sHksMRUMjTPB0GmGGyY8C+8JywnT29oFk6EZNlWawqhVyl6LfhPuHmMjsV/kmbHrGtqm2cKUtVxvw1mOygU8nITQoRw== 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=wZfAvjwjzb4XNzJEnJp2r64ok9W1vDs4HG855mJ8SyE=; b=jGyjK6qbJU6vBibIDnj5YPSwdyePWmTc4h/Y8Gw6lv7DxBzlgp+Lx4AeRJNuQDjglF2UOeN/IO9DLqS6ElIitnWLf/GT8SivvQVdCbkxoVywBBbf7ZAhoRKXCKOB2p08QURTpKJ4olooKrwsg39BFmuKrJvjbPu71BCqMH/0Bl0= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Wed, 30 Jun 2021 19:07:53 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:07:53 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 01/10] ACPI ERST: bios-tables-test.c steps 1 and 2 Date: Wed, 30 Jun 2021 15:07:12 -0400 Message-Id: <1625080041-29010-2-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:07:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8fed60e2-09ef-41a7-3f5a-08d93bfa5c58 X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oz8WjJZrH1e40ucohCmfFnOLeUnRJyjwMFtA2eRh8CQzDc1EeFTCE/Az697PXHuIvVMSjg0ugVPUlsX/qf601KayFDBsVY6nJh5l6JL5UFq4so9l4FTKyjWW9G0aAu9Ac4Ei8OBL8tKDD3G3YyQdPSKFYfBx+jZSp/0ONdJ1eUacgPXTdofdaQZDq+LW7HLb6eVYOhgOyPfXZC7hxtzU1zYPqCd/BkaK3ZhwVaVLlB6Jr7wKNKNAb3mEE3wu4WhMx/ubfUSOFv3D33jM3aXarxB3lwXdGhYMs/5SXXNhKk360NXYd/RsR4C0J+n1YStFrK6rH0LwyAIJU6TGSA5RewDMHcZF7peaVgX3NLK7zlQEEMzYg21WvC3yG8LmxH55nqsgu+HFUZY6qGB1UO3WcxoGQtOds7DTL/5jrngP2YqsQo9SDJ+7rktSubqWwoxfvSlF7ljYiziaJe8QEV1txskSSWUE/tpMWb7adJliuyx9qkBI2nd2CCx0LeMAXwokFbcdTc+Hm3KW1BNQvTrrKSh47ibhwbVKNgOqsCsC6zB3Z5QksDaW8YUVRbH83H0HcTs8FY9DngTX7Q+XCpdRO2e/oZ/15XeYwOqnvImHuT4CBIfK8YzZ1hZ6CTQkFozdYCMg3GiTRElZpJ2uolTV/yOHGd7jZH+uBQ86RL2fRo2eIeO+re+H1pKcYZKMIOEssN9x+TUm9bnFvj1WlVbQVA== 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)(346002)(39860400002)(376002)(396003)(136003)(8936002)(107886003)(38350700002)(38100700002)(26005)(36756003)(186003)(8676002)(5660300002)(2616005)(956004)(16526019)(4326008)(86362001)(66946007)(7696005)(52116002)(316002)(66556008)(6666004)(66476007)(6916009)(478600001)(2906002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 52N+TTQz1DenpwJxjRorjJfUVb4q0R3O9TYtEXcRhtn0xzRSEsq19aKsnKeSxCa/fUSetgNzd5dumMUNlSgtPYQPVFfw79BS9K1DudJKPog7+9xy8SiMoabpFr3Mx2iGiq2M0AFvq6xuAwviTsYCd0GhoUqyu8pus9VNNO1ej2HhePNBe0+7EQjfI+WGMi0YxwiTvLd2MqWVI6SjLazq4ZQSdBeqjcunrxz29E7VzoEDLHzh2GmnwoFSW+7Wa4vE+Loccwi0VPWHS/Xy5JGrbQczQjIsvIIVphgd4EVDKh6GhipDozpluH/boMl/lNSwZ4/dnETYGcm2VrZMoeuRExbhQXZzclJefmOuD/FtbSpokWpvQQPOHUiI1hk+0u+PyZ2VuTt6DIqz2vVN/Vaaq3cf0AoG6gqaacP1v+YuDaBSW+uvJpubRjwNIsS2jr7wN620yqKm+a78WjOZcXzwCopQgFbsSNi7W/1UQFZ43Kr92Bv7bRrq01ixpO6aaAebdmjfXtuGTdejb8FJUUAkIR7FwizAv0A4MW+f3fEUbfzecfHGPXM6E4Gk3DjAt62j6yyu+9uUG25/rUvJQBqiwuqHxo5mabaZkjC91mJfB7FiOkgzj9c8lu9+5yMcZ+B5mUo1xY8DSHOWm93zYmpkqBcOz3yHtk8JV+xhgm/FzjY7zwKYrsb/nsQCV04jfmcf2OLVP4bRPb8/vIJsmINLpMIkJuUtX/WnqCXwfKf75VrMpJYSEOwppxqmyYHcaKLNFqXVHWoISG6V9ey6uvFnwo6dsyThnB7dXEvWhNiDBF8dDpFYGtKblyBeWFKMHos6koeJw0CXznPzs3nDo5WfZBVGZncInxaYSKxUjhoOFZPpfaxtJV8bnIR+FNLLzn55I1votioQZZMVYyCWgfFUiWYbwsLLWBTZU9Rly0P1HAyyKvvDh7K/DWl7eX7Q0dEW3/Yogh7/z1w0GUVR2w6Ijb4QLLEbztQJgApIKwivTw4T+nlAxbFxf1a0sYM5BqgMjW8RSIlFG6LkUPAf6XcskrH1xLMLUA+VOTj1qMOtvUx1meSVZbL91uITbjZM5xhqknF5THLETJeeojlo63MH5n0MAmMWd8qfdgE1+vCBmH37XSRbhbJW12WRg/UFkkr/4I9zBw0YIqEdyq8LyIKs6kzF5kZQiDwShuzfGAUtJXdf+pWwMOnuPfkRiS69bkPRVImaWSxNrpcQ8cqMDkVrMvTbBRSV6b4I/EJiW5qw6FASYhqYTHUEMAIy9QV9v9SEFxqOLoUuQff+59sJ7VZneUAHqIDEPzjdXeeqVuarW6wrj9x14AUOgdNa7+zvuaDr X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8fed60e2-09ef-41a7-3f5a-08d93bfa5c58 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:07:52.8777 (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: eF/PHjKNzt2oFuEItwtKIILZxYrj9zISVceUEbWp+cywBkf5Vm7z1VJ3V6zLVMfCy+ajIdnOjoKjq7/h4YpsEK+8cagmXZJfPykkZ3Oh2zA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-GUID: vjlqrhbzZjEUg9CXGoqk1dxhWChqNJ5N X-Proofpoint-ORIG-GUID: vjlqrhbzZjEUg9CXGoqk1dxhWChqNJ5N 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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 --- tests/data/acpi/microvm/ERST | 0 tests/data/acpi/pc/ERST | 0 tests/data/acpi/q35/ERST | 0 tests/qtest/bios-tables-test-allowed-diff.h | 4 ++++ 4 files changed, 4 insertions(+) create mode 100644 tests/data/acpi/microvm/ERST create mode 100644 tests/data/acpi/pc/ERST create mode 100644 tests/data/acpi/q35/ERST diff --git a/tests/data/acpi/microvm/ERST b/tests/data/acpi/microvm/ERST new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/pc/ERST b/tests/data/acpi/pc/ERST new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/q35/ERST b/tests/data/acpi/q35/ERST 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..e004c71 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,5 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/ERST", +"tests/data/acpi/q35/ERST", +"tests/data/acpi/microvm/ERST", + From patchwork Wed Jun 30 19:07:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352755 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27A9AC11F65 for ; Wed, 30 Jun 2021 19:16:19 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6F0D561449 for ; Wed, 30 Jun 2021 19:16:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F0D561449 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfh3-00031n-Di for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:16:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ6-0006vD-NS for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:04 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:4604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ2-0005kc-9d for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:04 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ6T05005964; Wed, 30 Jun 2021 19:07:58 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-2020-01-29; bh=ggeqCo9toM/losbgAVSrqqlAcxFnvdTRMu+611m9pwI=; b=pNKaKbqtcsow6ZSr1/GN4LLHYhzWsopxS0g+ul1rpgTPX4kQXOle5kgHVnxacQnfxka1 kDFq9QJAZAoFkMvsNJk5NqFCP9mOJH7BxeZXP4Xp72TGxnIjbI1w6jTEFBMuyyjmWem0 LDAmSjbstvfs2DiKUCIDntBEzf/z5q9nZ4KO3p0mBWhQYFwWCwZjMsxmkWl1w34YZc9C 6+2usvQhVcYsB53WlZKPE42WcMYbChO1KNAtObrP4EWxeGYwTzLzMdI7F50Dl5nV+fG2 /JjELvtMjAjybPgl/nrqIVw0V9fgkr5wi5f2qinlbH9RMpHui4+ldNIssFxiT2ok0d8g bg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39gb2t26wx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:07:57 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UJ0CFH101369; Wed, 30 Jun 2021 19:07:57 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2175.outbound.protection.outlook.com [104.47.58.175]) by aserp3030.oracle.com with ESMTP id 39dt9hqny5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:07:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T4oW0lLfN3tqef1dimZYs3I2lzdSXyWWX8+YPXeeJ3lIg7VTjVHgVPNuKRMdVyuGGqTvRDX9SG6bsC1Qgr5DpnBeaOV2hi4ORy5uq6GZRhHHxRrBguwLdPwQDrhBZy2Pc3etCaYGUbyyV+oFp3tsgy4CLzqORnjm0POd1myZ6BfiVW34Bri39I5FxPMOFDOD2R85CwaLNknGzWFCy9z6akDYM+mkyEb7wYdo52ua2gykyz1R48XtN42ya1+lYEWDkmj91S7auwM7RXD9YUgxSL9Z0dOGK9PxwajEEnH0ZWpDCirJ/CQEMOgRczVjNjCvCwvXM8/eIC/BebsMtO8iJA== 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-SenderADCheck; bh=ggeqCo9toM/losbgAVSrqqlAcxFnvdTRMu+611m9pwI=; b=UJPQPtj9I8oeiMi/iQAj6dFHdnsd5vYYUKE9EE8DLXGaKYV2XDLmineZBT0Zb3VXBFzda/zgjWCbNIaBjJWJPcbjQ59GMqsG6bgbWnhNFQ33QSqFfE0vRldLs/By1rutYdtr/7EOrYPN5KiPWqHbwVvsdOJz46LkFv4t9SwmP3oMFmIN6/3ol9CXgu5zapTdf3M69enSPWwqCKmHK3FmFBIJkMQiL50z9u/lOI2k0DVrEf5eOnMwt/uizZG98f27565tVR/MqPm+XVITaH1We5g6prA/w0EP4hq6ZPkERFLw5Yh1rfHatCQPCgn2jRWS0NYV3/VEu2vCincc+MSgDA== 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=ggeqCo9toM/losbgAVSrqqlAcxFnvdTRMu+611m9pwI=; b=upDemyqk1JSKaw732bl24yZImIjpcSLK+oguIeo6PJfptXkSpzNJmcTR2zDcp1MNkCiwOTKoNNYBVSW+JOMapre+v1654HSKsQDbpGyGpkRSwnDaZyTxmuyraXQodrs1+nK3fyiPCDNFbsELLgZtme0C0ZBk303yOwKcCVhW5bY= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Wed, 30 Jun 2021 19:07:54 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:07:54 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 02/10] ACPI ERST: specification for ERST support Date: Wed, 30 Jun 2021 15:07:13 -0400 Message-Id: <1625080041-29010-3-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:07:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 076908a8-875d-4a38-5f5f-08d93bfa5d53 X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ou0z9YuR8Iq5OHOJQ9JrjlP4XChto1al47aacj3zyp3UOiJHn+Uj41FTD4tjkbswlZDMchCoUq4eLJSVoT1g1XvH+5Gt52SCwadiCryEWO33nbK2o+21UYnjVfooUW0CJB138wwHNiY7biB9gXnFj/O+awYvDv4LK02NOw4VFixlUyEXibUHFcjWCn5CKyUtduIyWcRTECQUuyX59EcGivrBmGp6J4s/hLqrSvLA6CLrhP/GWKAS6Y34hpzsxTxWHZ8B1tOie0BdZEDnFfB8xgpO/0df324RTbegBl4+FgcAnEqgX3pZzp5ZiAMeQZC+2Wn63ou2YOtss8XzxQNkkQ7bHYNPPvlzZM5KbwuoDBqRX2w2TMG+Y7SUmTFY/Nc1iPyGsb/mBu/Ww3ePoRhPxfzafV28zFzUeCPBnsosSTwgPYS0duWm0pzCiT9hgLmNqEpKvB3bST9WV2Um+eO85U0+sMSKmd2Wj0GrG3n27Xmmi6sXBcxQ6lrGTvucpWbxTiLYyAOotfo3GD6IrZ6sfnnCiPgUCltFGr9th6tDSIdDDylZTFq2C9WyJ7re4oTIs3z8q5EGrhTnpM3ohmE3UonAfjE9Z2yEldMBwpFADkZ3xDfks3B8UvtxWpRmPMK5dkHMF3SCSRbULnOYocWxnLew8xDIw7f+GpyKyvLX+CKmL38OIHjFbP7sBlQGIiOvhhhB904colMSDNd0p3Zg+g== 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)(346002)(39860400002)(376002)(396003)(136003)(8936002)(107886003)(38350700002)(38100700002)(26005)(36756003)(186003)(8676002)(5660300002)(2616005)(956004)(16526019)(4326008)(86362001)(66946007)(7696005)(52116002)(316002)(66556008)(6666004)(45080400002)(66476007)(83380400001)(6916009)(478600001)(2906002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ySSG2PvsDZCExa0ZkCXf/xNFHoedHIe1I1mdyvfEAk4ag9cvwvo/PHXyZFyU7vUmGomLEBvZ0nqtP1bfsjXalNTC4kfv5EsNerS9O2taaR4zsNY5R61kAUIISyZvS4kngNydWB7Gk5CmpyQ5xGvHrq6q7kWAvFxMlcfo5+alA2N2yNBeQXALMxGFLtMBmoDmI743dSJUTjZmowK1P0eYf5TnPREStRr4BBSnBL+8NJ9q3PbIdSVzPVE6Bnmq2lady51iLHEJCTmckeIIfXDynOlAiLFXlNacdwFFinAvnAMvtigAVOHqGz9wZL7Vs+tlX6tWaVQTG7WyT+A3NSMmOYBAbANsWUQqqa83qg208IfrNxdq/H4HuA+quvz8iWLQFCirqWDqhrybgzjfEZY8M00YASfM4R5/Pl1kxehDyZA0sjFoFqrI1hT75X0QlAoJb0YpJg9c7R8Hb53uExZFhnwoGDm44/p8T0B+7Vwe2PaGZPVyo/AZMaSOFVeo1mbjgOCLraf4fAcSYBOAJk3prTPQ/hIIlkIliOtaKek6eOf1uPFfjQKseefAji3LiHbNgANxJxLvJ9JRA7MYkKAsitNQr6KuB0jU/AL8luBO0eb8ByEvVhgDVrNLNtDzuHhWKeF/gteHzOIEhQWCqmGTQoECD/Eh7lV8/Zvf1LpDZPAMccRuV7AgJsLgKDDf87v9FoWmRmdGE9P+A/ey/7nvewl8qG13lpxKG3utzKIHCwot29TOB8AgqR1oKIrPmsqw4swURGlqMeS0jTKm7PNUJ3anV9DsuF9hPKzm8KB56G7eXGIf4Uf6dj8Ln57aGCYHpd8E8Gd1uKFUI0tyaRw9NIHYguj5W7y72QEQm/CdzbrcIaCrn5lVFJXlsgFvxeK2Ag89lK1bn4v6Af2ZmSJdPH76g2NyjIinEP5PuUd6KK45J1tAGuIBbLMf9f5hSJ10fEGv8VpC1ny37ZIXqtAmH7T0g7QiA8QLzYki3MSO/iZ2ROOY7XyzSswoRH3zmogQs1ZfZEnbROZAe83VXSYfituH+aSHKrXKXFH+FrrYcdAC8qiSV5X5iaEcroq/LV4V/4IqYH0FAIj/Uglac5sllyW15MDWCx4+uGWSTO9cdBYVk1cTtJY/QwXEf5llWQ9wozdg12Ym3BKPjJGnB7Qr4r8Q+yohtFE/gXFva3wfI3opqIouSmbdOMJbdHqtW0zAS9tRKtVLAowMw/5pcqp+93m6CPqSU9upLJxozhA+dISv+lq61RFQ8d+7zivWv5XmC0sOcEJkOk+YUKXynVeEObn5aVvBteqMytZDgJPeVWJH4oNvHrLLubuFMr+JY3NM X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 076908a8-875d-4a38-5f5f-08d93bfa5d53 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:07:54.4518 (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: AuLYPdXKf416qH9vxDc3Ah7HOpbUq15ztNK3y2cwVatXQ6hwV/mZ476vbCQ9KlcZn0q6eQbYCVnZ9sAXoKDy7ZqffI7/RudcL4EGx/MHW18= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=916 phishscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-GUID: gRvJ9D5FEw5qsVewCkvxF5uCdBtJZCoe X-Proofpoint-ORIG-GUID: gRvJ9D5FEw5qsVewCkvxF5uCdBtJZCoe 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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 --- docs/specs/acpi_erst.txt | 152 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 docs/specs/acpi_erst.txt diff --git a/docs/specs/acpi_erst.txt b/docs/specs/acpi_erst.txt new file mode 100644 index 0000000..79f8eb9 --- /dev/null +++ b/docs/specs/acpi_erst.txt @@ -0,0 +1,152 @@ +ACPI ERST DEVICE +================ + +The ACPI ERST device is utilized to support the ACPI Error Record +Serialization Table, ERST, functionality. The functionality is +designed for storing error records in persistent storage for +future reference/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 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 does not support 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), pstore may contain the only +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. + + +Invocation +---------- + +To utilize ACPI ERST, a memory-backend-file object and acpi-erst +device must 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 back store are written to the file immediately as well. Without + it, updates the the backing file are unpredictable and may not + properly persist (eg. if qemu should crash). + +The ACPI ERST device is a simple PCI device, and requires this one +parameter: + + - memdev: Is the object id of the memory-backend-file. + + +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 just two +64-bit registers. The two registers are an ACTION (cmd) and a +VALUE (data). All ERST actions/operations/side effects happen +on the write to the ACTION, by design. Thus 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. This behavior is +encoded in the ACPI ERST table generated by QEMU. + +BAR1 contains the record exchange buffer, and the size of this +buffer sets the maximum record size. This record exchange +buffer size is 8KiB. + +Backing File +------------ + +The ACPI ERST persistent storage is contained within a single backing +file. The size and location of the backing file is specified upon +QEMU startup of the ACPI ERST device. + +Records are stored in the backing file in a simple fashion. +The backing file is essentially divided into fixed size +"slots", ERST_RECORD_SIZE in length, with each "slot" +storing a single record. No attempt at optimizing storage +through compression, compaction, etc is attempted. +NOTE that any change to this value will make any pre- +existing backing files, not of the same ERST_RECORD_SIZE, +unusable to the guest. + +Below is an example layout of the backing store file. +The size of the file is a multiple of ERST_RECORD_SIZE, +and contains N number of "slots" to store records. The +example below shows two records (in CPER format) in the +backing file, while the remaining slots are empty/ +available. + + Slot Record + +--------------------------------------------+ + 0 | empty/available | + +--------------------------------------------+ + 1 | CPER | + +--------------------------------------------+ + 2 | CPER | + +--------------------------------------------+ + ... | | + +--------------------------------------------+ + N | empty/available | + +--------------------------------------------+ + <-------------- ERST_RECORD_SIZE ------------> + +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. + + +References +---------- + +[1] "Advanced Configuration and Power Interface Specification", + version 4.0, June 2009. + +[2] "Unified Extensible Firmware Interface Specification", + version 2.1, October 2008. + From patchwork Wed Jun 30 19:07:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352759 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B1D0C11F65 for ; Wed, 30 Jun 2021 19:17:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6312361464 for ; Wed, 30 Jun 2021 19:17:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6312361464 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfiQ-0004gt-IC for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:17:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ9-0006y1-L8 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:07 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:5524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ2-0005lE-VF for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:07 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ6Sf5005959; Wed, 30 Jun 2021 19:07:58 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-2020-01-29; bh=eHHDboAr+3QTfgez9yzEOmFZ6nhz+PyPoLteuj/+Kwc=; b=bB69q/OijVXwUrm5KWlFpxuif1cPhS0Z0360ttesYQ1kS2NDqnpNrRDI9M4nklebugQ8 HB1Xs7bhLVA309Nfk/7wLVJJoJeKrwCo2NBB3rn6vI5yWU34hSKfTrxDs5xHf/Q/SnG3 09pn3Wn5f7faPPl21X6+b/+JL5d4/oBIfRuXoKN7QSolWFq/2FEFsryl8kKYEGkgNE/f 4qbKfDmHbY/Az5mMf4kTZEfCbzdXLrIMOwXC8+r1C2dbSWA0qX/g2PjugXMMeZ7DxjV2 2JRWXNbWDivi/JfvzgIMMBEVXUCBDqga6ax8mtC0qifS0M7ljSkxvEYc0QJlOJ3arLno IA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39gb2t26wy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:07:58 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UJ0CFI101369; Wed, 30 Jun 2021 19:07:57 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2175.outbound.protection.outlook.com [104.47.58.175]) by aserp3030.oracle.com with ESMTP id 39dt9hqny5-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:07:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EZKyPcm/dY/C5vQ27qhUIsi5sSFOyKtVqwriNcddmqf7FymGbId1ZaG8A2NHiV3hPownecIHAZvlGfXYAlGCk7X1Sp+gV+e9XoLVIXjV6/R75OrRNNZG9jucwolMEIY2XXimXphaCxBSjq0scNjjLHGbcR3fem+E5DJC/VN31cocH6lJI5zYpbi3LvYaDIMdHheodh/5xqGv90CaVOIZ7Qdr77VejaGMFkSIsrYhpIf7+PpWy6JUxaR8xQK0Q+l0/suhLbtFSWT6VyoSv23JMMp+iyXNIGNYobo3YLfmiJ9OVQtrFeYIh1FSTPgI5S8z9OAzWi41gMfgJYkHwTGwMQ== 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-SenderADCheck; bh=eHHDboAr+3QTfgez9yzEOmFZ6nhz+PyPoLteuj/+Kwc=; b=EKX3/Z12EpEJR6ZPIoxaaaPTUNFC65z1OVB9PMp14By5GBDEDdEu/65+x4d/fcCr2QsJtNBjcEcXObIgp0NmqsizESEYDFS/oqvQhbw3J5ECwP7fqwlQsmksqCkZxCHKZWIdmBab7y5szVhRVDXa4ZiLsmYqwvBafcjyPWE7XN0TGSAkwidnnRStH48TIpJvgfnenZsBbtfKIvTAP6ggWqwp1EnnIJaRofUi4sYIdjEwvXOOf7LRL3/hn8KHM85yLU2RMAeaxLtf5/2JavU628jocgP+s4PiljdB112qFWNc/XpjzAB4+FxXsSiSEQblzNcpUy+ihLTtSExlN8U56A== 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=eHHDboAr+3QTfgez9yzEOmFZ6nhz+PyPoLteuj/+Kwc=; b=cTaq1MwBidDgw2DOrSFNoX33MUtU2pmDr4VRZEp9tEXTeM34uytvXgvI4dGssXQMbsKeVHVH1A28uJMKJYTi3izAGacbFuINvtwW80lpQIx9xM2XNACuRCwKfLEzsuBR90JGvesIA6+dXbBgMkfJJiKssA0tm5BY6f1aeuszEQ4= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Wed, 30 Jun 2021 19:07:56 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:07:56 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 03/10] ACPI ERST: PCI device_id for ERST Date: Wed, 30 Jun 2021 15:07:14 -0400 Message-Id: <1625080041-29010-4-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:07:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f29f5b5-3f94-4c98-f399-08d93bfa5e42 X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 972KebZ0eRtZhm91Ma64v0Zb10h+ThLTQ3MlgA7JM7toNXRL38Loevggsp6sY3TT3lPhnDF9pr/U8q7YQkUyzq0y9Kfk3h8+rkwbPu5hqmkh3zYmOoGGUv0Mw4mkLtb5b4MKytYMvqZwPN+s+iUfcPsJEsp5MNYxTcTeDfkMKIEnmlZUPGhJVhnCP56ygBIcWs3baVBooZ5wjQkQpVHVAr7Bb8isZi8Ho3+gDSIDOQJC00Iex8PcglWMm13NogGzxPh8pLQu9dNoCMHbc1Oo1xzyuFifseP9gbXBK4lgh58DnPvL+ARfjvcrUcrgYKNxL+oymm/y8uMHq8nG8LLMtfTwXoDUscWywM5ojUoCUb0JxwhCSzAwYIR5a+SaiQxmvzbyoUMoiKcsfy41fU6HzGF1nXm4fThavcEG3QPK45cI2PvLTKWVPoZljxIrCDC5y/LXs3hbv+sZKH5qoJpchU1uWuZdCS0OAzKvYbD2GNyCWpUJLFAyclnEwKwKyC8SWZizERCPcOWwCKprcdSTwOHasXMxz5hEAIDUmRKA25h7fZS/LrURhMyxomrteOF35SFgHX23+L30i4GfbHJSkyx2t4SjJc+hcPpJXtmZD/8qkSKh7ofdjRSDTuMIPT44GwurCQUeUF/ObherpA0ihFMxh/tK/wOCYwh/zBZfjStFPn8AiMgNngqtTNwU2mIaX+oaTaKPDX81DznjFnSxOg== 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)(346002)(39860400002)(376002)(396003)(136003)(8936002)(107886003)(38350700002)(38100700002)(26005)(36756003)(186003)(8676002)(5660300002)(4744005)(2616005)(956004)(16526019)(4326008)(86362001)(66946007)(7696005)(52116002)(316002)(66556008)(6666004)(66476007)(6916009)(478600001)(2906002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oQHg+IUsvAcDolSp6+WSYyNPDR8Q2Qu7HgNXT7LS+ifLFpmhz8DepJoPT/KDYMKMTxW6TO6n2OzowPWiM/if9rMIm+2dX74Fk13l+RLCFq2eQ2zzUOaIGskbAXMv/gYgw9mcCFpPtHAAdvFh/swi7YbvVnSqe2MbprNle5WsXq9NubvGZhP+6mKE5ehWsIU32QdPY4BllwxnwrRJRbEjb/AaC37jQkIPosHzLOGHAIzR9NPvIEhHTQqJjum8koyghHjHlkfkEIioRHz8JzCq9kYNgp5LpfI8LMs0tpRk2DwFBtuDXtchDTe1zgKD6fL8NLlhiLoGb0QTCLWwnNe9brOtvogKIalKbd20EQBu6QdPa3sFiooP1j8deJ+2OdxHJG2RCSTD1SgxXRtXV7eZtf0JzUmULPZOT21NHodHrUhGT91z8JzwFDYmMjL0TGkdWQr4l1xZad4wO9rxM3PA9ELChhELpxZAt+hIyoz+j8VTEBUO3Yrq58oEji34G97Te7bWX1hZGFgHjIZwRRijL+fM5vJP5LaJ+LaMDbGb4v5AF6o3OnG/H6Ky0R4lpzlNV29hdXqi7Fet9Gn4E7Zzr4TWfQhkQmU7pXKjnLB0P3nsUeYeMsTBMg7ofiTYwZHnccs2Y0DLhR/FJJ6j/qMpPWrpSBa+6lsKxYGkkWxH9c+vDhWA6Lope3TyfZG9uIKstI4fgif7/0kpUWYLVFCUNL/LXWIQtMGjI9i11+sqLRgNvDuYtgoOjk1ygniONKpPGWEtQ5L1AlSquFBJ0IgnBEhxfYCDLH7AslVB+LS0zTOgJeZumcpLw1YzeMq8OcbidGPEZRdgoiRgU9vq6rT7NP11pY24x4+AhpmyuzKqJZI/Erap6dSupJ/3lULV62p8HjK3RvwKtW78tl5I8Z3vAmwPH1zSgAVe1WnXQZb6GO8VbrqEl9RGumDATUaJZfd3lQyet+K9GtyZV6MGpSaz25vDM3BCBKmsVtgcb1pkeoh/Wjilya5QAxevLMo/l+d/k2OJWEhBLSxgSjpZobmP49OjLAeTvX15DZsG2ZrrYRJDbF5b9mhZAvfCKtzqQ9ojzXku34woK2oZhOTem4DStLFVbgufD3ehn+w6QkFZkbTUzZ0r/LtTA+MDnqfodaDrGpTeEurZYyLkBP14lYQuZG/pZocCUI6Xaa0f3EyUvB0gDlfRWT+fC/DMyW/ym8qxlNaPjjrw0JCUCUejrfIQu5kwrmM2zW/Kb1JesfD5++y0gcQP0plLBCgg0diWfiRdl9jiU9/e6Fo+2YIcZ22iA1EG8NhEG0Sxxm6UhbRms1F/Ir2GqGGSUULRxDLhRhEi X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f29f5b5-3f94-4c98-f399-08d93bfa5e42 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:07:56.1254 (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: 4BbKdpX4B6X7G9IaLdPYctRP/YhIZhRL9S+QRCXquYLuaVUnWUo5vItvfYfTiW4SJHm/Ts+mLL0Vo39xsukIJ6XmsM5oLhELB8wC5WouGqo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-GUID: tgww3rbPyicS4vtTMF3rUy8x21PKudgy X-Proofpoint-ORIG-GUID: tgww3rbPyicS4vtTMF3rUy8x21PKudgy 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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 declares the PCI device_id for the new ACPI ERST device. Signed-off-by: Eric DeVolder --- 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 6be4e0c..eef3ef4 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 Wed Jun 30 19:07:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352743 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, UPPERCASE_50_75,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 518BAC11F65 for ; Wed, 30 Jun 2021 19:10:45 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C512961462 for ; Wed, 30 Jun 2021 19:10:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C512961462 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfbf-0001np-Or for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:10:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ7-0006wd-CD for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:06 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:8316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ5-0005lc-2A for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:05 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ6pab007406; Wed, 30 Jun 2021 19:08:01 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-2020-01-29; bh=733n0ZY+pW4G5c+w/i5mYpaOWaTeUaO4gVmrELNLS0E=; b=RCetT6CddKQPzITTwTFoEUzjsHWbHS/SLt747/CTMZDW+mJtVYuVSZ4mELjtQoOrhcC+ cBT2AsC/tcZUMZLZGfoABqZe7Mk5z1Ma4RMsSXdbYKgLrlsCOIjkS4gfkZ2t4jjWOMB9 AhWgeY/ORcK8/EiJ5N9om17Kmp3L1qYNdkkgSp7bbNBefjlwq+NozD8Ms+/Vc9YJqc4b XwHnsYeW4GRiOb48dMYQEmx6pXZRcKtdN35Q4ZWLTuiXnbBQDYmojcwtmOQenShcjJxZ yUghyS6GuxqNmdWehKVx88VbEHDDvkLOPq7V4S8jRbpx5+dvleNanLsRkUVNk4aobZZP og== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39gguq1r9r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:01 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UJ07G3101053; Wed, 30 Jun 2021 19:08:00 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam08lp2048.outbound.protection.outlook.com [104.47.73.48]) by aserp3030.oracle.com with ESMTP id 39dt9hqp2y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:07:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bRU8Q6UVUnq87zJivgNkTvuspm5yT3+wOOKjt+fXHYhvYzIg9OE5FADArhWJhdAyExcDhAgTWyyRdxog+luoM964YESbU+AeFRDqeOwkwkvWU1XMfMQYu1fW8DJ2daxszv6Rmgef2rCCpEOOPNOqZJn/OESUFRvmUH1NOmG9n+5DOYbxJmV7vx5LlDIdFaoNDPs41wmFu5/h9zh8rCJiP0iDtUmVj6hJYd3Lk7PFPRwDs47cIZpn4u7Wq0/itXWWI7XEe02Jgh8kiZNQKFZyQ/FI9tgGekUlWeGqYUHUmk/dCqF6X2ZwUUFoK/TUU1X4NGgopGBW31eGwJIcvjVwkA== 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-SenderADCheck; bh=733n0ZY+pW4G5c+w/i5mYpaOWaTeUaO4gVmrELNLS0E=; b=G0WdGtd/nqRS27wUOGW9IgI71GAtwMnk0gqHmfScLXCAk+1PBIm3Yw+ALF3QHLpURJM5Es7/W1aiNn9f9r2kvI3fgPuyRe72lWyXuxLYEku53QZ1BuoCXReryWdcRVu5b1ZC4iUxgH82ezxchC1ZimZXeUv1EhI2tGkevH+VqJLqSY7KHoMxYcejF8rA6Dv9bUTxCpeGF9/dAibDFQGHDI+j54AR8eA1UvrsS4SAJ5K4AaTRydNLaIH9KNZcgetS6CFcq9zhw6pKzAbrN99qKrl/SCuJ1VWfMYFz5ifFPsh6lIo4YgdRZF1LbAEESUPhDU2RwhUtTerAaO3gH9obVw== 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=733n0ZY+pW4G5c+w/i5mYpaOWaTeUaO4gVmrELNLS0E=; b=FqDljR+RgPjw5vX7yFPx42QFOidJIdCjL42rdl9DvTc0iHDJWiOMkzeQzZyxUFW+lCuq9QkkK9OP9iKNZNdY7C/d8fDDYuY/bM70druTb/1E+bshcKYc3MuEj6bdRCy9MqBGnsHgy4HIWhyXjizoK+pPfo1JICZ+HfNfw1pmJlg= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Wed, 30 Jun 2021 19:07:57 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:07:57 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 04/10] ACPI ERST: header file for ERST Date: Wed, 30 Jun 2021 15:07:15 -0400 Message-Id: <1625080041-29010-5-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:07:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d83a2e04-31fa-423b-bf5f-08d93bfa5f3f X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3IXMuOib091RiZDMGr4I6N266mYvdr4+10szqDNnq6hXI7BVsaAAUIq3Y5QdeRfQoMJ9fFhd+fXCIznyGMd7NU4RIdgQemIB3BaGzmWjtgEB8bbJQERzY6F/aZrHsb9WtnoFkhEqaRm+HRlUXAxMzdgfHe1JGuxT0AkSxdX6CiXdlti5fPBxc82BTxQbS1efk2JAkerdAgHhjiQupK6DeoOxC7M5DS9H1Vcu4GEAMUasJv2YGnA1cKrcp9jKIFQlrI8BRz5rI6Y5Q+2m6XbIlCMsfvDvlDhSFJSWFIzaUXhH8ljvc/TBIbtz5fgDsqLm+L94Ig8JKY0uw7JhKYtUJouoK5ykk3v3S6CHOQZI9Kj+11vDSWiD8wix2hM/5nbYNN08qXe6ebKrwTHuu93svfJUhSO6wzQNRrbhdSqNz4ZYm+EblfrG1+D4YkAThB3C40DiOUFG8gu7HijHeDUhaEXH25dbNbSLmaLL4qlYRw7GZp7Z76DbI7nOAQGIq81BrIW058WsBtTjJ4PrhTAT0TrIpxY39h402YW8jb4IBTyvyy+m1mISVXAH7L84SRDxAOUOMfID8hokH1CJBRCZ3OIJMEHlGG1XJaYafbaxsYM69xbQOKjtJe1Jq70wC6zsZID3xvqKJh806WQ9+to0GXNC/13K+X9R1E0TVetgVpu2h7x2fGtpVhO1CXetzx9G7HFOJeYtMv0ZUwCpwnGBW9gf9NMiDzGaADDvNqE0V+JEU+69rjLypCtSW0TDWeJAbjilO2ENgAok2ID2yQBNdkM6XpJW49ku+wiqfrabtmzaxNRxPvlJ+BOCZWN0+W7EBGZWeG2G5MeGzSMUEyY2y+NdPUzO9jaZrKxM1Smuo7A= 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)(346002)(39860400002)(376002)(396003)(136003)(8936002)(107886003)(38350700002)(38100700002)(26005)(36756003)(186003)(8676002)(5660300002)(2616005)(956004)(16526019)(4326008)(86362001)(66946007)(7696005)(52116002)(316002)(66556008)(6666004)(66476007)(6916009)(478600001)(2906002)(6486002)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6GPE88QveUWvot+1cJ/UG+0SWsH25zqYfXtk21eFjjb8y929HY+h1q7hR8+fawoE/TPMpfVI2SWo1a8fbCJRtk1t7zfPElMEymVffZmTrBSvDr3RAJTsdmf1834z2vbYWhuWuyHH1fr3mIQrBH1Ka62LKCmc93KtCdYG5FsDFZu8uHTPmVqdd19ALB8ME+xPoQLZrJcEW0Hulwbk1uq3ES3+9hQHBTRCtemoVc6xDU9gU7ocairpzNb/IDSkF1OitgK2PJEAXClpyEGP1PK1M4PfR1jEwswWmktmJCfGs4dO0PxhUNg99ZkgMMCSic7qHF2vlk/JS9W6MKTFmHIqMtob4hSjFfZA6RR6GzifB4nLwHIV2y1nrOkUDY3PEqaYoDMe9rsSXGRN1cfwDjcabE1SnSHjO/zDmbvBaQZYnUn0sQWEhM6bzG7De7+U2JHJg231D9KiNZxZ2FVdd1xWsjag09ruRAfYUoCEfBL1jeaSQcMPfhgRMEn0bebVKqH1aTwTmBK3xj30jbL7HFRgiO8JNE9AhWO/WdPezb0+DwDN5D6QjHd8MyrcNUdUObvn4VXplXz20L3aHoqrs9+vwt94b1P1Eqp49pNXTWQ3qV0LKMwXCOiFxzI2mAmuZyYTm5rgcgEWRLTWI+3v3KpbNWTk+8efXKCBWJAVBD5GDu1oOd+vAiDN8q0G1xBoH9aCEu8zCs8Egg47ONWK/Jd84ltbRJZz3rnWFH1MAC/uk6atOo26dIxajtM+0dczdxRifdeZfnpieF1hN90tbntAUX5Uu23u2XDFUn/GBzLiVS7KJ5MamHc3Sy8nEf5uVGuCbbWw+DJfC1y98QTJFbR3BvC957dzm+3gjySB2kCe7mElIzb6JE726tR1cxz81pSSc0WM+kuXyzMwnYMnknCBea+wttSopNtm0xxzj68x31BcmlS/KLe5C+uruEdg1T6lr2KZ/NNjycUiFKGeHV4fedTAZ96X2J9zkNcOB1VBLmPvZUv4YK7Lanna/9leSmnsQV3khhN0r/4Yziz6cIZzLIgiuhUkMte85eeL68dZ88tGZW//xtocaUvRGQX0FLu/QOZ9CVtL0TTUIWT/Fw83WymNNfiFN6cvfHdN0U+SatZRtmPMTJ0CobsvLuGucLrbZz6nX7T+D/4TejrwevT7t5pMRK3x5Bzc6XovPjTuZxyRP/NvtY1DsR9sBLQqKbas9rZ61mx6qIpgoyXX0ct5Z0vye9piQAEck3bF8d5vetzXAgMIK0T6CoYRkpaMmrBMdMvC4NL+Amiu1ScCzHKUmrIxXqH//RANM8I4ikqTzGPZGgKQh7aX5x+YudBZge0j X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d83a2e04-31fa-423b-bf5f-08d93bfa5f3f X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:07:57.7503 (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: XHWsD072Qi27j8UX+2Tap1jJf7oQWkTNp0IUybSAYfeCKDJiSCeqmWtbq+/0m4Di0xyy2niQszpFX7wl9jXWEKo3giCiBGpkqYBEIM2dcwk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-ORIG-GUID: 6D200mjeUMrrQ84Z3weHX2f68gg28YaM X-Proofpoint-GUID: 6D200mjeUMrrQ84Z3weHX2f68gg28YaM 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, UPPERCASE_50_75=0.008 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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 defintions for ACPI ERST. Signed-off-by: Eric DeVolder --- include/hw/acpi/erst.h | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 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..07a3fa5 --- /dev/null +++ b/include/hw/acpi/erst.h @@ -0,0 +1,84 @@ +/* + * ACPI Error Record Serialization Table, ERST, Implementation + * + * Copyright (c) 2021 Oracle and/or its affiliates. + * + * ACPI ERST introduced in ACPI 4.0, June 16, 2009. + * ACPI Platform Error Interfaces : Error Serialization + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see + */ +#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" +#define ACPI_ERST_MEMDEV_PROP "memdev" + +#define ACPI_ERST_ACTION_BEGIN_WRITE_OPERATION 0x0 +#define ACPI_ERST_ACTION_BEGIN_READ_OPERATION 0x1 +#define ACPI_ERST_ACTION_BEGIN_CLEAR_OPERATION 0x2 +#define ACPI_ERST_ACTION_END_OPERATION 0x3 +#define ACPI_ERST_ACTION_SET_RECORD_OFFSET 0x4 +#define ACPI_ERST_ACTION_EXECUTE_OPERATION 0x5 +#define ACPI_ERST_ACTION_CHECK_BUSY_STATUS 0x6 +#define ACPI_ERST_ACTION_GET_COMMAND_STATUS 0x7 +#define ACPI_ERST_ACTION_GET_RECORD_IDENTIFIER 0x8 +#define ACPI_ERST_ACTION_SET_RECORD_IDENTIFIER 0x9 +#define ACPI_ERST_ACTION_GET_RECORD_COUNT 0xA +#define ACPI_ERST_ACTION_BEGIN_DUMMY_WRITE_OPERATION 0xB +#define ACPI_ERST_ACTION_RESERVED 0xC +#define ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE 0xD +#define ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_LENGTH 0xE +#define ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0xF +#define ACPI_ERST_ACTION_GET_EXECUTE_OPERATION_TIMINGS 0x10 +#define ACPI_ERST_MAX_ACTIONS \ + (ACPI_ERST_ACTION_GET_EXECUTE_OPERATION_TIMINGS + 1) + +#define ACPI_ERST_STATUS_SUCCESS 0x00 +#define ACPI_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 +#define ACPI_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define ACPI_ERST_STATUS_FAILED 0x03 +#define ACPI_ERST_STATUS_RECORD_STORE_EMPTY 0x04 +#define ACPI_ERST_STATUS_RECORD_NOT_FOUND 0x05 + +#define ACPI_ERST_INST_READ_REGISTER 0x00 +#define ACPI_ERST_INST_READ_REGISTER_VALUE 0x01 +#define ACPI_ERST_INST_WRITE_REGISTER 0x02 +#define ACPI_ERST_INST_WRITE_REGISTER_VALUE 0x03 +#define ACPI_ERST_INST_NOOP 0x04 +#define ACPI_ERST_INST_LOAD_VAR1 0x05 +#define ACPI_ERST_INST_LOAD_VAR2 0x06 +#define ACPI_ERST_INST_STORE_VAR1 0x07 +#define ACPI_ERST_INST_ADD 0x08 +#define ACPI_ERST_INST_SUBTRACT 0x09 +#define ACPI_ERST_INST_ADD_VALUE 0x0A +#define ACPI_ERST_INST_SUBTRACT_VALUE 0x0B +#define ACPI_ERST_INST_STALL 0x0C +#define ACPI_ERST_INST_STALL_WHILE_TRUE 0x0D +#define ACPI_ERST_INST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define ACPI_ERST_INST_GOTO 0x0F +#define ACPI_ERST_INST_SET_SRC_ADDRESS_BASE 0x10 +#define ACPI_ERST_INST_SET_DST_ADDRESS_BASE 0x11 +#define ACPI_ERST_INST_MOVE_DATA 0x12 + +/* 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 Wed Jun 30 19:07:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F935C11F65 for ; Wed, 30 Jun 2021 19:19:19 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1377D61464 for ; Wed, 30 Jun 2021 19:19:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1377D61464 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfjy-00069J-9H for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:19:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZD-00070g-0N for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:11 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:13624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ7-0005nA-Em for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:09 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ5Ap4024024; Wed, 30 Jun 2021 19:08:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2020-01-29; bh=DqEajVCTSWeDyVWL7iUwk61lwPCxg+haitGD64zVn0A=; b=XMPhlN5Xtz4bH0o+E8OH0IozFvVomb+IOPAYgUhVY5/5j6GxDOkaBd41+S4WBE2myXQP Osl0UT5QZy+7E0SSaNCKFgmuR3rRmc35DX5gVbUT4PEx50O5s9ol8W/ouLOE5dEqvZWf 9rXtMEbp2cHVycfWU47rzxz6mRabVgN1nc0taCxLruYN9y4wEtNMe6rOC0UiuXQjkmpe OOlp0aFnZeXyREy4IWJhJ4IOT72Zv2qoQcj8lL21koYhTrugSQRr9nFQARWyyMe/xyia +SLi/n7MV+Saq269G9MY6QPKp0oOZTPk49TtdZ0CjiOqR/PzBdtOMC9ialRUUV3OUX5F EQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 39grmaruup-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:03 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UIxvjB089823; Wed, 30 Jun 2021 19:08:03 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by aserp3020.oracle.com with ESMTP id 39dv28kymg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZzHyMbKA739u3/mbSF0mVCUF1I5S773k6x5lzQVTVEoy7RjaFKmFaqJFHcVR32rjiJjxntAhyQj6MssbAadEsaPzmmlKNfnJLt7K4FxeQPqHzmo7lLElZAQwZ/+l91PKBwkZHGgaaE8cnkWDQJYAwLCzTEDq25tIc9nvV41LSda+0miuTo8xSokPO67Qj3gmtiSM/ImqRWZPR+FBHf0d3izL6Id0Bsx8mktQ0izftwqDYYU7XiGmwl9Jc3YTdF+Mh5NNiLuJE7Ha+N4TcbsYwYqFOdJGWh25MxOsQzEYciCTQ5qAfw4a0FYL4dB5RtCxPAKX4WcTuqYeD8QByq7Bug== 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-SenderADCheck; bh=DqEajVCTSWeDyVWL7iUwk61lwPCxg+haitGD64zVn0A=; b=e8x/ln79yGb2313zTK8vW4ArADRGLUr2lCkgAMb+nnmFg5/MQXBxWGTNNt9zyoaNbit1TNM+zPhvKTZ8q1OhGgMlzgyjH6iM4m7JvXlY3ZmK7rhm7gGaaYKYpxwGeRpUdEeBiZWHA/fWvc7bpmCr1RYWTkl86WRyJTMvkWCbx69OtQ01JK/9dBY8GBjucRShMtj3sUoEkzpskXw68xyv1mUd90NlWgS+/hB22YQo5pGe5d+9Jz5cJIWrzRbKtioud29MGpFnqcbW+3xkbB5gNFHma1wfntv7+kzz48+TJYNPILInfQdkwNzLELu5whhLZio5Ngn8CSVKtQ/X4eaQcA== 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=DqEajVCTSWeDyVWL7iUwk61lwPCxg+haitGD64zVn0A=; b=BsfNCXrx+Bb1vURIoUY+RmvWhoM3USgtuur4n3uk2fmf41dkngctuesuij7orXvloTQE3v94mNa0ZvvUCJbjx1ybskF2YVipIjnAHZlllBryxnx2HKbX9wYm10hYGcBhRUCvTt7uMeBhGWvmbCnCJZDupA8hr/LQYuW9uEW05p0= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO6PR10MB5473.namprd10.prod.outlook.com (2603:10b6:5:355::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Wed, 30 Jun 2021 19:07:59 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:07:59 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 05/10] ACPI ERST: support for ACPI ERST feature Date: Wed, 30 Jun 2021 15:07:16 -0400 Message-Id: <1625080041-29010-6-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:07:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f098224b-4f6f-4de9-5e50-08d93bfa604a X-MS-TrafficTypeDiagnostic: CO6PR10MB5473: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2kbzAIshC+oGN3Uk8Tj2Hi3EYOkhpfxsk+Nf/fV78mgcHL1Oq/MvERO6dfS6dy0H1Q4FA1CXQlC9dYznjJghIQxd1R+Q8s5YkKwQ1Ir2wajjLTsppxewibzqsgT3gx/yd27B6Yl6sviGtFjD0iGgIGA1hFtF9hfBdKB8DTccvN7ITWRO3tqrEObrQv66sRqXD8/YgH+Gat93GaBXgh19kHwliKlgzcNfnzCv/G75KVXJTSDRGFhxydMANMYvNad5o0BY4Q9Jv75sa9RGNmeUgtqvbJLTIu3PXbFMgCHmggMGatGwEYo7sK1/Rp0ZTgKnGivQQAIjukghElFFSyMa22PES2GTd14gH54txtoxszGPRSPveQ3YKEOfedJdIXAa6c8xCr00jYXCjkGvZf70gLPSG9n5+ovK9Qx9ClzID/SN47KWuFBs5r9wywdcV+sy3QU137zdB5cZRssDTrxGpDF4iDFxL/ZblhCkqfrKRvm8dkHCCld5paJsQjRqJipbe8MmWh/HSNFZApndPwpp5FEZeWoyb2Xa5cHwd4ENmgzSFZf2e2VcH30xDwc9hfQmsCDHNj92JvUjWUE6yc5LOBsBfxkj9QmdNn+JFJ/ovDnDUfZg5dOs01zFq4AxVOg5NlQpRayrOiOHXXYFjP29VUw22uGPkRkMT7AkDJ4mpHNmSxTVUvErIPhzK7l2G4fSxjNUoe9rbqayn4cxSTSJrmsL6tmarwuD/tXuQSTMz6N9cB+cmVBXfy7Z3NxDIOZY/KEQnz/5t7NlW1F4hFaFU9q8nKtpO/hkhMZbHmVFcQR4yTPuS18IoU70TfAnLLPygp93cVq3XEPD7X8LqXJ0dg== 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:(376002)(39860400002)(136003)(396003)(346002)(366004)(107886003)(30864003)(2906002)(83380400001)(6666004)(66476007)(66556008)(8936002)(6916009)(8676002)(66946007)(4326008)(2616005)(956004)(7696005)(86362001)(186003)(16526019)(478600001)(26005)(38100700002)(38350700002)(5660300002)(36756003)(316002)(52116002)(6486002)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 79ICvtSCk+mSW+qhkci3/Zn+K6/5LmMs6rc7DP7LKQ8DMa4mfkIQLsvuRM9dRT1P3aKqoO0JMgQwoLwr6duufBNyJ/By7KyPi5EVhW0ftvpogPjUXOh25ZL2TOJ11bDtAHpTPuVQN+UGsnTZvCO6p9H/uk2Nzsd/pLCt3bj2/lxJrOmtrwrq23Kpu1euZ+s3Nl4Xmrg5249MAQw2FcPoRaeTY3MGSR4WNB0rPcG6KINSfrReKeBU9d6RL1IiE/W/sSvowEcjkehzAddj23nDn6J8gijH3sDkmJtoz7rzFI/qM2yrEpL/YHJ3r9xeFg9dktL1ZPELzRh0rGt1S2f2Av6zqcnXApGDPN+J0pS6a8OAC7p1/5XGm0QeeCe5d3ZHlr4EjgSwWSAOgYr3W1nurBI6r3AXdcOaroo4q1fyMXbzKpL7sCi4RjT6u/rfSEScvqxuOmnvtaDa+j8yjbWfzlxBwQuGlJQ9NGRJ+ta+FrhATjUIsnkm0sUdP393bJa8e+CpAOYswcDaYAkCw+RDLWwyC2/Yj4QqoTEXuXQIpnzsIKdYwFLx3KaGjBnI8k8VNSNduqEtFbCGCoHkYDu1+dJCjM0XeZycIUrqA+f3vHwxzZ6QlSf2VSpaICPGGh7stUMPVoaXcSuOCKkoUXx+addZNcB9rUzHndNwO0+CkYupbwatkjiSBAtf2pO/C4S+p3RjVSSoEJ0veLGyWr2xZF00pR5YG3vv2tOZH2CjOACRtSkAstz53tMdh3rBAf0Rqwe4lbTND09GgbVsw3d3r6Y7h9JEFhKGbXjdMvoyJDdmUbqKGGdchvmWBxH8ewDGl5kXJPuyIewKIKS4PRXxZv1AIdXH0LGRj3cZJwPaCzZA/DZvDdH59lo+El6G2y6IV0Jo7Tp+d2fwZbmlgEpeERD0+RemcTeo0Zvjs9xsvI+rn3ppfdKCfrwsHvN6Dag/snV/mDEVRWQBZLT07PGzQmUe/M20KLuFYFXdrsLepaXw5/EYUjgdR0Oa99BMI9EaLQW1NVBHKqZbFz3v1kO1B4ts70gSb//zWU6FcJbafxmB6EhuPimVcfk8knPUDs7Td35UtlNEPx0oj6W4Tq2MBtm2Wu7PQEJs4PpdZq3XsOGthS5mvXHJOjnMA8buQVF4yGhqjFEOPZAk2mZM4b3rCY8c6IhihH1+W7uTs5Czs114Uju/Q624GAy+2DLvAwqNSROocqbnWalGhJe82+xUVWPH/Db2pSM4IeY8F7eDa+/3njYSG+fXz53vd8JMuDycNvD/oIjMWNjbaC4IvweJVG9qWSHM8v5kGkfYN0jXZgIYILs9wCpUYaveSO5iW/7F X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f098224b-4f6f-4de9-5e50-08d93bfa604a X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:07:59.4209 (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: N/d/seBuLIb4WysG1x9dFPXjU1xJMK3N8adzWwGsHHlNof3W/A5ujyPcbYMQl1fEyqzQNJF4+enfQihgxK6GpFmr/gZuAzEkYSDhrZ0ca54= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5473 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-GUID: xGpfOnTFxLuJEfLPRj-Zgf-dy75wxW1B X-Proofpoint-ORIG-GUID: xGpfOnTFxLuJEfLPRj-Zgf-dy75wxW1B 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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 support for the ACPI ERST feature. This implements a PCI device for ACPI ERST. This implments the non-NVRAM "mode" of operation for ERST. This change also includes erst.c in the build of general ACPI support. Signed-off-by: Eric DeVolder --- hw/acpi/erst.c | 704 ++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/acpi/meson.build | 1 + 2 files changed, 705 insertions(+) create mode 100644 hw/acpi/erst.c diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c new file mode 100644 index 0000000..6e9bd2e --- /dev/null +++ b/hw/acpi/erst.c @@ -0,0 +1,704 @@ +/* + * ACPI Error Record Serialization Table, ERST, Implementation + * + * Copyright (c) 2021 Oracle and/or its affiliates. + * + * ACPI ERST introduced in ACPI 4.0, June 16, 2009. + * ACPI Platform Error Interfaces : Error Serialization + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see + */ + +#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" + +/* UEFI 2.1: Append 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')) +#define THE_UEFI_CPER_RECORD_ID(ptr) \ + (*(uint64_t *)(&(ptr)[UEFI_CPER_RECORD_ID_OFFSET])) + +/* + * This implementation is an ACTION (cmd) and VALUE (data) + * interface consisting of just two 64-bit registers. + */ +#define ERST_REG_SIZE (2UL * sizeof(uint64_t)) +#define ERST_CSR_ACTION (0UL << 3) /* action (cmd) */ +#define ERST_CSR_VALUE (1UL << 3) /* 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 should be at least PAGE_SIZE. + * Records are stored in the backing file in a simple fashion. + * The backing file is essentially divided into fixed size + * "slots", ERST_RECORD_SIZE in length, with each "slot" + * storing a single record. No attempt at optimizing storage + * through compression, compaction, etc is attempted. + * NOTE that any change to this value will make any pre- + * existing backing files, not of the same ERST_RECORD_SIZE, + * unusable to the guest. + */ +/* 8KiB records, not too small, not too big */ +#define ERST_RECORD_SIZE (2UL * 4096) + +#define ERST_INVALID_RECORD_ID (~0UL) +#define ERST_EXECUTE_OPERATION_MAGIC 0x9CUL + +/* + * Object cast macro + */ +#define ACPIERST(obj) \ + OBJECT_CHECK(ERSTDeviceState, (obj), TYPE_ACPI_ERST) + +/* + * Main ERST device state structure + */ +typedef struct { + PCIDevice parent_obj; + + HostMemoryBackend *hostmem; + MemoryRegion *hostmem_mr; + + MemoryRegion iomem; /* programming registes */ + MemoryRegion nvmem; /* exchange buffer */ + uint32_t prop_size; + hwaddr bar0; /* programming registers */ + hwaddr bar1; /* exchange buffer */ + + uint8_t operation; + uint8_t busy_status; + uint8_t command_status; + uint32_t record_offset; + uint32_t record_count; + uint64_t reg_action; + uint64_t reg_value; + uint64_t record_identifier; + + unsigned next_record_index; + uint8_t record[ERST_RECORD_SIZE]; /* read/written directly by guest */ + uint8_t tmp_record[ERST_RECORD_SIZE]; /* intermediate manipulation buffer */ + +} ERSTDeviceState; + +/*******************************************************************/ +/*******************************************************************/ + +static unsigned copy_from_nvram_by_index(ERSTDeviceState *s, unsigned index) +{ + /* Read an nvram entry into tmp_record */ + unsigned rc = ACPI_ERST_STATUS_FAILED; + off_t offset = (index * ERST_RECORD_SIZE); + + if ((offset + ERST_RECORD_SIZE) <= s->prop_size) { + if (s->hostmem_mr) { + uint8_t *p = (uint8_t *)memory_region_get_ram_ptr(s->hostmem_mr); + memcpy(s->tmp_record, p + offset, ERST_RECORD_SIZE); + rc = ACPI_ERST_STATUS_SUCCESS; + } + } + return rc; +} + +static unsigned copy_to_nvram_by_index(ERSTDeviceState *s, unsigned index) +{ + /* Write entry in tmp_record into nvram, and backing file */ + unsigned rc = ACPI_ERST_STATUS_FAILED; + off_t offset = (index * ERST_RECORD_SIZE); + + if ((offset + ERST_RECORD_SIZE) <= s->prop_size) { + if (s->hostmem_mr) { + uint8_t *p = (uint8_t *)memory_region_get_ram_ptr(s->hostmem_mr); + memcpy(p + offset, s->tmp_record, ERST_RECORD_SIZE); + rc = ACPI_ERST_STATUS_SUCCESS; + } + } + return rc; +} + +static int lookup_erst_record_by_identifier(ERSTDeviceState *s, + uint64_t record_identifier, bool *record_found, bool alloc_for_write) +{ + int rc = -1; + int empty_index = -1; + int index = 0; + unsigned rrc; + + *record_found = 0; + + do { + rrc = copy_from_nvram_by_index(s, (unsigned)index); + if (rrc == ACPI_ERST_STATUS_SUCCESS) { + uint64_t this_identifier; + this_identifier = THE_UEFI_CPER_RECORD_ID(s->tmp_record); + if (IS_UEFI_CPER_RECORD(s->tmp_record) && + (this_identifier == record_identifier)) { + rc = index; + *record_found = 1; + break; + } + if ((this_identifier == ERST_INVALID_RECORD_ID) && + (empty_index < 0)) { + empty_index = index; /* first available for write */ + } + } + ++index; + } while (rrc == ACPI_ERST_STATUS_SUCCESS); + + /* Record not found, allocate for writing */ + if ((rc < 0) && alloc_for_write) { + rc = empty_index; + } + + return rc; +} + +static unsigned clear_erst_record(ERSTDeviceState *s) +{ + unsigned rc = ACPI_ERST_STATUS_RECORD_NOT_FOUND; + bool record_found; + int index; + + index = lookup_erst_record_by_identifier(s, + s->record_identifier, &record_found, 0); + if (record_found) { + memset(s->tmp_record, 0xFF, ERST_RECORD_SIZE); + rc = copy_to_nvram_by_index(s, (unsigned)index); + if (rc == ACPI_ERST_STATUS_SUCCESS) { + s->record_count -= 1; + } + } + + return rc; +} + +static unsigned write_erst_record(ERSTDeviceState *s) +{ + unsigned rc = ACPI_ERST_STATUS_FAILED; + + if (s->record_offset < (ERST_RECORD_SIZE - UEFI_CPER_RECORD_MIN_SIZE)) { + uint64_t record_identifier; + uint8_t *record = &s->record[s->record_offset]; + bool record_found; + int index; + + record_identifier = (s->record_identifier == ERST_INVALID_RECORD_ID) + ? THE_UEFI_CPER_RECORD_ID(record) : s->record_identifier; + + index = lookup_erst_record_by_identifier(s, + record_identifier, &record_found, 1); + if (index < 0) { + rc = ACPI_ERST_STATUS_NOT_ENOUGH_SPACE; + } else { + if (0 != s->record_offset) { + memset(&s->tmp_record[ERST_RECORD_SIZE - s->record_offset], + 0xFF, s->record_offset); + } + memcpy(s->tmp_record, record, ERST_RECORD_SIZE - s->record_offset); + rc = copy_to_nvram_by_index(s, (unsigned)index); + if (rc == ACPI_ERST_STATUS_SUCCESS) { + if (!record_found) { /* not overwriting existing record */ + s->record_count += 1; /* writing new record */ + } + } + } + } + + return rc; +} + +static unsigned next_erst_record(ERSTDeviceState *s, + uint64_t *record_identifier) +{ + unsigned rc = ACPI_ERST_STATUS_RECORD_NOT_FOUND; + unsigned index; + unsigned rrc; + + *record_identifier = ERST_INVALID_RECORD_ID; + + index = s->next_record_index; + do { + rrc = copy_from_nvram_by_index(s, (unsigned)index); + if (rrc == ACPI_ERST_STATUS_SUCCESS) { + if (IS_UEFI_CPER_RECORD(s->tmp_record)) { + s->next_record_index = index + 1; /* where to start next time */ + *record_identifier = THE_UEFI_CPER_RECORD_ID(s->tmp_record); + rc = ACPI_ERST_STATUS_SUCCESS; + break; + } + ++index; + } else { + if (s->next_record_index == 0) { + rc = ACPI_ERST_STATUS_RECORD_STORE_EMPTY; + } + s->next_record_index = 0; /* at end, reset */ + } + } while (rrc == ACPI_ERST_STATUS_SUCCESS); + + return rc; +} + +static unsigned read_erst_record(ERSTDeviceState *s) +{ + unsigned rc = ACPI_ERST_STATUS_RECORD_NOT_FOUND; + bool record_found; + int index; + + index = lookup_erst_record_by_identifier(s, + s->record_identifier, &record_found, 0); + if (record_found) { + rc = copy_from_nvram_by_index(s, (unsigned)index); + if (rc == ACPI_ERST_STATUS_SUCCESS) { + if (s->record_offset < ERST_RECORD_SIZE) { + memcpy(&s->record[s->record_offset], s->tmp_record, + ERST_RECORD_SIZE - s->record_offset); + } + } + } + + return rc; +} + +static unsigned get_erst_record_count(ERSTDeviceState *s) +{ + /* Compute record_count */ + unsigned index = 0; + + s->record_count = 0; + while (copy_from_nvram_by_index(s, index) == ACPI_ERST_STATUS_SUCCESS) { + uint8_t *ptr = &s->tmp_record[0]; + uint64_t record_identifier = THE_UEFI_CPER_RECORD_ID(ptr); + if (IS_UEFI_CPER_RECORD(ptr) && + (ERST_INVALID_RECORD_ID != record_identifier)) { + s->record_count += 1; + } + ++index; + } + return s->record_count; +} + +/*******************************************************************/ + +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 design. The READs simply return the reg_value contents. + */ + trace_acpi_erst_reg_write(addr, val, size); + + switch (addr) { + case ERST_CSR_VALUE + 0: + case ERST_CSR_VALUE + 4: + s->reg_value = erst_wr_reg64(addr, s->reg_value, val, size); + break; + case ERST_CSR_ACTION + 0: +/* case ERST_CSR_ACTION+4: as coded, not really a 64b register */ + switch (val) { + case ACPI_ERST_ACTION_BEGIN_WRITE_OPERATION: + case ACPI_ERST_ACTION_BEGIN_READ_OPERATION: + case ACPI_ERST_ACTION_BEGIN_CLEAR_OPERATION: + case ACPI_ERST_ACTION_BEGIN_DUMMY_WRITE_OPERATION: + case ACPI_ERST_ACTION_END_OPERATION: + s->operation = val; + break; + case ACPI_ERST_ACTION_SET_RECORD_OFFSET: + s->record_offset = s->reg_value; + break; + case ACPI_ERST_ACTION_EXECUTE_OPERATION: + if ((uint8_t)s->reg_value == ERST_EXECUTE_OPERATION_MAGIC) { + s->busy_status = 1; + switch (s->operation) { + case ACPI_ERST_ACTION_BEGIN_WRITE_OPERATION: + s->command_status = write_erst_record(s); + break; + case ACPI_ERST_ACTION_BEGIN_READ_OPERATION: + s->command_status = read_erst_record(s); + break; + case ACPI_ERST_ACTION_BEGIN_CLEAR_OPERATION: + s->command_status = clear_erst_record(s); + break; + case ACPI_ERST_ACTION_BEGIN_DUMMY_WRITE_OPERATION: + s->command_status = ACPI_ERST_STATUS_SUCCESS; + break; + case ACPI_ERST_ACTION_END_OPERATION: + s->command_status = ACPI_ERST_STATUS_SUCCESS; + break; + default: + s->command_status = ACPI_ERST_STATUS_FAILED; + break; + } + s->record_identifier = ERST_INVALID_RECORD_ID; + s->busy_status = 0; + } + break; + case ACPI_ERST_ACTION_CHECK_BUSY_STATUS: + s->reg_value = s->busy_status; + break; + case ACPI_ERST_ACTION_GET_COMMAND_STATUS: + s->reg_value = s->command_status; + break; + case ACPI_ERST_ACTION_GET_RECORD_IDENTIFIER: + s->command_status = next_erst_record(s, &s->reg_value); + break; + case ACPI_ERST_ACTION_SET_RECORD_IDENTIFIER: + s->record_identifier = s->reg_value; + break; + case ACPI_ERST_ACTION_GET_RECORD_COUNT: + s->reg_value = s->record_count; + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE: + s->reg_value = s->bar1; + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_LENGTH: + s->reg_value = ERST_RECORD_SIZE; + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES: + s->reg_value = 0x0; /* intentional, not NVRAM mode */ + break; + case ACPI_ERST_ACTION_GET_EXECUTE_OPERATION_TIMINGS: + /* + * 100UL is max, 10UL is nominal + */ + s->reg_value = ((100UL << 32) | (10UL << 0)); + break; + case ACPI_ERST_ACTION_RESERVED: + 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_CSR_ACTION + 0: + case ERST_CSR_ACTION + 4: + val = erst_rd_reg64(addr, s->reg_action, size); + break; + case ERST_CSR_VALUE + 0: + case ERST_CSR_VALUE + 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 void erst_mem_write(void *opaque, hwaddr addr, + uint64_t val, unsigned size) +{ + ERSTDeviceState *s = (ERSTDeviceState *)opaque; + uint8_t *ptr = &s->record[addr - 0]; + trace_acpi_erst_mem_write(addr, val, size); + switch (size) { + default: + case sizeof(uint8_t): + *(uint8_t *)ptr = (uint8_t)val; + break; + case sizeof(uint16_t): + *(uint16_t *)ptr = (uint16_t)val; + break; + case sizeof(uint32_t): + *(uint32_t *)ptr = (uint32_t)val; + break; + case sizeof(uint64_t): + *(uint64_t *)ptr = (uint64_t)val; + break; + } +} + +static uint64_t erst_mem_read(void *opaque, hwaddr addr, + unsigned size) +{ + ERSTDeviceState *s = (ERSTDeviceState *)opaque; + uint8_t *ptr = &s->record[addr - 0]; + uint64_t val = 0; + switch (size) { + default: + case sizeof(uint8_t): + val = *(uint8_t *)ptr; + break; + case sizeof(uint16_t): + val = *(uint16_t *)ptr; + break; + case sizeof(uint32_t): + val = *(uint32_t *)ptr; + break; + case sizeof(uint64_t): + val = *(uint64_t *)ptr; + break; + } + trace_acpi_erst_mem_read(addr, val, size); + return val; +} + +static const MemoryRegionOps erst_mem_ops = { + .read = erst_mem_read, + .write = erst_mem_write, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +/*******************************************************************/ +/*******************************************************************/ + +static const VMStateDescription erst_vmstate = { + .name = "acpi-erst", + .version_id = 1, + .minimum_version_id = 1, + .fields = (VMStateField[]) { + VMSTATE_UINT8(operation, ERSTDeviceState), + VMSTATE_UINT8(busy_status, ERSTDeviceState), + VMSTATE_UINT8(command_status, ERSTDeviceState), + VMSTATE_UINT32(record_offset, ERSTDeviceState), + VMSTATE_UINT32(record_count, ERSTDeviceState), + VMSTATE_UINT64(reg_action, ERSTDeviceState), + VMSTATE_UINT64(reg_value, ERSTDeviceState), + VMSTATE_UINT64(record_identifier, ERSTDeviceState), + VMSTATE_UINT8_ARRAY(record, ERSTDeviceState, ERST_RECORD_SIZE), + VMSTATE_UINT8_ARRAY(tmp_record, ERSTDeviceState, ERST_RECORD_SIZE), + VMSTATE_END_OF_LIST() + } +}; + +static void erst_realizefn(PCIDevice *pci_dev, Error **errp) +{ + ERSTDeviceState *s = ACPIERST(pci_dev); + unsigned index = 0; + bool share; + + 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; + } + + share = object_property_get_bool(OBJECT(s->hostmem), "share", &error_fatal); + if (!share) { + error_setg(errp, "ACPI ERST requires hostmem property share=on: %s", + object_get_canonical_path_component(OBJECT(s->hostmem))); + } + + s->hostmem_mr = host_memory_backend_get_memory(s->hostmem); + + /* HostMemoryBackend size will be multiple of PAGE_SIZE */ + s->prop_size = object_property_get_int(OBJECT(s->hostmem), "size", &error_fatal); + + /* Convert prop_size to integer multiple of ERST_RECORD_SIZE */ + s->prop_size -= (s->prop_size % ERST_RECORD_SIZE); + + /* + * MemoryBackend initializes contents to zero, but we actually + * want contents initialized to 0xFF, ERST_INVALID_RECORD_ID. + */ + if (copy_from_nvram_by_index(s, 0) == ACPI_ERST_STATUS_SUCCESS) { + if (s->tmp_record[0] == 0x00) { + memset(s->tmp_record, 0xFF, ERST_RECORD_SIZE); + index = 0; + while (copy_to_nvram_by_index(s, index) == ACPI_ERST_STATUS_SUCCESS) { + ++index; + } + } + } + + /* Initialize record_count */ + get_erst_record_count(s); + + /* BAR 0: Programming registers */ + memory_region_init_io(&s->iomem, 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); + + /* BAR 1: Exchange buffer memory */ + memory_region_init_io(&s->nvmem, OBJECT(pci_dev), &erst_mem_ops, s, + TYPE_ACPI_ERST, ERST_RECORD_SIZE); + pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->nvmem); + + /* + * The vmstate_register_ram_global() puts the memory in + * migration stream, where it is written back to the memory + * upon reaching the destination, which causes the backing + * file to be updated (with share=on). + */ + vmstate_register_ram_global(s->hostmem_mr); + + trace_acpi_erst_realizefn_out(s->prop_size); +} + +static void erst_reset(DeviceState *dev) +{ + ERSTDeviceState *s = ACPIERST(dev); + + trace_acpi_erst_reset_in(s->record_count); + s->operation = 0; + s->busy_status = 0; + s->command_status = ACPI_ERST_STATUS_SUCCESS; + /* indicate empty/no-more until further notice */ + s->record_identifier = ERST_INVALID_RECORD_ID; + s->record_offset = 0; + s->next_record_index = 0; + /* NOTE: record_count and nvram are initialized elsewhere */ + trace_acpi_erst_reset_out(s->record_count); +} + +static Property erst_properties[] = { + DEFINE_PROP_LINK(ACPI_ERST_MEMDEV_PROP, ERSTDeviceState, hostmem, + TYPE_MEMORY_BACKEND, HostMemoryBackend *), + 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; + 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 dd69577..262a8ee 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -4,6 +4,7 @@ acpi_ss.add(files( 'aml-build.c', 'bios-linker-loader.c', 'utils.c', + 'erst.c', )) acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu.c')) acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu_hotplug.c')) From patchwork Wed Jun 30 19:07:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 827C1C11F65 for ; Wed, 30 Jun 2021 19:11:30 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id F10A461461 for ; Wed, 30 Jun 2021 19:11:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F10A461461 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfcP-0003n2-4f for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:11:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZF-00074N-Bt for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:13 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:13854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ7-0005nE-Ko for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:12 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ6q77007417; Wed, 30 Jun 2021 19:08:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2020-01-29; bh=mzHmRG3cqnhU1qBANplUOQqg713Txtq/wF+2D3fZWYU=; b=KYS2Zo6Y9jMbsr1bAW6kOueB/E7Pfd9aY/p2f4dmmqnt3WphJWAEeJkHmwvbtCREH6QV BXMBuZhFUTgCjtJkG10XSEyh2XZ1EIGQ9DkzpqAJiORJsF2aqu74QjRAnnJyuAguQ5Nh cZus4lpTwfD2spoJ4YIM23uRckt7uApvKBF/dZdmR2AG0mQGqYJ2Al9ghiwpiQVJGuqM IYDD1IvqtC1MUSCdArog7pEn9sJ2nXs4RUtLk7RtDSOyo+/a3BTGkgYZownIttUtiSK3 iOCmFlOo4ohO+HnHqi2AEq2ZHYFs7jJhcyuXLkcDRc8QL0yzlQpQ/P6B5bGksnfPdK76 Fw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 39gguq1ra0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:04 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UIxvjC089823; Wed, 30 Jun 2021 19:08:03 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by aserp3020.oracle.com with ESMTP id 39dv28kymg-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n4SRNtFzpLJnjqdHBLHH33U+R6FAqPnWekCkCuFGlmEW7kEEm0F7FD+qWpxkycfZ2zTKwuSR6sv9Yk5Utu9RsE50IgM2Gg1yplU39jQuPuczeeN09MRXOV3cN12eGkiCzhjkqKyiV4Yz7OPa7b7Mg3528cwzTgo+RYJIVtuvIOauxuqTBEG6Br3YGfgjhpweYVBQ3CxH/hFBVYxoo4cHj82shiNZbFZzAw6peRhVyOW/14DbKpK3lZspFfS+WioT4Owyx4WrQsHP5ARbQ8vXE+x65EUHvc7P9jXcDYGdc3919KaHxxtQS+G4UpzEU08gETzQtbe+QcqhYYORaJKIwg== 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-SenderADCheck; bh=mzHmRG3cqnhU1qBANplUOQqg713Txtq/wF+2D3fZWYU=; b=RVj1DYtdHVuxtCq8b8odoYjAmBmrJAft4cuT7I3ha2Oj3lqRQPYrZVyF0aBbfGmUw5o461QSlF1q5t1H8XNLvzeVIUadATjSi18M8GjjRNgRp3NxaR9dKWktBfcpjC4ogz1CYUERdLN/P2Zvh6A0KJex/0Q6aDLgx2DqqCgKyxGezeGZExb+ef3mfzZ+Rl36S7xo29lLVt+QY9C1ZZT7bqvMrUkNyvwGbE39xbz+dDBFPo2KUxQ8QTKDbHRRbErKOg4yYUL2gpSvUv7AT9l9lXGemCLyyVznvdx5g7NR2hGWUuM4Mqc8STv3jeq8GDnH/IOebOFKGRuBLhC/VMkd0A== 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=mzHmRG3cqnhU1qBANplUOQqg713Txtq/wF+2D3fZWYU=; b=lKo4km2NJMq9Sxz/TCIkdTUA6hOFFG/RVlnk8chJzTEV4qy4KV+yRP/ycWwmiJuZ2J/zqzP8LBAzS5Qm9WVm0KzUeEviCFf7c89Ec8atzsTiKgTGLl038qvcXem4UpNCavGtCcxAitDQvJ2MurpQ8a1jCYJQ1rVlt5LcHBAjjC0= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO6PR10MB5473.namprd10.prod.outlook.com (2603:10b6:5:355::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Wed, 30 Jun 2021 19:08:01 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:08:01 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 06/10] ACPI ERST: build the ACPI ERST table Date: Wed, 30 Jun 2021 15:07:17 -0400 Message-Id: <1625080041-29010-7-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:07:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8caca31b-9a38-4ad7-9aef-08d93bfa6136 X-MS-TrafficTypeDiagnostic: CO6PR10MB5473: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:569; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l4HzZdrfxIdqYXN8H3xWDlIy0Rhqp3cCfW89O22o/13jZevM0z8N93xSHZ/WO4WGlL+mFrRX6OZxbU//sUgemvoRXOT+mwPFgHiBAAuROKj6yijxUjvczOIMHT+g787FV75j4uYErQuMpADI5ldYbq4SRCUikMA5NAxISgfLpx2JiWjQEjot5JY/NsZn5547EEIcRLZ0fpYJZ9iLZZ82F4tYMp+p0AtuMGz5ZSIzcIx2py9VYnCwSJAZ+8HfjkJm7dqggPsg0cRngWAFnthFqnPgrHnkdUNwoZ99unrOhUqAVYaj/E/h9+CY76jz2/JO24Zpc371jJZsJOjdVW8QoNFwvsR4cbkalTx1Eag2Ha6FwhK8MQgDf2PUtwX0zQIbh3PpBWofW6MfOSdaDVp4uGTgmiKhx+8UWr+vH3uOP/FIUAUVD7baCl3G/J+O/9AY/R2DHieDwAKo+naO9CM/7RXb5j6UtO3tYx2ij/2aNvJmdJaoz2Glr9U6Y6tzkNOtXM6sXYvfD9UVSQTYHEgVBKNRAD74EfvHKhUmmZIqeDZXvMEzf0OoXUJpmPVALiqQyi3oH8NqOn9YLgYCpvAfpiYLN9sDG/yKs3zjX6te8T3yyheA35wDc2CSiRxrtvQZYDByZAOTNFzPcQqfT5Yy4LiSWp0gS5LHaolUtOxBIhUjEWb/KFJ4KfT48do321F7WUn93+6seTO2V9/1iC8j2g== 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:(376002)(39860400002)(136003)(396003)(346002)(366004)(107886003)(2906002)(83380400001)(6666004)(66476007)(66556008)(8936002)(6916009)(8676002)(66946007)(4326008)(2616005)(956004)(7696005)(86362001)(186003)(16526019)(478600001)(26005)(38100700002)(38350700002)(5660300002)(36756003)(316002)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0yOtxHUP3CFEGa+5ud5Wvu+mKaRo94P7uyIhSxnjGsh8iT40yLyCC9lLcPeGyIMhHP0Xx5Z/wfFdsAm9TURubY1m73ilEBs1MRmF7h0N6iyNaCGDB7J3ROg7pSmBytIOhV4YLLM3QU1eQuXYP+RI5D4jLDGaB/pLslV3gdvdKfe8Zj5sOEZmz1ZC10Cl45A41zFrUskgRti3atuKw+DeO44SoULlWDxGvoXQpmZDaLjQGfFrdpZfL2CfjLmkpUH7oq1CVrjVIoy+0FnlyfbTOzj/IHPuSIBj+xdDNFBVY7K849SeTquH0gaRgwHdaHTuVV7Pjvw/AHbjb7oPU6QIgGUwnK99568GSTxNKiDBLjBqdilAw1I+nVS5SJz5zht7Sh0zBFlp8WCy7j4ol/+/EFZ0P2EjoOZuclClRfJ2lwRtnVWxhdIbLuNCEvmhadGif5NRm9aUCjOdYdpkoDoY2G7Sg0iIa8J88Lz1QDeoU22wMvjhEEv3qedmO/xYnbPehKkyHoqc+eHDDPsUNlG35/kmBzNRRmOSHtijicONaB3w8+S+TnYwoKdXi8YMG/+5XhpQAW+gn7CittzHyaYIe/PrbbQWznpO1NNW4CzXKsoXy7SO4Gs7nSTs1RQLaJ/Pvop1zxEVyDo/hZqGkZI4zqc5ycZ4BTduM7gS+GNSCd78XoBR1In/wuUsaB/29mXu8byBqiMs21pI7hlxB7+CQH65GzWn4kc2y3stSh0qgU5wa5zjfH2TK+YcBiDJHaeUr8u4l6Z6Rf35NdslQypYSXx+0eOjZYhXsYikuzyYoIdFBJUeycAJiV+OMaRlHm0mIDBrCFg0dcMjXvrBQhxd/oaA7llX+o3Irar2x7KbramsRYZDBacWObn38Ov9IXwNtkSNxcNQer/kk/iVsU+OEgEXyffx4FUZco+AOq94EdSKmH5e+gEmDj1I6kvCsRGIJW6zGbyFYJZA4SmMIbflFpc1kZlMfMJHthgN7CdmTkDZwrP2dNaifUqTmFvlW7vcAQYT4Ewqcjbu7Y4AOO3QgAL+7qAY0Rorn6X0N2aUp6mUWm4ukDbMKIgMOFbhRNQnnpIfzTSyEHK0QsJea1MjXCYhPLPICUvOeCw18YdCF6YfALmJN/NHGzKohTgDqvzwUB0H0UrMz7FgDQzAh/ktiNf//mozRG/kSisuCPrdAyTVwsKz+0pmHUXktCmwBLkib/jYbVcpUOD+iRaj9PTBPYZFeEihMtAjAXQvuTC8lon85RU0S9evCmqSHziGov2vb9GgfdZ2Q8IpGV8uFJobziKrhDZJ0NJUHewVmx/r+qv2AXFwmPcV5NYjSJcqMwv4 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8caca31b-9a38-4ad7-9aef-08d93bfa6136 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:08:00.9422 (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: l4DtHiHg4c5E9RB+4QFi3DrRyruvhbCQxCQLXwsL56DgmfByFA7ohsJOAYj0ra5u3PgTKGfhh3rzDwceiD347+29/WCmbKgCB9camKrEWd0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5473 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-ORIG-GUID: WXpVVWKfFpnSqmudDlBqAOFMxh9bQ2xV X-Proofpoint-GUID: WXpVVWKfFpnSqmudDlBqAOFMxh9bQ2xV 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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 code is called from the machine code (if ACPI supported) to generate the ACPI ERST table. Signed-off-by: Eric DeVolder --- hw/acpi/erst.c | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index 6e9bd2e..1f1dbbc 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -555,6 +555,220 @@ static const MemoryRegionOps erst_mem_ops = { /*******************************************************************/ /*******************************************************************/ +/* 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) +{ + ERSTDeviceState *s = ACPIERST(erst_dev); + unsigned action; + unsigned erst_start = table_data->len; + + s->bar0 = (hwaddr)pci_get_bar_addr(PCI_DEVICE(erst_dev), 0); + trace_acpi_erst_pci_bar_0(s->bar0); + s->bar1 = (hwaddr)pci_get_bar_addr(PCI_DEVICE(erst_dev), 1); + trace_acpi_erst_pci_bar_1(s->bar1); + + acpi_data_push(table_data, sizeof(AcpiTableHeader)); + /* serialization_header_length */ + build_append_int_noprefix(table_data, 48, 4); + /* reserved */ + build_append_int_noprefix(table_data, 0, 4); + /* + * instruction_entry_count - changes to the number of serialization + * instructions in the ACTIONs below must be reflected in this + * pre-computed value. + */ + build_append_int_noprefix(table_data, 29, 4); + +#define MASK8 0x00000000000000FFUL +#define MASK16 0x000000000000FFFFUL +#define MASK32 0x00000000FFFFFFFFUL +#define MASK64 0xFFFFFFFFFFFFFFFFUL + + for (action = 0; action < ACPI_ERST_MAX_ACTIONS; ++action) { + switch (action) { + case ACPI_ERST_ACTION_BEGIN_WRITE_OPERATION: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_BEGIN_READ_OPERATION: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_BEGIN_CLEAR_OPERATION: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_END_OPERATION: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_SET_RECORD_OFFSET: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER , 0, 32, + s->bar0 + ERST_CSR_VALUE , 0, MASK32); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_EXECUTE_OPERATION: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_VALUE , ERST_EXECUTE_OPERATION_MAGIC, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_CHECK_BUSY_STATUS: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_READ_REGISTER_VALUE , 0, 32, + s->bar0 + ERST_CSR_VALUE, 0x01, MASK8); + break; + case ACPI_ERST_ACTION_GET_COMMAND_STATUS: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_READ_REGISTER , 0, 32, + s->bar0 + ERST_CSR_VALUE, 0, MASK8); + break; + case ACPI_ERST_ACTION_GET_RECORD_IDENTIFIER: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_READ_REGISTER , 0, 64, + s->bar0 + ERST_CSR_VALUE, 0, MASK64); + break; + case ACPI_ERST_ACTION_SET_RECORD_IDENTIFIER: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER , 0, 64, + s->bar0 + ERST_CSR_VALUE , 0, MASK64); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_GET_RECORD_COUNT: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_READ_REGISTER , 0, 32, + s->bar0 + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_BEGIN_DUMMY_WRITE_OPERATION: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_RESERVED: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_READ_REGISTER , 0, 64, + s->bar0 + ERST_CSR_VALUE, 0, MASK64); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_LENGTH: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_READ_REGISTER , 0, 64, + s->bar0 + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_READ_REGISTER , 0, 32, + s->bar0 + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_GET_EXECUTE_OPERATION_TIMINGS: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32, + s->bar0 + ERST_CSR_ACTION, action, MASK8); + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_READ_REGISTER , 0, 64, + s->bar0 + ERST_CSR_VALUE, 0, MASK64); + default: + build_serialization_instruction_entry(table_data, action, + ACPI_ERST_INST_NOOP, 0, 0, 0, action, 0); + break; + } + } + build_header(linker, table_data, + (void *)(table_data->data + erst_start), + "ERST", table_data->len - erst_start, + 1, oem_id, oem_table_id); +} + +/*******************************************************************/ +/*******************************************************************/ + static const VMStateDescription erst_vmstate = { .name = "acpi-erst", .version_id = 1, From patchwork Wed Jun 30 19:07:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352763 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18E62C11F65 for ; Wed, 30 Jun 2021 19:21:15 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 86A4161462 for ; Wed, 30 Jun 2021 19:21:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86A4161462 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyflp-0007co-35 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:21:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZE-00072J-FD for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:12 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:14702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZ8-0005nj-OC for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:12 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ5Evv024203; Wed, 30 Jun 2021 19:08:05 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-2020-01-29; bh=LSaieLJN0g8ej6ziWlySQI1wPp+O+ZyY1KQJ6kBBXn4=; b=iJo/HtfNoxFcqAW3AUPlECF50WyzrRsTSwFtq4BAgX2ADiwfTB2uaP1B+iztQp4MT2XR dr0cO3/vudjpLgrRwUzZF+6EC1xxRkuk2Yq9mdq5+twQaBGJFhZwHU1WTPIMWXvAFq+8 Qkc24EeF55M6ks/9aX9PRtyVdOTS0CfjL5mzA5JaGjcIRG9zFAZalLQgInmXvpSpZgnG KGVvQu8gzhNl91EuY6UtX2P4L2SHBxTeI8yla1L8AX5Y62sSr6WtCYuUNHMhbWtg/+Wp 5L2IrZVwhJFUR9tafnsEXxyTDkoPWcnQFiMwHhLxWX4O+NCIX1UtbSToVa2TJ3JhrPVX zQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 39grmaruus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:04 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UIxvjD089823; Wed, 30 Jun 2021 19:08:04 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by aserp3020.oracle.com with ESMTP id 39dv28kymg-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hl5VIhHardt20ntvjH8ZLDgGwLs8kjxx9B1Pvw4jVoM83hxtN2eYsiLmZK9J6akrU+X6b55U85l/+Sn2lTOS7uxCF+4/FMwgv2vvrhOSlrcPlTbo0U+lLDU3BGJyeQuG0pkBRPm3o6k5EQX3bF4DDIrmMEsh2sITFkHATVGNWstbkqrLJDvk1Sr3na/FpJYC3Pdw3ugcwos3dz0QME8EJOHiHrtJv6dso6OElzB7b8qiXTep/B2ylpHQl2BVKeWm0jextM1dbDszn/prJjAvHjY0fJRSaupOg19u5BwORo8Ykd6aqcHNnky6p5o35XkghL/w7nlDl2v2DMsmnlQYgw== 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-SenderADCheck; bh=LSaieLJN0g8ej6ziWlySQI1wPp+O+ZyY1KQJ6kBBXn4=; b=mkKlWaNWlmoW0bA9bzYD52tPnPGqsQPvB/OL0ur+cy0BYsQpqIJBNmB2UjgU/PeqSnjRmOWqJSoNoff6/SLwhyOPIy3ORAVUWJjzimq/87fW1YkSTMViLSg+MDkjzocqLN23sJYdouEvUe21TaaibBaX2XmSAwhS9bpExK4bEBZk+BRDVgigbmr9NQWKXg4zIv2IH3eP7onYWVgaPZ2GXxYB46eb2z/YXHMUMWV4Mk78woDpMH089igaFVIfo6q6IdxkmAWQytupFG5IygHAZvlxLYuAzTVIhbs9Up+XUKUtNuLLcioUQgHfui+mKb+8iLK3t6np/MYMri1ugwp5eQ== 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=LSaieLJN0g8ej6ziWlySQI1wPp+O+ZyY1KQJ6kBBXn4=; b=ni6ZoRDsyhhYozP+6/3kFANrMk7Hde6roOv0/xEx/oTlZv2847AgtoCTmCsACktDgZQ6Edp/I/0bAB+2yrYj5aaDox/R6RWugEAk3DM5x74ijiJ7H9/YVqHm8+0n85ZxgvQarP8XnNSArnS7R0CF2+d3KgTMXiRY69bsrZy3GcE= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO6PR10MB5473.namprd10.prod.outlook.com (2603:10b6:5:355::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Wed, 30 Jun 2021 19:08:02 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:08:02 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 07/10] ACPI ERST: trace support Date: Wed, 30 Jun 2021 15:07:18 -0400 Message-Id: <1625080041-29010-8-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:08:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 81e4be1b-db21-49b2-4263-08d93bfa6220 X-MS-TrafficTypeDiagnostic: CO6PR10MB5473: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1751; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NhVRXM9eQiVTmZ31SABsx9XCDaaj8yV2GR8PqmGVnJtDeRPTRZc1BZnsvwQx+pJqM2h1ZDGlqGfnwdfhVRW+UfXqZBT8GfBpdTwGR3khR4nlH+7PFkznoJQCT8IqTN6ZY3rLmAmWhRBR54wxzi70fKJvQPQQj3onb4gAMqhGUVwfgKzm78QWEbn9imaRy3ihjf8VzYpirh6jbfiZb1Au8TXW6XLxSLbhfVv6UtTBKU1kWw2xN+Upckz2UsK4FNKOzteGXZaOBmI+RplC1mB57nTv0Qx/GOkmaiPAU/7dvVrS3jOeN/hXiE0+IKSVrVuI/Dp0bamKXf0YPhR+s+7Nfcq2v/D6AsrqbvoHevuLkjyubWdAuRNd9defh3mPZBdwVYA1WjSFtSzg8UOTXTzd9vzsqYtIU8yGXB89MGrvKgL9r3HriR2qlmd2XqrbSF2bF5Edy5y4O1XHiDrLGDG57ma9t+r30LdvmwoADpttYSA/LUc8ivQu2dxB3kDan/18R6ATgahT1wNkC1ZDjYiVKKAs2C8lRq/rtqH48HSM44+jmGzD8ObPwLTWLEL/FiLv2zsCLaWjAhM6iDkXMCVk6wou9sEs+wlWJxHtVk3Y4Y4Q+/QBrtrjINb6AeEZ0NYpBNfIzTcSAlMsldUlQ1YlrL4rjsXBjjfuSZC2U0X8U5LWTVnQ+kUckKzI520KyhjuRaH9Q8Zvdv8D0BNdTIqDzg== 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:(376002)(39860400002)(136003)(396003)(346002)(366004)(107886003)(2906002)(83380400001)(6666004)(66476007)(66556008)(8936002)(6916009)(8676002)(66946007)(4326008)(2616005)(956004)(7696005)(86362001)(186003)(16526019)(478600001)(26005)(38100700002)(38350700002)(5660300002)(36756003)(316002)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IHpxvaoEGqpo19dckrdabfFSSw7OW0bwFu3ske9ERYouOF5ZVGOsVmkUePUfWvBrW9QISuFL5tNR7yMyQU4Pd5u/TthqOK7k2EDNR4WYaYc+PCWufKX8Qlm1elfZce2n4TxBgX1UkmkXl4EZSC+y+9BPJd4YWzE0dOELsBI/wTSEkbs0+7Fl4c5QUVbh4b3yi+rXPPFUZq+5VnTKTlFQTp6G6esNYpQUXmTKbcfg1RcYb8W9NoUqtHPce1wOr+caQJI8+YTMAnAKoxIxt8yZeO+AwLk4/ePb6FbIo5qL+5IJdfcfG7Ct73xbttB8OsKxnwKDlw7CBO0f5UnXDyO0g3tgxYQcIaOgnT0WNHV/142ZFXhs/v0dSIIp8ij6jYqXBd9lzbnj95bp55gxjj2b66q2UEST7SDPDQ5iYpaSuMBzo9C9S/0UilbQDWSCx8/E25tTsJV8EJs9kiNB0wzSRPUgB0HXIF3DkMr6mvZXN8m/bC1woX59WLh33Ig776y1+YLdtksur0CutXe+zbUw+VnHdoQxsEu88OeO5ClbpFpH06NhlZByQ6eE7owbshDhZGR5qBD/UlDuJYN6X/fBEf6tg22BR+7tilMt+CejnmT/VGX02vvSnYnkPxiYUmyVcxZbcNr5Y4k8RHCo3QX5Um2DmFRa5xOZNHstw3XMC3C2RCbGDFkFam0X0UPrQFzcoHbQ888IhemFBqhoQ2tDbrC9E8hup1k7TsXrdp9cJaGYSM78B4rHchgCxAZI6l79ZdK5SZNLvCFR7616Kq+P8Pp44awD7LtCLGfDmqmGILigb8NmBVgjRdqiq1KJUt9A2q9G+iIC4VXBfoa/XvSfOKIjVLE2nF0iCjVImIjbSzHFkcpQ0Nid0oMDvkr3Xrp1eujvhQJZ2Eu7n0K88rp9tai0clydc6/NC/wdR8SzaUaOG+xSOudyuMDVBQHEEZOA3K+HR1JfekXn7GgL5N5w8fdChdZXdshbHW8f1ifoEaUkv2Zagfn0kdlS5GPEo94h/52oI/0H+Q2FGoDxOvZtlv9TZU5g7cUHbMpBvvY9MSwmD6jySZvxoWnnnIOdulM8maaulDSPHpD7xsXuZS/QSIMsWfiTEk9HrBKLvL6mbmEgO0KHQnK4wE6QXHA4xYtFXjlbFGhSIRsejA/XzP26AU2IwM7xsJhnc9RJUSkWYNCSFzwMCKsp5ErLQO1DNlh73ZpMT1roxvgO68miMjan17YHzZTJy4UshHFPITsUSL2OVBySYMeeS1bZo0ZXVJTUdNMVweaxvgnspW/OuVEg59TZi3Lxq1220KN8FjmeTU1C3w5Hw1hHerpW6NM6C6fp X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81e4be1b-db21-49b2-4263-08d93bfa6220 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:08:02.5492 (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: rKuldWfxPVuLiY5pAI3QC61DBc8SCGlVl1KLhU3NRuGXHM6J+rIHH9CBEVGlyF+HhPnHVNptLZreQk5Sn+EGeatUfj2mv5EWrdvyhSxyNCQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5473 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-GUID: Jl3he2jDrrwcePlEDQe1ohAsD872YQZO X-Proofpoint-ORIG-GUID: Jl3he2jDrrwcePlEDQe1ohAsD872YQZO 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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" Provide the definitions needed to support tracing in ACPI ERST. Signed-off-by: Eric DeVolder --- hw/acpi/trace-events | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events index dcc1438..a5c2755 100644 --- a/hw/acpi/trace-events +++ b/hw/acpi/trace-events @@ -55,3 +55,17 @@ 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_class_init_in(void) +acpi_erst_class_init_out(void) From patchwork Wed Jun 30 19:07:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352765 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67429C11F65 for ; Wed, 30 Jun 2021 19:23:05 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E123161283 for ; Wed, 30 Jun 2021 19:23:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E123161283 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfnc-0000kv-22 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:23:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZG-00076U-2p for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:14 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:20310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZB-0005oa-FA for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:13 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ5Evw024203; Wed, 30 Jun 2021 19:08:08 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-2020-01-29; bh=6KAZRIID+/0NtGEA/fn96cRtOeSuJYMUs76XSSunMtA=; b=P9eeBGIa1qk6FpOoDdKyUBSEbcDV5gDibx2SwAXWt+x+X7NBGuy+ZReBD6gkyTiC8+1w KKKPDYZVNssIt8blM8kUO61MZE3DLw5OTCTISoc+DGhwnNTqnQHs4wmDFnWZccTrYr6g K9+KK7SpXWk1wwWybv0P/kJ6em2pd46vEmHY4FVnpdUh25SluKj56GftFEfTaTx9oIC/ JSDdU6Jl7OrrolSOyM6Kn2HuBTjT2ALs6xrx9+C4afs3Og9hmh38Eks/+Rnv34ib49yx IEMRo+heV5uGfvftdV4B0KRLyu/agmVfFgAqOiFZ1qn0+r8u8Jei/QR7p82OU7nCkz0o Vw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39grmaruuv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:08 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UJ0Akc101205; Wed, 30 Jun 2021 19:08:07 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2105.outbound.protection.outlook.com [104.47.58.105]) by aserp3030.oracle.com with ESMTP id 39dt9hqpat-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R2nvLerr1MY4CdoOK4gGddYKCQNldrGAZmAhisHchtxUPkopsf4qeiA0neelqSARRIcUlQd3yml1zU+7oOd49+NNDacWGa8D9wllfmwM8+JgWqVe1O+v1LtXKMjbEn0DYOYnoohZ69qTqA9QYTSdTN5d6Cb7mx3E0loCn9nyRZbTeAiPLySOAiDQp4n/RfKC+ZZYqIkXCBEqvgGkYa6PmgZ2FwU7Hp6Kv7xTzARRRShG6HEy/W2u+TT9U4Qyos5gZKA3Lgs4Xh3xA0zDu3nJ1dV65BLTzGIjoybBDhn14KJyiKQSKVb/Cfkp7qw25uAlCEHvvwor7xvL1sNamvmHxQ== 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-SenderADCheck; bh=6KAZRIID+/0NtGEA/fn96cRtOeSuJYMUs76XSSunMtA=; b=LN/0X4uR6uihyVZldVmch/D4T0Ljq+sXn7M8eU8ThD2Ve/62tmTHeOk4glLOVP2C6zkDTNu2JzU/GtyWltYdtD3TBRwjfuQ9IC0D/wYrdPra81hRX5q6kw31hmdHc3l48wlT8FqCep+Agxj0onuz1gWDiPjNHIjiHQ0CVTu8NdBhnFueIbm4Zjxi5FL3DiSG/ZYUKUTDO85GErA3brIuVd3+p/7xPHN5Y/H2yh2Vaw+U+eN7dWgos177aBpu1mD80mHuoyV0PmWnbXDLI/00Q8m2jRssnUi3lTUlUjAqw2MHVBoSPTkMcvmVdxEjvVRnsC+wlgQetaGrJy/wrPhFTg== 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=6KAZRIID+/0NtGEA/fn96cRtOeSuJYMUs76XSSunMtA=; b=t4uOh0skSNh49/4wW+x2jn5yhyvy3nfXFQfzvjb/imAdlCY2CcGsL1HO/yPW/ss3CamN5FuzodJLmPIwFz4zUyH18Lz2FbGg1ZeGrFR/2P6GQmzUfVC2Ujows4i/uVAgAC+jFWV61OI9FFY4hs8h8VbbeydGqoMTmAkXav630VA= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1758.namprd10.prod.outlook.com (2603:10b6:301:9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 30 Jun 2021 19:08:04 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:08:04 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 08/10] ACPI ERST: create ACPI ERST table for pc/x86 machines. Date: Wed, 30 Jun 2021 15:07:19 -0400 Message-Id: <1625080041-29010-9-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:08:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ebe495f6-0caf-4edc-ea3c-08d93bfa6315 X-MS-TrafficTypeDiagnostic: MWHPR10MB1758: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 85S+FD0aoTwvgrihFPrw7pTtzRx27U94rpETpo+PceoC47vbSnl8RaTt61nbsIYVBSVfgiZarOKt4GvKW2P4cDqQqLLZV3IBt4LsdiGUxq+CBkZIWXDbPxdoIuh3ejSYz78Lg7Ag1USiJ+SC4igsbl1CBN1zzImPvTaOyHYTLQ5CAJW/ChMDtbUWGvhD8F6BSw7wT3r9mmw6QegXaoQNQUwneYdsBmOqecjvPN4GvC1ELyp39aSxFpqiLxhgBeGE1VdtfM5EMyBigeCSaPMii5VMQ8y/jO2KX2N0r//vxBeOc96bUm2bq/yYfKwfYt2l2kQYoHBuo5q4Qx86WQjrW2ZcU7zIweIxHL2bpJqwSIEAbE1AIcfLvlllxr5vnmZ7143Nqg7Y3R0zYGG0cM/m4UiuyUvMGuRKAngHDdQy3H8DxpMpJDCrfg0Urm/fpyMUU7POnny7V6VF7FFNHJAEwYiX/tdEkZqjeSyiczWD2aV9pEUprFGRzEPtURmlzBd4McbOWpzNorPQGAxBdvHnPYRpZ6O8ig24AfaA1eWPv8wE6lDo3y7OAkiCW2QX9bU+QFgqXAerVB/z62RjU7P0AJLqAwHzE537DaCEWixcR0Zee09qgb94LKWTlznn9rM1j2Mg8wxHXHH6qE4Af8Xqs3ZCFZqEw+zgvwCGFLk1RMaeXE3ThyJ2VYyyB1FpXEg+VZ5r8oYU3kFvsae+0z9XkA== 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:(136003)(376002)(346002)(39860400002)(396003)(366004)(6486002)(66556008)(2616005)(6666004)(2906002)(956004)(66476007)(66946007)(4326008)(107886003)(36756003)(316002)(86362001)(38350700002)(38100700002)(5660300002)(8936002)(16526019)(186003)(6916009)(478600001)(52116002)(26005)(8676002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j0r+ogDP//pRu5mv+irhhRKswHjccqBSstkbDbnQGZfwZCcabLlVRzvN75oUm3+QxskVMpkrIqsusYfdGlAa6F4hw6kM7W+J3IJHGIKc/t83fo95gj4riRF8ru0LRvqG3vGvmqJpeVCWjrUJ1U0p5xsvvdjxmP+jKZ0QXhPul+v3OiLLZ6F6LWT+DvKvrOt0LOS84y1iEMwjDw3lIOCE/8Cj/2xMdUIOGSkqYmDO9XyNZD3fLKpTR/iVNpC6Zf0cgdg7GscL+88GlucZ527/Kpy9TLr8r4yG8v23ESUcw/9Ttqc21WQDhDoV2wxfnjAju6QLc0PLnqaCs26rBLDWunBdf0KkM9NQN5QenZmHR1urKccrxMGgaIixNU5/9/lvM/r0M9TBmEgM0EGp/9cHPS6U2uTz5uujfI7/QGndpFPKl9D03KaQI2quFQe7LJFUGHvwzTb0UQscZVYpvwi22V/YjfWcK/NoTuV5HhoUECiQl+dmCCaqXnUrEWLnUhUROkOHYgI/KADH8sQy7wlNdwGHWkrM6DXkUBOm0BLUaxYvAqo13f+ZqiRD6mZ8NRQPsBV73+czPac/TWUoTDgpbEwa7m7/YWPCa7vMZZkFgUE7t3nPZ4FszWhfDN4rr7n5/afD3dHRJgfw0r/7UTP+8aIf9Wy7cZGzu3VS4J+jyvZbapi+i/LTG6OKA3C8nC3bs8lAhjZw42YuKbsukB9G5bqBw94lq9LbFPuE6QlEcMdRP8nWibDAGP/IPXdc55xifNsLlM0kyXhCUolmZ/mdP7nfHflp97fpMwcqJIbSnWTBJ4jB5LiDJ42OWYC2qIHajiaX1C5KG/9PdLHNuZJ256A0ektbin1A/5JK0yX65+40TfY9cNjYD9Q0037mmUsNcm4Tp/kkYmmezUnwsKnz+luCBGISPH4A3ZdqqgoFSbo0GnxLjqAYu+4LP5C6yfhTW52fq3mZHZqTVhu+Hwozux1haGdE7zLP40+HsWs0S/simmCEwCD1kDj/ie+zP+uZIh7etxnoMLBT7ErsfvVytAILT6r5BrHGi9C8zL1J05Lk8FdIM70kJRDNnCqHJSZhS5uuqrCbXR9J+0r5Lk8PmbXrJHqlSVsOyR6XqUAYKZM2nhcJhSznlDssIp42q6XWudca75O9YT/vadRfkBSeTilpwjU6WcKLtXHF+Z23XfgQ2gkXK9y+DKBkXGe7gO5uZRrOKo4Wnqb1JOW7OW99a6defd1QlSfiRrr40EtjRRlBvCdffAC68pfEKX3eJFBYvBUqIihKCvCc1z2rqA2a6zT1bCvYWDqiKJp8DxxASJsvHX7C9enYbI/WxqTpxIB1 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebe495f6-0caf-4edc-ea3c-08d93bfa6315 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:08:04.1770 (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: v0h4i94Orll9FnQjjgioGk95Eu2G7Kz/tGK7qcxa8cAmnUuD7tP2TbZCPqA3SXOqpIoVN458DPvT8Abs8CHdW3THeeftAB6peCm5qeER9V0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1758 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-GUID: 10V4a3tHhSWHgKwueNUUVkVi5M5neHmf X-Proofpoint-ORIG-GUID: 10V4a3tHhSWHgKwueNUUVkVi5M5neHmf 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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 --- hw/i386/acpi-build.c | 9 +++++++++ hw/i386/acpi-microvm.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index de98750..d2026cc 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 "hw/boards.h" #include "sysemu/tpm_backend.h" #include "hw/rtc/mc146818rtc_regs.h" @@ -2327,6 +2328,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) GArray *tables_blob = tables->table_data; AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL }; Object *vmgenid_dev; + Object *erst_dev; char *oem_id; char *oem_table_id; @@ -2388,6 +2390,13 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, x86ms->oem_table_id); + 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); + } + 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 ccd3303..0099b13 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/boards.h" #include "hw/i386/fw_cfg.h" #include "hw/i386/microvm.h" @@ -160,6 +161,7 @@ static void acpi_build_microvm(AcpiBuildTables *tables, X86MachineState *x86ms = X86_MACHINE(mms); GArray *table_offsets; GArray *tables_blob = tables->table_data; + Object *erst_dev; unsigned dsdt, xsdt; AcpiFadtData pmfadt = { /* ACPI 5.0: 4.1 Hardware-Reduced ACPI */ @@ -209,6 +211,13 @@ static void acpi_build_microvm(AcpiBuildTables *tables, ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, x86ms->oem_table_id); + 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); + } + xsdt = tables_blob->len; build_xsdt(tables_blob, tables->linker, table_offsets, x86ms->oem_id, x86ms->oem_table_id); From patchwork Wed Jun 30 19:07:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352753 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05FD8C11F65 for ; Wed, 30 Jun 2021 19:13:32 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7395C61461 for ; Wed, 30 Jun 2021 19:13:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7395C61461 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfeM-0007lD-MB for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:13:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZG-00078R-Jd for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:14 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:25432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZE-0005qE-4x for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:14 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ6VCs005974; Wed, 30 Jun 2021 19:08:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2020-01-29; bh=VIDvef8juSGKsWxabk+TgxIPYn/xj8mAQQ5Nv1Tex5Y=; b=aS787YcSwWMqTwtufCvcsFpaTlvVSNqSGaepKEEf9qOby7eA8id9lJoGYGy3oapho1oa Hil0pxq5lMU3eh5vM7aTUtOd2kz2KVNUVIihN1s6TgdKNpTYupOHFIfXA6r+cmduqCuS hdJtxgBZs8T/nziREbP5eEa8HX4G25Gr9STF4pUUqt0/cP9k3UGK0F6BOGNbBHRnIs09 MR19QqNu+NfN6xgH98lorTdMZWtpaC5IdfJhoRIamxLhASRxOp6qo/Gcwfk3xjzRyXcJ mp4tXiw3PomawWbcQ2YEyMxk5Y7n5/SSvPOlPJimgWUXcYqkGMZeOChVxzu1N9FzeQ18 Tg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39gb2t26xv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:09 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UJ0Akg101205; Wed, 30 Jun 2021 19:08:08 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2105.outbound.protection.outlook.com [104.47.58.105]) by aserp3030.oracle.com with ESMTP id 39dt9hqpat-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dS9MUnz5aEQHcil5Y+Rl3wo1ng/FCBMaCQ7riSehcqQDflTPBaf+AEVhU3koMDBOh6C0ZNrkFdNIqxtgI0U8w6eztlIskTrdfE/PTVEX1ssPncrJBhfLCqSaKDKEdFZDe1+KzFv6xH0ykLOY+KVHDgRo6bRXex4c6ao5JnK6+x5F4JDAwtE8UO+Nr37uCY0Q8u5soAe9YehWgXWDhN10kXGglWlGRggw3pdbGCe7lFRzSwfhlPMWAI6VsmSPjxuJDOnY9u8Jc6HT7nhBh9xYIZZ5+Sfmf1TKdrBQX8C3V63iQK4ug9dPi8W2zu+nwPjv0eKYX5Ql0P2MAM+vdGmVGw== 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-SenderADCheck; bh=VIDvef8juSGKsWxabk+TgxIPYn/xj8mAQQ5Nv1Tex5Y=; b=K4jzp1Je//eT292V68EQe6ShH9VveuE3xoByhndM2PjuoYqLeYA1CtzZK+77PZcTZUJJPIWWMtIk3zq6ocJlzYJOC4ELj/586vXU+J9mGRiRePXSKmq9ej7mzlMy0P4EjqE+7lmIjFGkAiITfFmMSwokITOfyzvyKk9iS3UxykNKCB3MHGDtamEVtYOAKWkl8sUimD4JAfQZ2tWzdTw9vJrrcL0W/Z/5YwSfPJf3OsAe/Nkn7ArcnaPMrCrk7evrwmtrzw775msHWoG8lCBFUvv8wJcOT/SOphTsWdHNVb3cnjR/2Y1FOI/C0rRO2fD9UaFKucm2cH+kJVEk59q7Xw== 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=VIDvef8juSGKsWxabk+TgxIPYn/xj8mAQQ5Nv1Tex5Y=; b=GawuqG8urOLg5++blVz8NGYoCJJVYsl/ifY+yY7Kvo1YmSCTdmQt92EJz7Mhzk6skn9PjUvTdcnge7SyfsKmqFCVx83dtIrwxx5Hf+HWPd7PNxAKYXS9kpYN+8x9F9R8+MAs85ObzNG+Zj+mfhqxF+VTHPYLBF+fRyjxnUsDrpE= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1758.namprd10.prod.outlook.com (2603:10b6:301:9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 30 Jun 2021 19:08:05 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:08:05 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 09/10] ACPI ERST: qtest for ERST Date: Wed, 30 Jun 2021 15:07:20 -0400 Message-Id: <1625080041-29010-10-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:08:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8106ac3-089f-44e7-9bf3-08d93bfa640e X-MS-TrafficTypeDiagnostic: MWHPR10MB1758: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h9YTZBf6puzZzu6un5CVu98JH77gVyy0jRH73jg3P5bbi3pcPtV4sQdMuK97iZ7fRe6J2Uk4YLwMHDweSEuz/WF8/+IkvT45PY+EeK1oY/GGEd138SN5pRcmcejGpVeQd5YrA0leXBK6ydVpGnSwJesBNZ/3+mn/kMvww9UZ3ak0Wqn92Zq0UStPNu1KZTI1IVam299oa2sKurpGQ6hk4KuZo1aTd43kHh4rDwPRCD/HIHu5Ga35ynLhBYNRZv4F5cZMER3yjnnTPuNkKpA0mUu9CrzaEeZi+gVeqBTFwYAElq/s0SCCEWUIttBxVwqvU0EIindzsWpE1tL6zEU9pbl0LZoLKfdRuosQaKbuUZD0LJwZ4IYqq9KqLaIFOEETdU99LZLT+QY0znFkiRFW6d52lSDCxXLWXOz+0vT5/m4NnoyjunQyasO5c1wcLsahsPg3d0UzXgTGaM3Kko4KhpU427aVyw/PC+93wEWzcK8wpVfddckj2gwFkN95DtNvpjGYfrh4bdV7mO6YgfgeTIvfzWUzu+L39k0Md281hLrWp3JQvGgJw7eVJ4BQc0SwT8DXgv/aJomd0PNIvov/jHDlgfdK51ouSdRApGYrkYKXmG8DMZzfkhZ2JIbzSHEPBOrBtHUnPEJw3pgZiMu8lObIpvvEgg+l5NlAx5awok5mJALFLIvJAU2YZ/eSrEx4NJf9YefQi4mknJFplOuaMA== 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:(136003)(376002)(346002)(39860400002)(396003)(366004)(6486002)(66556008)(2616005)(6666004)(2906002)(956004)(66476007)(66946007)(4326008)(107886003)(36756003)(316002)(86362001)(38350700002)(38100700002)(5660300002)(8936002)(16526019)(186003)(6916009)(478600001)(52116002)(26005)(8676002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: L4MT73WJzYXRdZCrrtZ9/1Nb3oFt1kxqJtEI0kujnyZb9tKUbEHYxovKWU0VXuBK3RWOS2AQZjlpv9GH32+x9+05gCiGcCUxW9Ac/n1/7L49GZqhX+x7QkAdWCTt+PQ7t4m7Sna97uR5Z9DIi5TcgBPW4z3GwlkmORGDpVYzEuOAq2D057gAj/jQHTHuyiAMGVNsNq1d/NkMIZUi+xrpHFvNt+1eVmqmmKeiaR4SAVsCoLwhcQOxs9K6q05rVJsNhgaE9zgddB8iWb4BZ/M9KiWxfd24BkAqhqSAiPVJDhgjrHb2y+bCgl9n3lDGtN3S1FqPG168Z7XnA9i7jtUyV68MCoILoBLbzOv0NgKDQ0Agz2/KxP0XGHYkVGV1hyPr6H5qfkEJQ3EZqfviCK3j7l1p/R9BHVdLbdPrYZn7CGpPj+jCEXOVCoDalpcOOO+IaxjHX4+5CgizivOvzvDHXge8Jem2uFF+Bk3zoZxBMKCKkekjhQWxtNalFgjVYmQcCzF1emoKKe2gvvhB9ZM8bHdtGmMkVh+vnspGcaCVF563E87/djNGwFnVpKVoFBU8QiqH9dtZa+jKc4cuCmul9cLf/miyLvb3dI8pfP8mdL8BDPrAUVcjqcWr5UaDYxpuCZ8fk78r0qlRvWkXgv4RxXjqu6u64E0LdEsNaDr+AtzYfo9KYoSAkI5XNz4jqU3Rf4JWw/F1kCFdKVHvIjvzxr5qSbYM0hnni4aMBepwMdXp3kn1xEUnqrGLKQsqhdCgsAuSjht7tAdWpeLdx5x/ktroJ0PJsA9pBhEmTlfWLAmnEKt3YlM43ItsF405RZmdRLiCvzeke9+MoBXgDchaANrB87ZVAkMFGx6hWMWnBMC8tFFxD5G4NDvXQUYPCEqF+AadboCZRdeym9kMY0InLLvJCP+4l3DdxhGC4ROq+Cz2NGt2kBScgSwUXwXVSB/7eIXP/uLNiiwYJOP02bo8QriiNTdGt2PM0vCsNV19/fXSi/fMyvAqfUtJjdAi4ObOej+qbt/IHZqY0IJlQx0lBtJG/VrWbvyczNPtyvcU0ADAhkzfTHbyvXj8UOtUPYbi0V1R29rgZCW4Olket9RjCdnFOhAKnVF3q+7VxfViopOgGqIo7wJqCzukoAVg1Ve7mZV/hZBSR+ZLg/1LAUqskYwsi2EamtiYmq9EXz9Y6mG2/z/DbMfPVCOoYqIZnMsQzHluEDy8GWlHTiEQzmKj9SqUm96GdEo/oN3p9p2VjDyEKXugyQ9sOikiGP4WyH6clXkCHAGKEPlNHjN7OQiuOVhYTPU4Cexrl1mbRKyRkOdX1pnWNf9AU7wYTEKCB/Qh X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8106ac3-089f-44e7-9bf3-08d93bfa640e X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:08:05.7242 (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: WiDP2Su20IGOIvB3jGelQVbG1N0qiwsrtUF4e0LZCOkD3Yd//kjLCsTyq5vx+v2yNFMsRDIIFbIrXa9SYVkGkIShica9SrApNczeIElXrkA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1758 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-GUID: b1I2W3anUmKcdISeaUnoaDxX1iUVztWI X-Proofpoint-ORIG-GUID: b1I2W3anUmKcdISeaUnoaDxX1iUVztWI 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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 | 129 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/qtest/meson.build | 2 + 2 files changed, 131 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..ce014c1 --- /dev/null +++ b/tests/qtest/erst-test.c @@ -0,0 +1,129 @@ +/* + * 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 "qemu/bitmap.h" +#include "qemu/uuid.h" +#include "hw/acpi/acpi-defs.h" +#include "boot-sector.h" +#include "acpi-utils.h" +#include "libqos/libqtest.h" +#include "qapi/qmp/qdict.h" + +#define RSDP_ADDR_INVALID 0x100000 /* RSDP must be below this address */ + +static uint64_t acpi_find_erst(QTestState *qts) +{ + uint32_t rsdp_offset; + uint8_t rsdp_table[36 /* ACPI 2.0+ RSDP size */]; + uint32_t rsdt_len, table_length; + uint8_t *rsdt, *ent; + uint64_t base = 0; + + /* Wait for guest firmware to finish and start the payload. */ + boot_sector_test(qts); + + /* Tables should be initialized now. */ + rsdp_offset = acpi_find_rsdp_address(qts); + + g_assert_cmphex(rsdp_offset, <, RSDP_ADDR_INVALID); + + acpi_fetch_rsdp_table(qts, rsdp_offset, rsdp_table); + acpi_fetch_table(qts, &rsdt, &rsdt_len, &rsdp_table[16 /* RsdtAddress */], + 4, "RSDT", true); + + ACPI_FOREACH_RSDT_ENTRY(rsdt, rsdt_len, ent, 4 /* Entry size */) { + uint8_t *table_aml; + acpi_fetch_table(qts, &table_aml, &table_length, ent, 4, NULL, true); + if (!memcmp(table_aml + 0 /* Header Signature */, "ERST", 4)) { + /* + * Picking up ERST base address from the Register Region + * specified as part of the first Serialization Instruction + * Action (which is a Begin Write Operation). + */ + memcpy(&base, &table_aml[56], sizeof(base)); + g_free(table_aml); + break; + } + g_free(table_aml); + } + g_free(rsdt); + return base; +} + +static char disk[] = "tests/erst-test-disk-XXXXXX"; + +#define ERST_CMD() \ + "-accel kvm -accel tcg " \ + "-object memory-backend-file," \ + "id=erstnvram,mem-path=tests/acpi-erst-XXXXXX,size=0x10000,share=on " \ + "-device acpi-erst,memdev=erstnvram " \ + "-drive id=hd0,if=none,file=%s,format=raw " \ + "-device ide-hd,drive=hd0 ", disk + +static void erst_get_error_log_address_range(void) +{ + QTestState *qts; + uint64_t log_address_range = 0; + unsigned log_address_length = 0; + unsigned log_address_attr = 0; + + qts = qtest_initf(ERST_CMD()); + + uint64_t base = acpi_find_erst(qts); + g_assert(base != 0); + + /* Issue GET_ERROR_LOG_ADDRESS_RANGE command */ + qtest_writel(qts, base + 0, 0xD); + /* Read GET_ERROR_LOG_ADDRESS_RANGE result */ + log_address_range = qtest_readq(qts, base + 8);\ + + /* Issue GET_ERROR_LOG_ADDRESS_RANGE_LENGTH command */ + qtest_writel(qts, base + 0, 0xE); + /* Read GET_ERROR_LOG_ADDRESS_RANGE_LENGTH result */ + log_address_length = qtest_readq(qts, base + 8);\ + + /* Issue GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES command */ + qtest_writel(qts, base + 0, 0xF); + /* Read GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES result */ + log_address_attr = qtest_readq(qts, base + 8);\ + + /* Check log_address_range is not 0,~0 or base */ + g_assert(log_address_range != base); + g_assert(log_address_range != 0); + g_assert(log_address_range != ~0UL); + + /* Check log_address_length is ERST_RECORD_SIZE */ + g_assert(log_address_length == (8 * 1024)); + + /* Check log_address_attr is 0 */ + g_assert(log_address_attr == 0); + + qtest_quit(qts); +} + +int main(int argc, char **argv) +{ + int ret; + + ret = boot_sector_init(disk); + if (ret) { + return ret; + } + + g_test_init(&argc, &argv, NULL); + + qtest_add_func("/erst/get-error-log-address-range", + erst_get_error_log_address_range); + + ret = g_test_run(); + boot_sector_cleanup(disk); + + return ret; +} diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 0c76738..deae443 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -66,6 +66,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-test'] : []) + \ qtests_pci + \ ['fdc-test', 'ide-test', @@ -237,6 +238,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', 'boot-sector.c', 'acpi-utils.c'), 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], 'migration-test': files('migration-helpers.c'), 'pxe-test': files('boot-sector.c'), From patchwork Wed Jun 30 19:07:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12352749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B792C11F65 for ; Wed, 30 Jun 2021 19:12:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id ACCA761462 for ; Wed, 30 Jun 2021 19:12:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACCA761462 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfdk-0006iK-Nf for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:12:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZI-0007FS-Ga for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:16 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:26106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfZE-0005qN-IB for qemu-devel@nongnu.org; Wed, 30 Jun 2021 15:08:16 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UJ6TBj005967; Wed, 30 Jun 2021 19:08:10 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-2020-01-29; bh=mhNYiOFuVI28aIKqgsbIaBXkfHGJBIZ1UWDAsqZ/WfY=; b=o8kbdtwMwMCu6RTsWxV9Zhp766niTuRZ/vHOqvCLD98JSltFsqxAU7RUhEIk3o/6gwJb esoAXJy2xHyKLwvNjADmknisA2TNgbWnAVMbHpUA9fxk4Stz6C/n2aK618WV4QJSl9oL YgaCVYreE1XH3vOMYND84sBQbuvdZ8+NaJ6PO20xj915ABsoavC6hM+is7iPYWoR6Rna bHc1PDrWUc/UEvFCVnklUeX9a9NewRxvFfPwjg0onb5ag24mp5dtWQ7Po2BYqNbCSvLD BPJJYDOtVvpRxXJJxPn5bzywO0PUDeMkQVIVBqn72qpsDKrzbMHWUCFQgsW/zc/7typm pQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39gb2t26xy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:10 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15UJ0Akh101205; Wed, 30 Jun 2021 19:08:09 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2105.outbound.protection.outlook.com [104.47.58.105]) by aserp3030.oracle.com with ESMTP id 39dt9hqpat-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 19:08:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KRypbo2updzC0gJDmHvLKzATaZHUcBhOaaMpONHxMrRI8rIJZbvklQ0SptbJkD4O656S2T5JGUKRs9/UmcijEtTf/4D1UvSY/MXirBb4owd6xT2rqbCOHlmNQne2KACFxLqAN7tPMnbIJ9rRw7e/ikfdt3DVxxHwKnlLXv9FNv+XXjE+Co5agaNxdVVrcfevMbdkmc6W9bFnENDZ87UzVr10EgLP8xHf/HZlrAeZu+zNvu/qLHxeUYPh7TfGojTHD+W7K3SVHorDApjQFKkV17Wjcha4kH9036kNpDkLryo6fZE4mPurW0Lk9lCCRv30EI/VQeq4odzUSmAx3QZ4+g== 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-SenderADCheck; bh=mhNYiOFuVI28aIKqgsbIaBXkfHGJBIZ1UWDAsqZ/WfY=; b=fKYqrNd3nGIqBqlWFj+TV+ELeFV07RxDD04ajeARNpNOAM27tj220c6cOk4PKgNF2gyVIIZVZIRG+yHRitwFmaHUrx9x/UlvqLXcIpnu9ADN5mER4EFyNPWesadvKpvookqSFgCSRXPqgT6XwUUmcke4q9yK81krIeV1/RKIp56xMxA4g6npGp6t3WyCKo+yJ7osod7vsosoCdFEx63Ro8LjzY61rvDxAcAS8EWQXCc5N9/iv0nrtWkjA8tFkcwb1bj77Inij0HUNuoSVfF6uTmcdmyjvYHgZf2hIUIA1Jgio/NhdoZEyOaTI8TlSV1wm5zrAsNsoVCaT2+LWjZY2Q== 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=mhNYiOFuVI28aIKqgsbIaBXkfHGJBIZ1UWDAsqZ/WfY=; b=IV9eONEa9NxnHP1oVqXBGyC+ef5VKs8SQJv/miOvN1lk0+8ldpwOnOAJl4zTs5QiJx43M4oAhUb/7XoFUADYZprju0t1Oj/6msekxyibw/U0v76tEQLx5G8UemJ+TzE8STmjOngvdsbRiSzPr+gthEsV+L0VK6qlKdAm6FzkSCc= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1758.namprd10.prod.outlook.com (2603:10b6:301:9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 30 Jun 2021 19:08:07 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%7]) with mapi id 15.20.4287.023; Wed, 30 Jun 2021 19:08:07 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v5 10/10] ACPI ERST: step 6 of bios-tables-test.c Date: Wed, 30 Jun 2021 15:07:21 -0400 Message-Id: <1625080041-29010-11-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> References: <1625080041-29010-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by BYAPR01CA0060.prod.exchangelabs.com (2603:10b6:a03:94::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 30 Jun 2021 19:08:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5afefdc-55e5-4c79-6dac-08d93bfa64fd X-MS-TrafficTypeDiagnostic: MWHPR10MB1758: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:854; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hepGNAMpqfCgvpiQAm+Gda3C+uqikRdT+DI3oJrlVOn0zhP5sPz9ueXxt1onnO2KcfKswh76nOxU9duH405dHe1k0uqv+UcIHfOTfk6fTW8dD0YBER432A7BMfEnlOl06JkdPBmSmHvQqJdjKiFYAnLdE74fTYAIJM4sQdTy7Uo58SBqfihp6KJuk/BTnhF45EfCDptpVffM2FdWo++NmEqqXgW5+jHdhKn09+cypeGKwrG9qyYGiIchoN4lht443/2lX4aiCxx1Rwh1zc2C4A3MYiQ5X3wNecGQbE1NZe52tnXLOvD+3QJwPNeOAHw2F/IO+mad2j7VmMIAZVFx7eHVaeHwXpTLTfbnmrZUTwd0O6hzf/t4mqrymo47UebeYYo1KUxEVOcVReUyUP9xHAWQS23trLBMCRGBt1QF1mYhSmLRI/TVj3LLX5EOkgvugFbfD+/81eCfgL73iMTNlCMx5NfUkn13jDu+SSeTZ2+CF99PcVBFGRubsYuf5wXmyzqpluwBvLGNdZekgUz8w9c5M8HUNgew25XVxjCFJDJYoT7FhIYK1ddnOXjzS2nBOuUIf5y/a7UEJkxZB2Fm0riW8x9SIytOCE5uy1D7SmE3FGIeJFETRWIYo5oOzxiwJ5DO9mY1dpmaCBFJNBuAcHXVMT+Lkfil5SKdWiUoqCMOpk4laCwlHPHmLkgafN7bTNTwHUyy6zl0iwPdlwcFbw== 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:(136003)(376002)(346002)(39860400002)(396003)(366004)(6486002)(66556008)(2616005)(6666004)(2906002)(956004)(66476007)(66946007)(4326008)(107886003)(36756003)(316002)(86362001)(38350700002)(38100700002)(5660300002)(8936002)(16526019)(186003)(6916009)(83380400001)(478600001)(52116002)(26005)(8676002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /LJApc08j2+51lDx4/NPu/+PD+vnCTBu8E1YAV6/cDqNvTnoFnBd0nicMAqftRzc1CDOiRCZbztSaVh7SGeGCZ9ocpoI3k6nRXd8rPaMym+aPkb/LKQDTyg+JPVf54NYoUIdHuMiLeGkKsD7xqYZlxX7kGfZsszVlayn74w7xdtZF78SJJBhwfpWzL+yBKxPLcc2+32ut/USKj4NnywZro3lF4MX2VpAzEVvx0z3UF76KzocFMs4Jv1kYOGRZqVaYOVkG8aAg7PgdIleIBtspQV16opREch9WyPZcfymeU8oaGI2DquP1ufdy95ok5elWBY68C0zs+eCoLWwuLN71npQJ3ie8UGEY3zZ76P/gk3zWLQ53SKIQH81cIbiCwZgUFJHNKI/gNt1/Op28Ar3ePawyBsiNYDRXjRATZ9uY56+1vozpxmn1rItcgXLHMI6uvw7nBnYuAm6KmC14mN+FcnuxHQK5F1sDcmpEdvkIPz6eHBk+n5GIEo7T+rkl+/oJrZpN8/2rHsiKU+yRgTVVf7IA/ZKK6wtb3bYfKzAdJkZmxT7F2uDOGSFLauf8uKcwJtXq4aHZRe8UVeMjqgh732yFlwZ0Dcc+iTsWcqlvsYX7EctH1p9sTtGEnnXHa7QqlZ01z7utnJtenR1vtZvWU3lBYaWqAXbhTmK5MI0cn1JqEh0e4UGiov3tbPw8fUxotCfEPPGnPFXNM9o7JwX04tw1lNG1VBbAj6sHpAXatGc8AInkbAFpZjXbOWYHvs4CcQhfDCG1y89V/ZfcuXxovpxBhZOpuCie9Gr5g0fT0KpC6PZuYWD/cyatbrMn/FXH0M5FvtDoJtVwKV5AORgBRxRp29nChYIKpUNUg624ZxqWZwSpU11vdqCVuXEppYGliuDJyJBrmoPyEo7DWP1hy8molnKDlDp4efGGXKmJ+8BLAMOh2k7TacB4m5OvDFAOy37/YHofC1BRP0aic6Q0b5nA9n7X10qDD2mrvvoNVBLURCbxxbUkYl3qC0KWHdsqUBC3DIZzxCo+PUGXEcajXOOGOOSiErLXn0T+pp0mVAjTGOC5WElraewjbwon1/qlTtQRPM4WI0HJ5zOKkDuNTfi7ziLCmzD7+Ja0Z/eSUWBvI4T0jCyvrxtlFWzbwc3yPnhvmSDoPdXsK+nO2/d+655wFwDYVFMYJhhnhWY9dTBgA/l2ozrnRSgH4nzp3DIAZuF/0fIk7Ks1KpyXc10s52uSG6znDXuN3QUesvbmLe/LD/8mKmd3rST0cL/Beoi1W+d89k+7G+gw32OydRQuDarcfZh5oyvqf1YErY/++ZznjXLDDcC9p6VClAxiuxb X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5afefdc-55e5-4c79-6dac-08d93bfa64fd X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 19:08:07.4059 (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: HqL/xavXpVzePWYJL6PQoc5FrVLhcEkZjCl5hpXsmkgzGr4Wtt6aWGuv6xM+9qY9sESRAU0iBDl0M/ncpqz9mTDZxITjACz3mvZIbJiTvs4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1758 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10031 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300106 X-Proofpoint-GUID: sMo9U3gD8iGPipXEYlMLB0z63nlYg1Rd X-Proofpoint-ORIG-GUID: sMo9U3gD8iGPipXEYlMLB0z63nlYg1Rd 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, 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, the re-generated ACPI tables binary blobs. Signed-off-by: Eric DeVolder --- tests/data/acpi/microvm/ERST | Bin 0 -> 976 bytes tests/data/acpi/pc/ERST | Bin 0 -> 976 bytes tests/data/acpi/q35/ERST | Bin 0 -> 976 bytes tests/qtest/bios-tables-test-allowed-diff.h | 4 ---- 4 files changed, 4 deletions(-) diff --git a/tests/data/acpi/microvm/ERST b/tests/data/acpi/microvm/ERST index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..db2adaa8d9b45e295f9976d6bb5a07a813214f52 100644 GIT binary patch literal 976 zcmaKqTMmLS5Jd+l50TdfOjv?(1qNf{pGN#}aW2XoVQ=kJawAMa;r8^<4tlN$k#r!KbMbUbUyg_ zK(;pcerufGzoGM$#7pML|ITms2HKLp#iT7ge?`3d;=pU-HFM;Z{u=Td@?Bo=v9u+> bCEw+h{yXwJ@?BooAHQFxe`xQi@1uMGuJKX< literal 0 HcmV?d00001 diff --git a/tests/data/acpi/pc/ERST b/tests/data/acpi/pc/ERST index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7236018951f9d111d8cacaa93ee07a8dc3294f18 100644 GIT binary patch literal 976 zcmaKqSq_3Q6h#Y^dE9^rOK=GWV&b1h{BUvZ#VzQD#NN_})srw9ZqJfYH@yl5T!0*@ExA}PsmTmxA~y7^f&wF z`=C;Mzb#Jlr!;>?JY$ah@BPi%Ksot29-5NhSucQ c)srw9ZqJfYH@yl5T!0*@ExA}PsmTmxA~y7^f&wF z`=C;Mzb#Jlr!;>?JY$ah@BPi%Ksot29-5NhSucQ c