From patchwork Fri May 28 18:14: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: 12287353 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, 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 AB0C6C2B9F7 for ; Fri, 28 May 2021 18:16:46 +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 E5358600CD for ; Fri, 28 May 2021 18:16:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5358600CD 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]:42516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmh2K-0003jo-PJ for qemu-devel@archiver.kernel.org; Fri, 28 May 2021 14:16:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0H-0001Yv-Bi for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:37 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:63452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0F-0007O8-3S for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:37 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14SIDr0f032286; Fri, 28 May 2021 18:14:31 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=FNVW32VzPFIFi3mxHn2iu6hXQyNhX6HnN6KC7WAQD3nUhE3zMc3InP1hOFoT01LiIRc/ bRGRPX4Rdw72w7j9wactcpC2t5kidoo0ACZBT+sXx+pQ5SFhWC734Sqisn5b6RO1N16W YWtV9Iz4XwocFmp1f9qCE3j/zh8TnxKIhvMZiplFbHz5tog4m/Rp65p/NKFpbmKcIDsg Z4sqsWTcXtnNMxIbOy3DR9x2fdpmu3HHoJe08ZnPmgkfrC1YJtUJbNm8r6Uzxzi9QlTS UJN0HRJ2U5t3+MaDo7VKTyaRIvox5KM6qWuPqObKxPGcoc6DNmRUFhOxJ9jLbz+19lQf kg== Received: from oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 38u54vg08g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:30 +0000 Received: from userp3020.oracle.com (userp3020.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14SIANNV098628; Fri, 28 May 2021 18:14:29 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by userp3020.oracle.com with ESMTP id 38qbqvpqc4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TfUu02SnsEaVKHgRkQ1YWPhEX3ZI8mPge/fKTKqluvSlmuTR030rXz6NgknG/H3EqyM8ZgaCQ4Y74H73uTb9ajcsdU3CRzW0t+Zkf2NrM/3aaP1thywn8aHiWu+s9p7cMYA6YVyn/MJgN16wVpMdQ1l3utzRbG2uyYjPcvRmcT+KBfGpvb8YMP1t2TAqDITibrQySaqrTQE1jreA4GdHhXePRsWqunDr8a1/BPAPKL92v7wBX7ptcIs6HlNgtW1dxyLwsYSYirulGgs96R8PjI8XeySZAlVQdVKT1vLJMBxYGNZz72Ajz30cPEJHD6xie29KBnKfK3WTjmY+uq+ntw== 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=ln7bJUy+TZ/OKhJIHM6YgayYOBM4NxT2O3LGAAE5MCceA2lbM0EuDunzmwDlA1Ubb2eWqFTRByaiaSyQV+Ef9zXHn+UMdnvI2MHSay84SMnWgJL3/c6Sk0UznChWVQ42Yo107zN/3WcADnfs64uVhs4lMbNNtWiBoJmDV+4K9sGn9t3ZnwNgYi5A7UDUb7JeIlOV1kMA3vcKhDDGs0RQWuVPugaTNksgEbSZeupF6xlKjDGsao+UYDExIhMGn1EPNcifo+Xi2VqvmO1Rw9ji82nBrCFJKFjlHvrti07hj2NoTZQpscHW2kkLpq0tFXgChHpVuTLadz55OrSGsOWtZA== 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=kWmzMKqqGH7CpnwAvgVtAH/uq7VeYjzEruXfX+2lIcsJ+VL9iRyFzATx8J76O9/JH7iio6qtdq59DR3GGurYTaPJURzpNQCn4wHig6zyzWPJGwXsZ2PwpVa0Kdu2iUBykFboRKGlzCBESbYK2g4MC+eP9uR+cWxUlOe0Wci2amU= 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 MWHPR10MB2045.namprd10.prod.outlook.com (2603:10b6:300:109::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.26; Fri, 28 May 2021 18:14:27 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%6]) with mapi id 15.20.4173.024; Fri, 28 May 2021 18:14:27 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v3 1/7] ACPI ERST: bios-tables-test.c steps 1 and 2 Date: Fri, 28 May 2021 14:14:13 -0400 Message-Id: <1622225659-16847-2-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> References: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) 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 SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Fri, 28 May 2021 18:14:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44293343-ee0c-44e5-91aa-08d922046e5d X-MS-TrafficTypeDiagnostic: MWHPR10MB2045: 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: tl1IzfQV0P7zue7EH4k6Hu7Ig/psQhQBy6NiMTiPCx+0YkbaB5zlT/f7cQz8jXc84rusLvOFtXQWztsZChUHRLTPc8P+poQ4q9iicf2lI5axCIdQOxR50HI1YPrRGHJl+R9QTiALfyA9DG7jJZAkK0HZOzlTg6KtRnpFS2h0VHOYX7SAOpYFaiRoDIQOC4tCpayvs3F/eQ1X5+jJOno71Xm65P8rD7FIxlZ8UhBnET/lP3hczVpP2vM4eZ37MFlAPuTY58nvuMJ3cA9FlGoerjgV1vE3RSeA/k2tfIvpCaHbcY3X/YwrSGuLZ7nuuCLARBRO4W9vt1enrXW1BLfB9yYQBulucWj8qm6c2hO2Gw8peMSKZ5fWaFJh3atraHqyz9NviE1/J88IHePOQnnH6O5Qkxr7YOLhnbyM1YvlMtI/KWCbXwyR2IWPjO2HusdSDeELHbWZdGYBICdduVL5Wgjv7ANkl4w/Equkj6RiCcLTGZeDMiQZrfJRJYBh6hLvpe1ShIYrrMBP0Ck6EmDvLDZiILA5L7lgpuV4UB9xBXDox84TyGgaZwR5XQkryyCOHYCadQuHfYhVYy5frloiiHudOqkyMQFmcbZLuzuHB8Z/aFFlKKX/clxkz5Rfe7Sa2sAYuldW3ggViZ5z8LBCrd6BzN6mIsq5Fe6ztYzotnc= 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:(346002)(39860400002)(376002)(136003)(366004)(396003)(6916009)(38350700002)(956004)(7696005)(38100700002)(52116002)(36756003)(2616005)(8936002)(66556008)(16526019)(186003)(8676002)(478600001)(26005)(66946007)(66476007)(316002)(4326008)(107886003)(2906002)(86362001)(6666004)(5660300002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: RzxXSSwX79KLGRTj7Kax3nshB13BPAnTk1IY7t54DxpNyKBx2MNaVLIJVgXCwQcthzkp4AroNKmKJXq7GMOnGgGL/UfY9/k9IUcEC6Lpt6HFKCtJze9zXhM9eYCwVwUNZ5wCAA8iFeu311N+H5GuSkVloSwxQVdTRm0BDy1XFbpb+g/oYV5ANP3YOOyljyN9hPuDjsoGcU4NN3pQHCODWRCr82bXi3oEzusMTS6nBiHU3EEnzltA+T7ORRepC2BPdBTtg+dxKRH3GOSI6me7ofu/OPcsggdGofNNcDvgzg1rVSY+UqUHiT62twtPxG1zFGRfTifNO/jzIZfnSbQ32Rf0MJHgPyJUQrxO7jlEKoHczrHVWpjp9EK3kUlO/cvZNrMWVzNqwLyPlIRBPDYR7sLle8fDuYMPXbKS6/orp1/v9ioTcNTLvpExDlaSfPxFh7+6zs5Ha5es9bvNLrpel2NBoHPcoKeKeSqkHnXkAOBKQmhfzRydWEnQuwu1tZalF5WpNrd3fBb2C4amsRuMoXwjqykBpsndcAFGJyu+iuc81rWLUtzJLHP0me/A7qOrw8Ljqo2kmHY/vnMeQiWUSERE2H8e6MHtBMpIIeqBJkwdfNwo2jijofmnuzuczP7VH5Kq8gHP2YY8tJCxiLB8VdLbTeOto/ZevtVg5Bs0XJz6rnqoWzg4dE7hkcjinmf3CJ1tMr3KcKPXSwWRBqDoIp+N9AOmlO3EPoDdgvGRwC7hbENzm1llqwtBkT9vZd5KwVU43nytMikzkOOULG/O5OwsLWi1t1mTQg6lnAxb8PZSZF7SApj4WI2yy1kjodrIWqcLq1FBf6PsIQxEddTO/L43mAH4HHk1rMySYi6P/qxs8a+ghwGy7/fxWz3xHOtDzD7t0GHTA+Vj5prsZ0sk/TTP/Os2AxLj1I9yp+HP9YGnDb2pOSUqkZ4A7fEFRHPjxzwBu6Wi8BFpoTtLncch2gSi500zi0b0MkJH1gvvo98iZr/ysSq8B9tPPsAQvJsZT0MjCa0uxe8yhR/NkEf0UlGYXLuuwSSRlOqxSZ3dHfFFZ4GMqPD6PDxflboZee29R5K1ljYdHLfnCOdnkV8bbuNaI+yk92M+t8ZG2hdVelR7IeEIdcuMsJKyHpz8Zzt0wR31ZWWD8dWp0Umu/mo5xPffg8BZdDy3cz182rn1Ge3KYiP0lZyFSOLVu+DTvP4A9jYK/T+1yJXAQPj4qXbFpM3CgaO6usvvRJ97wklcmfGCn//C1YYco/dK9ndwNwUEmTOso6iy7QmHPxZtuvIYB13E0424ZEcEhDIXjwcrYBSK8SVkWoCyQtlYvm9ZyGIU X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44293343-ee0c-44e5-91aa-08d922046e5d X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2021 18:14:27.8098 (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: a15/+lxV7M2aScBsR5TQtO+1v+UQkXWoVmTXR72s4Gxpy4yqKQK6DnjzsZjRDf1Wma0ep1tpYGyGx5NUfhZzMSUOx4wekCfwJUDou/mlaxE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB2045 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9998 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105280119 X-Proofpoint-ORIG-GUID: AeZ4BC91Y-9my_ZtaSmLSxCEbZ8tT-a_ X-Proofpoint-GUID: AeZ4BC91Y-9my_ZtaSmLSxCEbZ8tT-a_ Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 Fri May 28 18:14: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: 12287369 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,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 3F301C2B9F7 for ; Fri, 28 May 2021 18:20:12 +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 BD010611AE for ; Fri, 28 May 2021 18:20:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD010611AE 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]:49014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmh5e-00084E-Te for qemu-devel@archiver.kernel.org; Fri, 28 May 2021 14:20:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0K-0001cS-L7 for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:40 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:1132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0F-0007PN-7h for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:40 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14SID3AF010515; Fri, 28 May 2021 18:14:33 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=mgrqxsJlLhCY7N8+X72apT3RvNXAQGvwtiwQLkLCEW4=; b=0gQQky/TmWWytTIlaDZeqyUQqlmY0eiUZvC70201NRz7jmmHpXpd1EhgpFey5905QZUd EMRZGf0vyQrybwJBVzXDD13iDlqYu/+AJW2hx7ha4MHvMxILkWapQJyVR1yXrheunuXa eTiTeoGBxeYIdzRkBraf7IQsGaCNw6+UlfNNmg+yrQNpLS8KjRx3mP3sSMVDvegP22fd sPy3sb5zV2Ty1zDLlpCCf6uSlZ6zL/+VI/vr1RGa7rDVk1agROPXQI2QmrRfTACshEhF uFVGVoBZhlaZdEA0LOZFGcqwkANeGyWtHWXhDC0nOwCHtv/o6yXtL9gS6QkVLXG7HVH6 2Q== Received: from oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 38u25vr29u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:32 +0000 Received: from userp3030.oracle.com (userp3030.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14SIEVUS161984; Fri, 28 May 2021 18:14:31 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2172.outbound.protection.outlook.com [104.47.59.172]) by userp3030.oracle.com with ESMTP id 38pq2xqfdv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b5Lv3vH7deUYEg8gSSDQacShm7QbwciC8VLGfVpp0TdF1GsGPYYn+ZjndWwiqcWA8tWJ0gvoq+Ti4s+46XFe1qa2T/w3AoP4QFmvndrawy8JlmGVYgJWvOzS5j2PoGf7q/jYVJ4ygHnyVNxWKJ2fw9tRIV5RuUqMO8HJhHnsqyMPVs/xDmit6KBMBbzxLnM3CEZHForZahtkE5EyErCdqtqyJjz+OUJ68EHyR4kzirlLdJ+O4SwxAMKE8p3ufsvUzr5PIwuNaD19VtcQOsAU9ur+XDekOPIZG/3ih2BQmw52bCMGoeL6vqgCMfUm+us1pcRbzNq0F6/nce+HZSRrhA== 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=mgrqxsJlLhCY7N8+X72apT3RvNXAQGvwtiwQLkLCEW4=; b=Uz3bcZRjJTanMr9NRtVw10Tyrpr6cRtF3topnti/aFln3fJYXc1mDXOTjcUfgJe3d0rl8nfbWF8tEoP0btdNP2iRVYguxabkkM388eUF8efaEd7MlhMmv0kCl1BAeE+vjx12z12qCwpamoBMnSLG89uQNrvypGVWMqplLGxlSN1vudX4/4q2r0PaoS3HUVGKtwPGY9b+E3MRMkesPlj19aqqgfXr5P+X7SppQjmjfflNvOOzOmXqkXJWxjnfIjtCSt0PJYPzMeuYzrKX+fbO896q/w757WgX6Z1erMRqfpj6N4FrifXBVAYvSy1EzDOsxRau3VGWeYpcTYnR+6ct9Q== 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=mgrqxsJlLhCY7N8+X72apT3RvNXAQGvwtiwQLkLCEW4=; b=VIX2FvwxK8sLZv7jO5DchGLdZphUAGNhXR47IE+nEzfnX8wEX/J71Uaq5lJtMboidbgzb43Xh2D9IqHW8QTMETQgVJKyNBp4WP3v7kMFhF8LlDMtZfX9hLUGY4V0VlmznPvxr9oE8P/Am0BXSqL1ap9GjeGVwC37asPywIXx97M= 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 MWHPR10MB2045.namprd10.prod.outlook.com (2603:10b6:300:109::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.26; Fri, 28 May 2021 18:14:29 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%6]) with mapi id 15.20.4173.024; Fri, 28 May 2021 18:14:29 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v3 2/7] ACPI ERST: header file for ERST Date: Fri, 28 May 2021 14:14:14 -0400 Message-Id: <1622225659-16847-3-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> References: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) 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 SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Fri, 28 May 2021 18:14:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c99e46d4-e0f2-42b4-a765-08d922046f55 X-MS-TrafficTypeDiagnostic: MWHPR10MB2045: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RxB0mu9apc373Ao4Ls6jqR232O+UMDPhnDto3q1HFR8HOLYsVYAXKZ3xmBj4K8lWvP0qX9sAb8RxOD7DNrPwu0/3AT/A8zk32tbuunZDV9aEU8tz1V259+j7P3Po8E3jPhhJcY/mEjUH8VmBhqtSSgqwg9TQpYq3H2BiVGZ/6VE6hPNY3OKbCQM4kFhkWAR5Xj3GDm85Zsq5fcXYaK1mWeiptrzoO1eDQuxN50BUDPAsR4FBypKQoTXCAw3wgRMAd1//Mok2mGxPW+162jOWD8uKu+aIXNp/4ZYACEyfej0CJqiM+kHcbuNXOun+Pk/4itDzEFFqcmgf3376pTHc6WW4D1/CTakVQggJHPlX44zrfpbHnWeoQFC1KUlyBG8brZOgtZqWyafP4adnw8Tj4qIlsRjNB+hLFrPcHwwAezmpHraRqASbd2oj4ew8QcZg7U8zAxBJs16TYIyaDIES0tOVBUMjdNHSceeb7ybnRPJszbTKvv+28UM2tp1/CqzAjZZr7wjx0pHPEqxAtSs+rICJfmoqmtnk+2VPXvoX5iwREBARcwjYYlzkDK04/aVcHJu/+GxRq4EXqgESyb+uNbcNJdjC7ZA7bctJpbB/9xDFqIPo4avj4cLLyqQMm7U+61cZGMInMrR+vM6KzwVspqkcg410+fY9R/EYLQF7Wllu96bfs4siYBRZF+SOhoR5TgvdAr3P2JSv/neuyMkrV5/Ycg1uezIl7j4k614ejBbAFGXAMdocjhmz8VgGrHkLuHkJtQBhoq9v3ey2sO/oZ3nz7DA9yCRv+G31uvKIe5E= 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:(346002)(39860400002)(376002)(136003)(366004)(396003)(6916009)(38350700002)(956004)(7696005)(38100700002)(52116002)(36756003)(2616005)(8936002)(66556008)(16526019)(186003)(8676002)(478600001)(26005)(66946007)(66476007)(316002)(4326008)(107886003)(2906002)(86362001)(6666004)(5660300002)(6486002)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: rN3f8wj9KXLtuTscLe3RisOx0VKVhPuOlXlFVq7taAWgrG/qvWdfPt4ySFf6v3eZeYdimGHa3IZHsxw9+31D6T1rw/qCUZKkzJhQvAGGTrSlofStDX/ccrLXVsjId8y7lvfEY/QHAvEOxZvTtxnrmFobakiVURMPP4QziVleg0GwOV3OWXsxVRwUbxeFBVt5VGN5TWtWLFaHmShEJ99aq79X18/XKXwfNrM8QaWfnBbHJ4Ab8qD5aueDtiwLM7axuIJ83woMIG1159AIGF0cIf2aXVJi2rTI2zFcgBERd+kf4SG8kVUA3Pw6Mx6/WnaCz+SSXsdTAQS+5d7Qbi7SM7yQw23Wa2bpwzmi1rLiLWrmZKPZptMvwnXeB+nGRIl+AU8uNZ0LJ9T/B/kkfkto680hrzOe/t8ORWj7QZO/bEl1RPKv0jJ8RGY16TdfjPqu8SG6IYiJPCOcgInU8X64i75njsULuQQbqfmGmw1tSq2NmGRJFysaio6P/++8zG1PX3vUiBWZLjH0pKghBIuOpli7rag2OkU8Df6q37IzpXznofC+Dojux9tOdk3O7x4a3tDUKSjE6OIdY3txt4PhwjchASf2iXZnrHdR0ZLlhhq0f/2tfckh3zjAnjFtVE+tyoz9lOG35OCqutDEtDLDNlXEEne+92eN8K8psBqljrGBggg2JwV3Wb49suo0wXmDWgQUvr2ZfuxGa6/o6E/0sFqg1BvEI/9HoFg8yNhSikXA/oXXGUziDAuBfEA66uYSQ469q81b/giYDyPAsdrq8EnR7w5RQOUIvlgGfCEME7paG3tbOzeu8Mxr1qk4Cd0pl2D0CixLQXFDxL/5Smc571hFAftohcrpQDNq4oR99zzpPmqtdhANrED5ommiadTdkqlL/LAYXG7iLHdtLFwurjtR6mGBRDL0No2W2eetHhEoBv4/v0OJgcodo86GwAEgTg/h0lJMviT65CztQpQ/0g3EQqWEc5scOZB/y9c6R8pj9ELETfShJ8HKWEv4+KpYDVL8hJZZpwB/mK4yAbagNYwJsPWq0HHyp6VVUp1Orf7Wi2vYWbvggDaDLWwiESb78PJ2p1zpD0J/ku3g8oj/k+6TyK9jsdPB7MwU510EUt7h5pMbX+R4USVlM8doYwXf+seKaNta31pXPzoFitJqA4eHtkmkbim+Sc5x+sYbxHh4YqPITCoFygSI0Td4/MJKVqM1y+3nGdTzr3Lb2jPe9n2/EvErgVBxegtq/GghDRCa/499RhR3k9SutOsDHtIuVwyG/iAFJ9wwJThLiOaSlx0z5VlhhTmP2SMrIXCI+0udOzwR7xd4C5qSEUxD2lWM X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c99e46d4-e0f2-42b4-a765-08d922046f55 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2021 18:14:29.4207 (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: pLYiAM+QAqVfUb8j23q0tQmvXPKLM8WlOA/DH8D5un1qMUMlx3axVZXHUL6qlvQjw/gFOKC4Ny2h8CG5dIwbiaLGcsJPRUDnJEuVTVsaSvI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB2045 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9998 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105280119 X-Proofpoint-ORIG-GUID: mVh1YEh6T31zKxW1qpVwkdz8DdnzIMi2 X-Proofpoint-GUID: mVh1YEh6T31zKxW1qpVwkdz8DdnzIMi2 Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 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..8a8ac5c --- /dev/null +++ b/include/hw/acpi/erst.h @@ -0,0 +1,82 @@ +/* + * ACPI Error Record Serialization Table, ERST, Implementation + * + * Copyright (c) 2020 Oracle and/or its affiliates. + * + * See ACPI specification, "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, + const char *oem_id, const char *oem_table_id); +void setup_erst_dev(hwaddr base, Error *error_fatal); + +#define TYPE_ACPI_ERST "acpi-erst" +#define ACPI_ERST_BASE_PROP "base" +#define ACPI_ERST_SIZE_PROP "size" +#define ACPI_ERST_FILE_PROP "file" + +#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 + +#endif + From patchwork Fri May 28 18:14: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: 12287371 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, 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 D19FEC4708D for ; Fri, 28 May 2021 18:20:12 +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 3469E613C9 for ; Fri, 28 May 2021 18:20:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3469E613C9 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]:48984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmh5f-000833-1j for qemu-devel@archiver.kernel.org; Fri, 28 May 2021 14:20:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0L-0001dd-6Y for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:41 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:26068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0G-0007Q2-BR for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:40 -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 14SIEYrp010576; Fri, 28 May 2021 18:14:34 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=81j9b3A1n2bOAoM0IiGPxEofWt0oB4G3AGLbL0AbUfI=; b=aIi+GSPVSvKXPcGvwb/w38UYysPal9s85kYXYPQJbstPy2Iidq9hPMJhlVo7HY2/z31e S8zGEjN8lhGcuV3nzYhEcKtSeGVs8YYMzGOb3l2X3L9QCWvY4iqa+2krGZyhZ4PDN8X+ qZ87Uk7s66n6CbirQByCnkHMypW+N6LYDqQDdIFf82CkrW3ZTp9gS3Ac2mZOrGmylckI ozjR5aKiC0m1ha9P74naxd/fTL8XfHr3CM1XTxV2jrX85odZKHajZzfUWiwBorYDMDeU YSAENibE1nTQGPtUlk2nLcZgYYCK00iZlritqp0snlSLFRpddTHA8SCGkhvfi3jEshgb Sw== Received: from oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 38u1meg2qs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:34 +0000 Received: from aserp3030.oracle.com (aserp3030.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14SIBXbb088913; Fri, 28 May 2021 18:14:33 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by aserp3030.oracle.com with ESMTP id 38pr0es1jt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iQQ95QGCWCSyUkqOKYT8LtigP2SN5Wnf+455WsK8gBdPXzrJS/KYepa0gVov1Jo7cmHX1NAp7Dxr9WVgrj81ihnajviF96zElYSpgMzqbxG6/r92GDK/zgi+fQCsbTb7i78xRC0C1iug5pQ14sA5Ng++TsfdRySwRTUhCUgQw2KgPdBVWLgeypg+dymGWrm4j31DNeAYL57MV8c7NgBACYgOFnS0YP7bXtXbwmUyYE6lwU8c83gOUcAb22e2ViM7kGgXa9xUaOOZyoNrznHPaKMr2JmA+1ELG6ygzEPsd4TDad1kzy0isCOioSXbocSCmzoeCWv2CJ+6fLez4+ylYg== 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=81j9b3A1n2bOAoM0IiGPxEofWt0oB4G3AGLbL0AbUfI=; b=VUWb+ojddRUMenVrnAb2qEF7Y5jVzyTIO+YUgYUH7N6pu0RGorneMaRcFBJNlSTIS7DOPtfp/bhurDwi/R6IwOatcd+jxU/7zr7CtqEX2SJd7OvdZB3UaVYswNGEQdI8+df0nL/JcZu0GpizMJwIBhup2YH0FYe9FCAAKTgk/XiJo4+xOSrFmEZyoZOl6ggR3ThXJ9QUQOf0zA3+KGj4p7l0uh6HPJXKRRMyaGrr3eEuluW0Q8GE083i6Cv8/H7p0VV6ksG9/wxUSk1SXXLSsDVv/UTc9YqwvBYxTV8efcMBB4VVETbmrBAKr+tActadAcw+mwnHmJq6YmScrEv4KA== 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=81j9b3A1n2bOAoM0IiGPxEofWt0oB4G3AGLbL0AbUfI=; b=JGr1tblJiNtt5/ZUtIpbphKfYhXHtCC26c1tUexCX2spP6TX2aoWZCZKiZ4ZBBc66EDy9KYnLf6VZPp51Bnvu+Tnxl6Jl1PT1rUp+899To7/L+QTzIqC8zhWD/YbH8aLzzzutJx5DIp8YrgZCSuRiKWkRdzBWaqFPFyIuvRfKVM= 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 MWHPR10MB2045.namprd10.prod.outlook.com (2603:10b6:300:109::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.26; Fri, 28 May 2021 18:14:31 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%6]) with mapi id 15.20.4173.024; Fri, 28 May 2021 18:14:31 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v3 3/7] ACPI ERST: support for ACPI ERST feature Date: Fri, 28 May 2021 14:14:15 -0400 Message-Id: <1622225659-16847-4-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> References: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) 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 SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Fri, 28 May 2021 18:14:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ea56eae4-079f-48cf-edd3-08d922047050 X-MS-TrafficTypeDiagnostic: MWHPR10MB2045: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Noyxf46Yk03vjg512eM5zVZtXuhU8s9vpwm2+gpBscd2xtZJUrX6PooDGMsmySBI6XAsxEFmp1P6EnjwtNo86crMwEye+n8/G3daoIQFWwPKM6t8e2vxyxH7BW5DeLZ7u+nTghZojlxyR25TR7DXF4dUbwIQZAJHADbBxKbOSNYruy8mZ8Tmi0u0YeBpbcOJCmquxq40IB7V4ctv5MY667Cnd/3JrmumwpeNzr1fuiXHZ2U79n1KOxgbm6PfEzT7RoKDCIo2N2YdkTe9V+R6rFHn6U1ZQVuuNEzxlh1PyBlVg8qhSXcaLji8nYeHwwNoym2qe9L2WnT43PH3ERHx7bqFNTe+wUFlqmuVqeJiskDDIcZYkG4FFAXibqH9+sgRtdktJtEofrVbwEz230NTdxUgsZ1LliwlpvzbTV6+cRXtEQppEozZW0WtTqMD5BBJhnfb3dMKGtOIwYDNFQnhcPGgKULHUQp20oVeVUp6kB8/FGTbF93cNXg32BQZDYGbhPIm89idTTboyBrhR7dmWQfnWwkscnJCxszuZ2zkZVLVk7UYGnyB+Xn6nPAx7PuNGUuZFHSG00p93VD1aG1LswEzdYVgaPSC9TmNE52BgfOeZdUIw+aMbDncTE/9Fo/EYa7sqHeN7rC10X2TcLPiOXi+Hlm7BzkIKJY4w7URm2QVwh7UcsJQvHTjBw6x7ZzpRMcsa9577OPJGl7eTVViBIrH+jRiTJZGER34tNybTtynve4W5BmCLupUqVCkUo9xB1E4DQIXx4mQH3DLn8QDVunWbfJ92e0i/vSODsuHJG4= 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:(346002)(39860400002)(376002)(136003)(366004)(396003)(6916009)(38350700002)(956004)(7696005)(38100700002)(52116002)(36756003)(2616005)(8936002)(30864003)(66556008)(16526019)(186003)(8676002)(478600001)(26005)(66946007)(66476007)(316002)(4326008)(107886003)(2906002)(86362001)(6666004)(966005)(5660300002)(83380400001)(6486002)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: azoDYgeZ61LcatZHBctyA6qZ2sP3pHA4gGcZl1UYsCWlpP/V9jO8UMocIYy2ORHYoi8u5eDKO59reZx86EtezKadFmjqSKypYvWQltmz6oMAJKDuqb+GH+DlsOT7iuJrhc0yl07wA06xXf4/mc0uZEui0gOGwftaepFFMdndwaCvQlj3dGHXCctopkroDCezdtDJvz0LmqctJ+vdiwH/i+DjR4c2zbw3wo93qcLoc1SJFBZiFmIms8jd+7/pSsPRvUuVqB5TDjyfj7cUs0q2fcqLCr5pzaRAhuHhJrIxp/A40f+yFt3ztQbKsrUwRAFUVw8xM2cZidWAIdM2RIjGzEnjsb2Ct7lZ53+KMBId4b6wDjv0+TlJLcyEnjddfgCNVXfQHjofBAYH2nl4TBkCiYI97X2lcnCjP0v1+rjTNpWOAlvqgZ8U3ySng7wTv4BtYxAruJTnIE4DebhVZsltNNlYR2mF6ZRyVMy1ywrM+nZ7Uc4jCBLrboYw8QFxdiSvWE0l5buiKNzWjjFFqKTutFYZAi2rLGsdxV9T0AfFRChejpZeK7jlzPGI61TWJTQMOAuo+kYzH4oESKqs7l67LWDsAfM2NxG9oW7PAKzQSjcmUliEIeL/yJ9JNcbbGrYl3dTGcVSDCnR0gRDQiiMjb87NCCR8XP7aTP+Kn+7WAUSMk25cV7eqZb+vkEmXvFBoLVWGDvtWUcZHZu34hLyS3tBPfF1kOuTZuin99ypwyH0OGAb0vAurI3mACbMRkg7jktTQqZeUzs3uhpmI9ey1neQi7EdQRouZOwDoNGNA/o5mbn7ONLF7/8mYM08DQT29jmt1vkxxVVlijU/NIqFc3ICBLY/D8jxM9dzuJGKHm2PREzWnPx0E7z8y3eHv3MPAymWuzByyw2Ihuzk2JjBlDYnMH+58ykqHZHJWZpslbv9CSq3goxd5gh2lis4wIxyz9Ek3deVZtKtEYvm2sT6aTwodmWt6+OkMOfZcQEeeoVH6vqfi+dN4CVuN0cSCz8AJxbOlQ1o7sTv+9aLaFd9Bvfce2URgSDq4St+q5gq3VeCOGVDgiL8LpNfjZ9LoRIeTW/rki62BFFnwKDNuSbCPky93AKSS0cHEE+MSxnQQt7Nfgx94Oo+coHlkQOQjPYUlT6EtTwpehaz9Nx9r2cc8JYLdGjq9v+UMqrH0V/eunAeeagMHQugfgMKGq5BU86kazd7rMTogGOujmoTzlUsAbtprpXjRBoLq1+wNYxibeZHz5b4Eb2wv7kSgGPjdZwYzj2c79QFSXqUcu1cs3TvS6urUpDh1kfOpSYrMYRa/itQw+bTSrOc1SecbP5/FgL6d X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea56eae4-079f-48cf-edd3-08d922047050 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2021 18:14:31.0555 (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: 2xA5mzXqRM5djKVyBjAnPQ7rgi/Eudihuiw9/uzVUbYKIp8N/fd5HpCSlg0MwCzllDRovvX60ptmRTKkoguXARoScvaByv3aWUT7Vv2Hovk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB2045 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9998 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105280119 X-Proofpoint-GUID: LNPq5pId2HYPISudr_gK41ChM9GQvZ4C X-Proofpoint-ORIG-GUID: LNPq5pId2HYPISudr_gK41ChM9GQvZ4C 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, 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[1,2]. The size of the ACPI ERST storage is declared via the QEMU global parameter acpi-erst.size. The size can range from 64KiB to to 64MiB. The default is 64KiB. The location of the ACPI ERST storage backing file is declared via the QEMU global parameter acpi-erst.file. The default is acpi-erst.backing. [1] "Advanced Configuration and Power Interface Specification", version 6.2, May 2017. https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf [2] "Unified Extensible Firmware Interface Specification", version 2.8, March 2019. https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf Signed-off-by: Eric DeVolder --- hw/acpi/erst.c | 902 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 902 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..645a904 --- /dev/null +++ b/hw/acpi/erst.c @@ -0,0 +1,902 @@ +/* + * ACPI Error Record Serialization Table, ERST, Implementation + * + * Copyright (c) 2021 Oracle and/or its affiliates. + * + * See ACPI specification, + * "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/sysbus.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" + +#ifdef _ERST_DEBUG +#define erst_debug(fmt, ...) \ + do { fprintf(stderr, fmt, ## __VA_ARGS__); fflush(stderr); } while (0) +#else +#define erst_debug(fmt, ...) do { } while (0) +#endif + +/* See UEFI spec, Appendix N Common Platform Error Record */ +/* UEFI CPER allows for an OSPM book keeping area in the record */ +#define UEFI_CPER_RECORD_MIN_SIZE 128U +#define UEFI_CPER_SIZE_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])) + +#define ERST_INVALID_RECORD_ID (~0UL) +#define ERST_EXECUTE_OPERATION_MAGIC 0x9CUL +#define ERST_CSR_ACTION (0UL << 3) /* action (cmd) */ +#define ERST_CSR_VALUE (1UL << 3) /* argument/value (data) */ + +/* + * As ERST_IOMEM_SIZE is used to map the ERST into the guest, + * it should/must be an integer multiple of PAGE_SIZE. + * NOTE that any change to this value will make any pre- + * existing backing files, not of the same ERST_IOMEM_SIZE, + * unusable to the guest. + */ +#define ERST_IOMEM_SIZE (2UL * 4096) + +/* + * This implementation is an ACTION (cmd) and VALUE (data) + * interface consisting of just two 64-bit registers. + */ +#define ERST_REG_LEN (2UL * sizeof(uint64_t)) + +/* + * The space not utilized by the register interface is the + * buffer for exchanging ERST record contents. + */ +#define ERST_RECORD_SIZE (ERST_IOMEM_SIZE - ERST_REG_LEN) + +/* + * Mode to be used for backing file + */ +#define ACPIERST(obj) \ + OBJECT_CHECK(ERSTDeviceState, (obj), TYPE_ACPI_ERST) +#define ACPIERST_CLASS(oc) \ + OBJECT_CLASS_CHECK(ERSTDeviceStateClass, (oc), TYPE_ACPI_ERST) +#define ACPIERST_GET_CLASS(obj) \ + OBJECT_GET_CLASS(ERSTDeviceStateClass, (obj), TYPE_ACPI_ERST) + +typedef struct { + SysBusDevice parent_obj; + Object *hostmem_obj; + HostMemoryBackend *hostmem; + + MemoryRegion iomem; + uint32_t prop_size; + hwaddr prop_base; + char *prop_path; + + 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) { + MemoryRegion *mr; + mr = host_memory_backend_get_memory(s->hostmem); + if (mr) { + uint8_t *p = (uint8_t *)memory_region_get_ram_ptr(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) { + MemoryRegion *mr; + mr = host_memory_backend_get_memory(s->hostmem); + if (mr) { + uint8_t *p = (uint8_t *)memory_region_get_ram_ptr(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_write(void *opaque, hwaddr addr, + uint64_t val, unsigned size) +{ + ERSTDeviceState *s = (ERSTDeviceState *)opaque; + + if (addr < ERST_REG_LEN) { + /* + * NOTE: All actions/operations/side effects happen on the WRITE, + * by design. The READs simply return the reg_value contents. + */ + erst_debug("ERST write %016lx: val %016lx sz %u\n", addr, val, size); + /* The REGISTER region */ + 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->prop_base + ERST_REG_LEN; + 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 = 0; /* correct/intended value */ + 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: + /* + * NOP + */ + break; + } + break; + default: + /* + * All other register writes are NO-OPs + */ + break; + } + } else { + /* The RECORD region */ + unsigned offset = addr - ERST_REG_LEN; + uint8_t *ptr = &s->record[offset]; + 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_read(void *opaque, hwaddr addr, + unsigned size) +{ + ERSTDeviceState *s = (ERSTDeviceState *)opaque; + uint64_t val = 0; + + if (addr < ERST_REG_LEN) { + 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; + } + } else { + /* + * The RECORD region + */ + uint8_t *ptr = &s->record[addr - ERST_REG_LEN]; + 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; + } + } + erst_debug("ERST read %016lx: val %016lx sz %u\n", addr, val, size); + return val; +} + +static size_t build_erst_action(GArray *table_data, + uint8_t serialization_action, + uint8_t instruction, + uint8_t flags, + uint8_t width, + uint64_t address, + uint64_t value, + uint64_t mask) +{ + /* See ACPI spec, Error Serialization */ + uint8_t access_width = 0; + build_append_int_noprefix(table_data, serialization_action, 1); + build_append_int_noprefix(table_data, instruction , 1); + build_append_int_noprefix(table_data, flags , 1); + build_append_int_noprefix(table_data, 0 , 1); + /* GAS space_id */ + build_append_int_noprefix(table_data, AML_SYSTEM_MEMORY , 1); + /* GAS bit_width */ + build_append_int_noprefix(table_data, width , 1); + /* GAS bit_offset */ + build_append_int_noprefix(table_data, 0 , 1); + /* GAS access_width */ + switch (width) { + case 8: + access_width = 1; + break; + case 16: + access_width = 2; + break; + case 32: + access_width = 3; + break; + case 64: + access_width = 4; + break; + default: + access_width = 0; + break; + } + build_append_int_noprefix(table_data, access_width , 1); + /* GAS address */ + build_append_int_noprefix(table_data, address, 8); + /* value */ + build_append_int_noprefix(table_data, value , 8); + /* mask */ + build_append_int_noprefix(table_data, mask , 8); + + return 1; +} + +static const MemoryRegionOps erst_rw_ops = { + .read = erst_read, + .write = erst_write, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +void build_erst(GArray *table_data, BIOSLinker *linker, + const char *oem_id, const char *oem_table_id) +{ + unsigned action, insns = 0; + unsigned erst_start = table_data->len; + unsigned iec_offset = 0; + Object *obj; + hwaddr base = 0x0UL; + + obj = object_resolve_path_type("", TYPE_ACPI_ERST, NULL); + if (obj) { + base = ACPIERST(obj)->prop_base; + } + + /* See ACPI spec, Error Serialization */ + 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); + iec_offset = table_data->len; + /* instruction_entry_count (placeholder) */ + build_append_int_noprefix(table_data, 0, 4); + +#define BEA(I, F, W, ADDR, VAL, MASK) \ + build_erst_action(table_data, action, \ + ACPI_ERST_INST_##I, F, W, base + ADDR, VAL, MASK) +#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: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_BEGIN_READ_OPERATION: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_BEGIN_CLEAR_OPERATION: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_END_OPERATION: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_SET_RECORD_OFFSET: + insns += BEA(WRITE_REGISTER , 0, 32, + ERST_CSR_VALUE , 0, MASK32); + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_EXECUTE_OPERATION: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_VALUE , ERST_EXECUTE_OPERATION_MAGIC, MASK8); + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_CHECK_BUSY_STATUS: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns += BEA(READ_REGISTER_VALUE , 0, 32, + ERST_CSR_VALUE, 0x01, MASK8); + break; + case ACPI_ERST_ACTION_GET_COMMAND_STATUS: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns += BEA(READ_REGISTER , 0, 32, + ERST_CSR_VALUE, 0, MASK8); + break; + case ACPI_ERST_ACTION_GET_RECORD_IDENTIFIER: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns += BEA(READ_REGISTER , 0, 64, + ERST_CSR_VALUE, 0, MASK64); + break; + case ACPI_ERST_ACTION_SET_RECORD_IDENTIFIER: + insns += BEA(WRITE_REGISTER , 0, 64, + ERST_CSR_VALUE , 0, MASK64); + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_GET_RECORD_COUNT: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns += BEA(READ_REGISTER , 0, 32, + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_BEGIN_DUMMY_WRITE_OPERATION: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_RESERVED: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns += BEA(READ_REGISTER , 0, 64, + ERST_CSR_VALUE, 0, MASK64); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_LENGTH: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns += BEA(READ_REGISTER , 0, 64, + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns += BEA(READ_REGISTER , 0, 32, + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_GET_EXECUTE_OPERATION_TIMINGS: + insns += BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns += BEA(READ_REGISTER , 0, 64, + ERST_CSR_VALUE, 0, MASK64); + default: + insns += BEA(NOOP, 0, 0, 0, action, 0); + break; + } + } + + /* acpi_data_push() within BEA() can result in new GArray pointer */ + *(uint32_t *)(table_data->data + iec_offset) = cpu_to_le32(insns); + + build_header(linker, table_data, + (void *)(table_data->data + erst_start), + "ERST", table_data->len - erst_start, + 1, oem_id, oem_table_id); +} + +/*******************************************************************/ +/*******************************************************************/ +static int erst_post_load(void *opaque, int version_id) +{ + /*ERSTDeviceState *s = opaque;*/ + erst_debug("+erst_post_load(%d)\n", version_id); + /* Ensure nvram persists into backing file */ + erst_debug("-erst_post_load()\n"); + return 0; +} + +static const VMStateDescription erst_vmstate = { + .name = "acpi-erst", + .version_id = 1, + .minimum_version_id = 1, + .post_load = erst_post_load, + .fields = (VMStateField[]) { + VMSTATE_UINT8(operation, ERSTDeviceState), + VMSTATE_UINT8(busy_status, ERSTDeviceState), + VMSTATE_UINT8(command_status, ERSTDeviceState), + VMSTATE_UINT32(record_offset, ERSTDeviceState), + VMSTATE_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(DeviceState *dev, Error **errp) +{ + SysBusDevice *d = SYS_BUS_DEVICE(dev); + ERSTDeviceState *s = ACPIERST(dev); + unsigned index = 0; + + erst_debug("+erst_realizefn()\n"); + + if (!(s->prop_size > ERST_RECORD_SIZE) && + (s->prop_size <= 0x04000000)) { + error_setg(errp, "'size' property %d is not set properly", + s->prop_size); + return; + } + + if (!s->prop_path) { + s->prop_path = (char *)(TYPE_ACPI_ERST ".backing"); + } + + s->hostmem = NULL; + s->hostmem_obj = object_new(TYPE_MEMORY_BACKEND_FILE); + object_property_set_str(s->hostmem_obj, "mem-path", s->prop_path, &error_fatal); + object_property_set_bool(s->hostmem_obj, "share", true, &error_fatal); + + /* MemoryBackend upsizes to a PAGE_SIZE multiple for prop_size */ + object_property_set_int(s->hostmem_obj, "size", s->prop_size, &error_fatal); + user_creatable_complete(USER_CREATABLE(s->hostmem_obj), &error_fatal); + s->hostmem = MEMORY_BACKEND(s->hostmem_obj); + + /* 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. + */ + 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); + + erst_debug(ACPI_ERST_BASE_PROP" %016llx\n", (unsigned long long)s->prop_base); + erst_debug(ACPI_ERST_SIZE_PROP" %x\n", s->prop_size); + erst_debug(ACPI_ERST_FILE_PROP" %s\n", s->prop_path); + + memory_region_init_io(&s->iomem, OBJECT(s), &erst_rw_ops, s, + TYPE_ACPI_ERST, ERST_IOMEM_SIZE); + sysbus_init_mmio(d, &s->iomem); + erst_debug("-erst_realizefn()\n"); +} + +static void erst_unrealizefn(DeviceState *dev) +{ + ERSTDeviceState *s = ACPIERST(dev); + + erst_debug("+erst_unrealizefn()\n"); + + if (s->hostmem_obj) { + object_unref(s->hostmem_obj); + } + + erst_debug("-erst_unrealizefn()\n"); +} + +static void erst_reset(DeviceState *dev) +{ + ERSTDeviceState *s = ACPIERST(dev); + + erst_debug("+erst_reset(%p) %d\n", s, 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 */ + erst_debug("-erst_reset()\n"); +} + +void setup_erst_dev(hwaddr base, Error *error_fatal) +{ + SysBusDevice *s; + DeviceState *dev; + ERSTDeviceState *e; + + dev = qdev_try_new(TYPE_ACPI_ERST); + if (!dev) { + error_report("couldn't create ERST device"); + exit(1); + } + e = ACPIERST(dev); + e->prop_base = base; + s = SYS_BUS_DEVICE(dev); + sysbus_realize_and_unref(s, &error_fatal); + sysbus_mmio_map(s, 0, base); +} + +static Property erst_properties[] = { + DEFINE_PROP_UINT32(ACPI_ERST_SIZE_PROP, ERSTDeviceState, prop_size, 0x00010000), + DEFINE_PROP_STRING(ACPI_ERST_FILE_PROP, ERSTDeviceState, prop_path), + DEFINE_PROP_END_OF_LIST(), +}; + +static void erst_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + + erst_debug("+erst_class_init()\n"); + dc->realize = erst_realizefn; + dc->unrealize = erst_unrealizefn; + dc->reset = erst_reset; + dc->vmsd = &erst_vmstate; + device_class_set_props(dc, erst_properties); + dc->desc = "ACPI Error Record Serialization Table (ERST) device"; + set_bit(DEVICE_CATEGORY_MISC, dc->categories); + erst_debug("-erst_class_init()\n"); +} + +static const TypeInfo erst_type_info = { + .name = TYPE_ACPI_ERST, + .parent = TYPE_SYS_BUS_DEVICE, + .class_init = erst_class_init, + .instance_size = sizeof(ERSTDeviceState), +}; + +static void erst_register_types(void) +{ + type_register_static(&erst_type_info); +} + +type_init(erst_register_types) From patchwork Fri May 28 18:14: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: 12287357 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, 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 753B1C4708D for ; Fri, 28 May 2021 18:16:48 +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 F3F87600CD for ; Fri, 28 May 2021 18:16:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3F87600CD 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]:42640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmh2M-0003oM-Ut for qemu-devel@archiver.kernel.org; Fri, 28 May 2021 14:16:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0J-0001aF-Lo for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:39 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:26440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0G-0007Q4-BK for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:39 -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 14SIBqcI012061; Fri, 28 May 2021 18:14:35 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=RZO/PQxJgaUO9HSdzCzvHTYWpsr3sip6Xep6/9JYHek=; b=wRbFaq0RA3pCzYcWSinqrDgCbBilaMers7sMddrEeeZLYx116oRVX7L6wNAKriF93pbg xn3dG201x0NRjGaOrZe3ybriU6hgPDhSfE3B4y1S2NhrdfY2dY743X04Mvya4djXrqmh Z82msMA30CFLoIBYVS9Z6lUtJ/CYTyU5ajwfXrMYRu8a/23o9cFVo7l8+FR47NWG6Wbg ugo/llv0JyTH/QAEAOh3R6OeMNKf3ai36CMXdUyrdNRMJAZ8dJB2MyKiEvjvy0TnbyNL oUS1cC4WSdt+HdMigexJd2BD6TG0B8fb6SidFG3H4qfZIKyQABMa6kBJTO0QPm27xFxy 9Q== Received: from oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 38u31br1qx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:35 +0000 Received: from aserp3030.oracle.com (aserp3030.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14SIBXbc088913; Fri, 28 May 2021 18:14:34 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by aserp3030.oracle.com with ESMTP id 38pr0es1jt-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O43vUGkzGcnqXZ1J+Sq2bnRUhidT+FwcBp1XJmy0W2PFklvmIRUVbtiNcRQ0XH51J6N+fwtcFGMpfbjQLyHgqsFCQSi2STNvBAsUXogJ18MS8IqttWZTnDuzwKO4mmm02gnFWT/4SA5CLiqExh6M+XdqHex0k90XSewvbzPVcuLpIdfBb466io/T4LIJTVP/CWANqTKCLkbHdWSye1v+UMa+PBEy1znX7rSw3LY/2P1UWJPnwxR8hHNdyfeb5OWK6BHMd/lQpAOKzoaWoXuVcBFVN15YxA+jmhBscJhTNiEEyE2rrlybVEivu6p7NZN07jG/pdnAf8dpWpsswQmFIg== 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=RZO/PQxJgaUO9HSdzCzvHTYWpsr3sip6Xep6/9JYHek=; b=gcu6M/Dr5sUmP1Za8aCFV+o+KtuFxMZx0BHvyApwbusN7Gz25AR7n2F6Ur9lwWIpzE9rn6a6a6xMKY0dF1+2XhhcG3R37qpnXB9CR+W6IaQiVkhS4YKhxprsjVvMJQ4ZS4Fd1SZMGXxMBy+k/UPCgx7PQ+8aMF91WEDAZ3yqy6g2RG1Lo2cgio0XS9OefaLvGJjokgkFSFEyY72+Pj18W/5UQIGVKmdHUq8X8zuILvO8VabjVnH8Tcz70O/CjlJXCCkXxqUt22KaTJIuqn1tIq5AjhrZCJ7bVLYdGG3LPa9joB2uCeLKIqtAkRJ2BDk/eWTF1Nngi8DU7t7FoUK1BA== 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=RZO/PQxJgaUO9HSdzCzvHTYWpsr3sip6Xep6/9JYHek=; b=RiLwezZkc4YIm73lkNkQBR2gKTfzUa3e9SR1xQB3JGYfwGABzprnc7O6vAUoJGA8umoTWIvEDGwg7h+hhLOOldyfsuh+Z0Kf8F3Bi5gRKuRfty0kG4redYvCLx6/5QsJWIRFCIowYBrBW/ERDOk6g1zcwWGB487J41CnIAdOTvc= 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 MWHPR10MB2045.namprd10.prod.outlook.com (2603:10b6:300:109::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.26; Fri, 28 May 2021 18:14:33 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%6]) with mapi id 15.20.4173.024; Fri, 28 May 2021 18:14:33 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v3 4/7] ACPI ERST: include ERST feature in build of ACPI support Date: Fri, 28 May 2021 14:14:16 -0400 Message-Id: <1622225659-16847-5-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> References: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) 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 SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Fri, 28 May 2021 18:14:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 77818cc3-7508-4b60-bde4-08d922047176 X-MS-TrafficTypeDiagnostic: MWHPR10MB2045: 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: J3XIJMcycJYTxPqVbDpJEBhCcnR4OyS8KaChyTuAvL5qjCktWfCxDnIo1blwHoD7tMLxItYuvXOAUAXGZYguJaNlZS4rvmiUnzPvuJtydMzjc3WaW+hWRynWoeeRIufQqQQwoqEGEtHe9E0QR1WIjVraBfsyKLJWSg0baW2qmN7nJPkkjkee/W1QVPyuHDIEES2C++5c2BFF6Kr5PzucxdVxIwSPQO3FuX20tSNL0KWbCRueETLskqwM0ypPGCR57PfpwoxGbO+knTr4RaUC03KGHK3XgBdaAG2RqilVgEVIyZLA9bT2PxClIO6h+JOmsepEdQba73CVL9Wq/oCTyEU6LrcDwxEwIhgkD7M4dOKql7TWSncaymCEToGCYo/Xlrg8HPM3P3pLHa47KZbzde0CuXdHgbQw1pC4azHogmAnpeyb2rBhwhSuv82iliY54JB82NKgxNgF45P+t0r7qDHZJCQyARBnDh/O93/pQb65yYilGry7lV2Zf2KoXlPn7iRrOT2m8t8V9sf7FjvWeaXRFnf3Q4mFh/wh7tO3oBW9SOtql0CBw+Vjjof7Z1mSDvlM2iMwmtVjwd4o3fPxf6vBhj3JSo6lCUidimGllCY1CHn6h5qJ2/VqlJBxQBUbh9LoNbvnSody91eY1SaFRA== 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:(346002)(39860400002)(376002)(136003)(366004)(396003)(4744005)(6916009)(38350700002)(956004)(7696005)(38100700002)(52116002)(36756003)(2616005)(8936002)(66556008)(16526019)(186003)(8676002)(478600001)(26005)(66946007)(66476007)(316002)(4326008)(107886003)(2906002)(86362001)(6666004)(5660300002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: U1RPqcpHEpEETOBYnRziaD/YGHzEyOXZsHbpL44aJLRU3w7fepq2PvNKUfF3EFn66wlqYSI95bDVFdGwCKmhy+eaoxbTvmhC2AsckpFgPgNI8DPKbyVgKMJjV6o4WpErLHs9d5vp7JYwqk1bjrogGWAqfI9Df4Zm2+YlgBmMS5OSsATe1Ik7AvPAolURFTwb5Z276M+n1Ryi0QFp/TLwJgGSxg7Je5O8jT1aLsb1uWJZCASG0dthvRLtgLNE/h7VE51GsTihIytkV9J1FxfblRK6KMhZw0s3AGdUJHIxgSjmKAxYSKr4E06pHWG3WDRY4ajCwFkk4ZWhzLIC7ykfNgt14bHMedi59r/vgaeE9TqUwu6IymnAImvEAenzSQrh93sZfMtgIBy+KmJ9e0rwSXPOC0pwDOOxUNV3qdxTA5LP4d/GGJ7dF5aK6FvenyBtyskJ4bzkg9ktWWYTlW5ab2fvaQur8ww2laqsBSRKTaA3N8zTAy3Fb6f8FFIgkW/KCL7T+pAMdBtBBkLUUJwVzPHVA8PbYabvDIE2xPlhwyXWBBtVbwcMOV+um0+qPHRo1oaOwn4bQILcw0nLEGTQ/g07TIo0g9RpOuTCRB8hSRmpIMyxn9bE0ahh2QOFKsHU8OLvO4kh780iZhGdyI9WXD8dLeuE9uTOaVLTyNT2uGm8uU+9rGRJQGoORwWoWI38CMwfy36JmcZnmeNOt5Vsf7a7b09s9oRRWIz+6qGfumjvaTdUFC3eJ1VVww6QvlxZf2/EIhOzX6JH1gRJgQcnePfiWyFaH2L2H9C4sph6qU2m35P9j0F40d4Ym2e7/KYPyebQ6NvFFFqY38rthx3DHj2kiZU5Rp+fqTV/VgS/mkotwoVugoyTgLEpe1dk/yZe2V0/PX38Ki86VRkxmzhuxJPM9qOpA5IlUd6cA7EfJXgIg620KwRNSybWfP7S39w2VwwDzg392BQHtdmgdvUuvFOQq/xQWAX7Ts13LGapDeeNMLT1ikVJIROmiSSF/IQHJmadCXsJmklaA8OKTmX6dTL3271TN+4u7wTsCh9Zp0zcfHI+gZzzKIR//AATGNxxdBWRlAcpKBA0KJ91Xhh+2WbXZB4+4SFCv3wE2re34RZT8ohsXM1s64sLL9MvAiaqHnSMqHGdT+eUIxcy7pkdDFOehke3ykp6k7qsYR313uRzIoahJ/5oqLHT+PtNE9qRLosk9FH00w60S10HWwGvC0Rupef9KvHobCPqibtzaRKqy8af+9qft1Gv4IdiF8zLwrOlsYSoynn3WMpjghlwMJzXDzanQ7ZsFNGurWpFxvbckIpNyaPz1eC5URwuWC0h X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77818cc3-7508-4b60-bde4-08d922047176 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2021 18:14:33.1244 (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: a/XRzRtIt4IKsFHbLO2fJsLtq5aAAoT6OyYDqsDaAK4se/Ibvk2D8vDz0MgZHDgR5krn+72rskDdH5DqjXPg4t2a0uav5Q5JxMXfBEEf3oM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB2045 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9998 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105280119 X-Proofpoint-ORIG-GUID: VvJb55Uo2PrnouVq-lZFFpuayIzvyYmj X-Proofpoint-GUID: VvJb55Uo2PrnouVq-lZFFpuayIzvyYmj 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, 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 includes ERST in the build of ACPI. Signed-off-by: Eric DeVolder --- hw/acpi/meson.build | 1 + 1 file changed, 1 insertion(+) 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 Fri May 28 18:14: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: 12287367 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, 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 42136C47087 for ; Fri, 28 May 2021 18:20:12 +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 B703C613B5 for ; Fri, 28 May 2021 18:20:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B703C613B5 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]:49032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmh5e-00084X-R1 for qemu-devel@archiver.kernel.org; Fri, 28 May 2021 14:20:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0M-0001hM-BJ for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:42 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:7724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0K-0007Rn-2s for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:42 -0400 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14SIBKst004566; Fri, 28 May 2021 18:14:38 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=26hTaa0gH5tsCYr5qXkEVW6QJMWxaCzU6+lIpfh8GkY=; b=mYiwhYiXEE9RWAkcg1wVlCJcjPCXaJ0Ea2wq5Bkd8vLpG4lJA1GF6423ftXc2EfZUS7c SwS8DpKnZzXsgqgEZUvpBNZinqJx9WxjIlzGMvkpvHRHyt0uo6IhLkDFfe158ZNuCiSX u5SIhlkehdgVWjBMA7XO+ijkBh0WpIzUt4tlJ/sPu5760YzBXdeWzhq+OSdcmgVga98h m8ToU+GyCOC0cZMpOa0PPR5v8a3lyQLbqHC6Ha9nw/jEFROp1X5nZxIU66hZnI0+QlYD LSqpVIC1c9OU/K4qlQT5AVKUnVUkt4wtd0qttEVKk9cX39CDij2/J85IlIS2JmupC0SL +w== Received: from oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 38u4mhr0hj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:38 +0000 Received: from aserp3020.oracle.com (aserp3020.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14SIBPjJ129598; Fri, 28 May 2021 18:14:37 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2174.outbound.protection.outlook.com [104.47.59.174]) by aserp3020.oracle.com with ESMTP id 38rehmnb9c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g8EFgaptKy7daSPMBVzzN8OBF/5guE0soi4zYzZ10IsIJU3opCedomP2nG0GGi8jZdD05eyi9HWCuHGSAAjqFL+fKJ0pFU1lB2BqchVtaCl5bcF2ihhUzdNSUBovCz3OIe1QDcUW4FkJqmMsWllzGt+qaxoTl9k7/0pI/kjy8H1ro9mvwT8ESCVbRdJF4650rHXQH3QprIgDS9bwl7af3FXnxH7zHMTpYgGHqVyvzoRqX9DakfFppeZBAlcGbZb4sosYtB4cPn+CztdgSsbDQ+lc7v3yjK4D1W7jvL8sauEZI8lAV1O80HNSqogKDEwKkuhMluh6opiEVgJ2XlZUjw== 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=26hTaa0gH5tsCYr5qXkEVW6QJMWxaCzU6+lIpfh8GkY=; b=KTTARFKBo1fIwuML8GZATJ5jVxTLde1oivSH/6/aZ6l9TOYLXv36u9w7MNex5UgBzwPgT6S/WnQ/7OGy5C+WAPMia+ofpZuGRaZZWOom9e2MwFBloiiikVIvreX+tt8XMOvjbvlUjqCFEds/+Ozt06grazQqJ3Jtbzbt1ZhYzXaCaasWpY9mNO+GnSt8/Ls4ttKQyZBjZTw9HDtNWH79DIVk4CuLkVl2xQ5RUxm7yDDoNU4ojgWcFSVeBzaLwDUZyRo+Vptf5aN9sH1PD1ItgAeKXBVgTYhMCzQlRnuexi0qp/q8fLni4bnhFwmpYZ9L/+T5prW1ia81CRZcOusMxQ== 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=26hTaa0gH5tsCYr5qXkEVW6QJMWxaCzU6+lIpfh8GkY=; b=p9xuOAiuEQ3ZMY33nK7WOA6Dh0MZu7kcwMy/XmS8ONXnCfkGhbIoKGJFO2LS3UfgfgWioZCegG7BpU8VFjdE1fh3eXnPs1WbtbvFMXUQU2V0MUAqKjcqNnf3jCiy/GPs7C8OvgnQHcRmVktpbrHi7Cgi+CFX/9IxXT11zTUuKC8= 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 MWHPR10MB2045.namprd10.prod.outlook.com (2603:10b6:300:109::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.26; Fri, 28 May 2021 18:14:34 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%6]) with mapi id 15.20.4173.024; Fri, 28 May 2021 18:14:34 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v3 5/7] ACPI ERST: create ERST device for pc/x86 machines. Date: Fri, 28 May 2021 14:14:17 -0400 Message-Id: <1622225659-16847-6-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> References: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) 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 SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Fri, 28 May 2021 18:14:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e11638e-2d02-44e4-c736-08d92204727e X-MS-TrafficTypeDiagnostic: MWHPR10MB2045: 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: WMQvd1GeUmDi3RfLKDEci7g3HdCQ1J5Lx7QTrOAwWDBj/+6gX0VgKKUQmVmVLva9iv1pjAmIYFpkQZPhwQaA6yW6zwF5fucjI5U810fgBVal3HQCQ/KXCieYYtAIpe72GcfkPljDNL9pwv8OqcRnvrwn4rx32fq3MH9E+txLavYqffy7nDQ59z62B7D88jQuWfuRjjdZd7c1VxpnzFNfVj3rgMxs5129oLiK5dTGyXRe/TAPglEuxkRRkAFf3v7zZk6qBpWD+5gQeVFA9/ckfdWU5DylrTgAKU69FaBdwOs1oQoEJnRRMfzzDxtWP8+/6tdig4nRcqMzmfZ0NIDunFczSf9ETO7kZG8g1c/wr86Oc4NG5b5el7JO/TaCl3ZW88z78ZE3o6tjXhAxbytIU5yCQI/zu1YshlfBxBo6r4lVfLgezCh3lFjg6/Il1kkKopXsF/MeDaEexRj9hGZpP8qVpiIgo7FNJ9s/p2DNVYAavgpAZO5jW/ad6rCSFwaDyn4A0woYbqBiZt+0Rvts1yMQcbEgFjVHdaLM7KF1qe85P0hF1Ux+rY9h1MoqJTU8sh6UfW/OO/PAp3U1XGRX+74SXffoXihcJEMMjHsFgN6V2HklgZEvnpoySvi5qDSwkWreY0x3lfx6cu52I5mv8Q== 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:(346002)(39860400002)(376002)(136003)(366004)(396003)(6916009)(38350700002)(956004)(7696005)(38100700002)(52116002)(36756003)(2616005)(8936002)(66556008)(16526019)(186003)(8676002)(478600001)(26005)(66946007)(66476007)(316002)(4326008)(107886003)(2906002)(86362001)(6666004)(5660300002)(83380400001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: F1aIEXA1kH/fRa0t1P4ZUI6jxMkolH/lGaXENwipmVqrZ3dfF9vZ4ESBRJcL0A1CCQ/8w5n+VtBz5F6vwqDIDq9Mj46r+zD/HxLULEDxXD2/Sp75bzAYwQZ+UAMJnyhpMQox4JJpdpG4HCsxQELQ5Uj37SC+XsUsP8ebRhWTKI84vNkn1CIuHt/4CWzDJL2NBYgDF5tUBjU9GLOUo8wVjVAU9wQ8IRz7BtqQaP2h6uGWAmNSOEDxgCBD+h6ThOekpi5emSlWpgj8+GTRzteidc9WhZVzupDsZ02FO5+cE31+VAXLAqYher9aaG54iYDIfMWDeezng0RMMwSpyYSvmKg8ej81tBtIRVZOe9Rd78zvXBRylrOGA1jWlktedSUMGhF3kxq60w9/HCWQScS26WytafOF4oIr16i/4WZQ4mgTmyU3J+9PSsQFCS48ALOck0451w+N4TmpS+g5zm8OGgnnN+dYAlqcTpq+v6A3RhDra/j3P9aBYuvrcN/ow6tTaKNxr/6p0PeVWf6UzMi10bTJm4G6CG4O1Jzq2gAWVtwsas7YHrzCXgmjzQ7RbThVvw9R6dCyINk15SV9FlyEfcztEE0B0YqRMJsLJYl3oi3QFJFaJKRqAgopvP24VL3zKYSQ6fh0upkz1nNgAigl1bkTk4XmzmzX+XKFWoBR17TZ0gBZsUh0BxM9r+DvGCpgeji5pyebwI+nY8siCsjCIEh7VCrA/hkClDNhtX3YOjuzQ4otNiz+p1wmUtHqEOEVGtoi5sDNM6DeiBQ9ew2vjEKpoLu8So7IGi1EeHwch0Fktlk57Lil3vMtTDmA1b4p+5plAjiJUzOE/4X3MhefxPIHuSJyXQKxLJCaD6AWOgzltSNyx4+QQsvNO4oWDVUyPdogIH/ELj/mCfif05Qi4iDIrbBtJhU1lSb/xVyON+qZ6k94Cc9RCHKx67bwqgkgErINgu94ETWrDtmM0Y2rabOF3yfcif7MPOiZcuSSl9mtHZtx2zzyPnBJzJqYcXiXRzfc3E34XypA8xI8RNS6pJXp9Km+81UXYGC2ei3CCuYKjDqrBpe6cNe9/olSyMxnPf63Dkbi98e4x3sleC0GVTCMIb+HR783ntZZFOWBpiceoQ9Xt8ar+wSQ3o90cB62Al/g7vzKS8kzjTbBBSm4hBhY7IgrKsdkXO7MFkT/klCH4lJ6tOuhbwu0ZJF8bUED/a+QWH4uN4/eJI2tziqZmLZSZPfYtNdxSEcdFhtQuozoho6K1Zw+3W4JSh+pJQdhRN/dkw155VRwzQWPV++NLNqckPdt7v1Q9yNXLyJ0FMo/zl8fRm2JwC5YLqyI8hpk X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e11638e-2d02-44e4-c736-08d92204727e X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2021 18:14:34.7711 (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: 5yyH2PQ8YKaLZKJlw0n6hqRayE5L+jrvNsxdfOAWHX9YOvIPAKibpUR6dCLUFSdgbsOBKFwAauJz3BPDRneROvDOBbVDo42ll/ZyLr6mOXc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB2045 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9998 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105280119 X-Proofpoint-ORIG-GUID: 1CAdUwdegq38rfjSJMvA_cp-nouVAM5g X-Proofpoint-GUID: 1CAdUwdegq38rfjSJMvA_cp-nouVAM5g Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 enables ERST support for x86 guests. ERST can be disabled at run-time, for example, with: -machine q35,erst=off Signed-off-by: Eric DeVolder --- hw/i386/acpi-build.c | 7 +++++++ hw/i386/pc.c | 31 +++++++++++++++++++++++++++++++ include/hw/i386/pc.h | 1 + 3 files changed, 39 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index de98750..6ba79db 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" @@ -2388,6 +2389,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, x86ms->oem_table_id); + if (pcms->erst_enabled) { + acpi_add_table(table_offsets, tables_blob); + build_erst(tables_blob, tables->linker, + 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/pc.c b/hw/i386/pc.c index 8a84b25..b7b4cc4 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -74,6 +74,7 @@ #include "qemu/cutils.h" #include "hw/acpi/acpi.h" #include "hw/acpi/cpu_hotplug.h" +#include "hw/acpi/erst.h" #include "hw/boards.h" #include "acpi-build.h" #include "hw/mem/pc-dimm.h" @@ -1111,6 +1112,7 @@ void pc_basic_device_init(struct PCMachineState *pcms, ISADevice *pit = NULL; MemoryRegion *ioport80_io = g_new(MemoryRegion, 1); MemoryRegion *ioportF0_io = g_new(MemoryRegion, 1); + const X86MachineState *x86ms = X86_MACHINE(pcms); memory_region_init_io(ioport80_io, NULL, &ioport80_io_ops, NULL, "ioport80", 1); memory_region_add_subregion(isa_bus->address_space_io, 0x80, ioport80_io); @@ -1153,6 +1155,11 @@ void pc_basic_device_init(struct PCMachineState *pcms, } *rtc_state = mc146818_rtc_init(isa_bus, 2000, rtc_irq); + if (pcms->erst_enabled && x86_machine_is_acpi_enabled(x86ms)) { + hwaddr base = HPET_BASE + 0x10000UL; + setup_erst_dev(base, error_fatal); + } + qemu_register_boot_set(pc_boot_set, *rtc_state); if (!xen_enabled() && pcms->pit_enabled) { @@ -1529,6 +1536,22 @@ static void pc_machine_set_hpet(Object *obj, bool value, Error **errp) pcms->hpet_enabled = value; } +#ifdef CONFIG_ACPI +static bool pc_machine_get_erst(Object *obj, Error **errp) +{ + PCMachineState *pcms = PC_MACHINE(obj); + + return pcms->erst_enabled; +} + +static void pc_machine_set_erst(Object *obj, bool value, Error **errp) +{ + PCMachineState *pcms = PC_MACHINE(obj); + + pcms->erst_enabled = value; +} +#endif + static void pc_machine_get_max_ram_below_4g(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) @@ -1628,6 +1651,9 @@ static void pc_machine_initfn(Object *obj) #ifdef CONFIG_HPET pcms->hpet_enabled = true; #endif +#ifdef CONFIG_ACPI + pcms->erst_enabled = true; +#endif pc_system_flash_create(pcms); pcms->pcspk = isa_new(TYPE_PC_SPEAKER); @@ -1752,6 +1778,11 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) object_class_property_add_bool(oc, "hpet", pc_machine_get_hpet, pc_machine_set_hpet); +#ifdef CONFIG_ACPI + object_class_property_add_bool(oc, "erst", + pc_machine_get_erst, pc_machine_set_erst); +#endif + object_class_property_add(oc, PC_MACHINE_MAX_FW_SIZE, "size", pc_machine_get_max_fw_size, pc_machine_set_max_fw_size, NULL, NULL); diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index dcf060b..4458c8f 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -45,6 +45,7 @@ typedef struct PCMachineState { bool sata_enabled; bool pit_enabled; bool hpet_enabled; + bool erst_enabled; uint64_t max_fw_size; /* NUMA information: */ From patchwork Fri May 28 18:14: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: 12287375 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, 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 8B9EDC2B9F7 for ; Fri, 28 May 2021 18:26:59 +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 0779561132 for ; Fri, 28 May 2021 18:26:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0779561132 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]:59924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmhCC-0007EY-U2 for qemu-devel@archiver.kernel.org; Fri, 28 May 2021 14:26:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0O-0001of-GS for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:44 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:11336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0M-0007Tl-7u for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:44 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14SIDO6j011086; Fri, 28 May 2021 18:14:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2020-01-29; bh=5zjrGU1LVvYAaCcVQp4Xmmcx+IdojJSNMK9VkvKp2gA=; b=TYA/iBNcFy4hJOSx8PC9jN4UGX09xDNBB01UTZK+/rejQ/NjKwyYhu/qVgjAaSEvpahg qXzA6LnEmxcLTkvRMP2sV/qBYIBtQ4aIhJyBQ5OMKTvbvkEOZsn+JwAmDUSu73VgeVcR w7vs9swAIhDelRU4k9xwV5vwcFVoHTTvYdRnLyrRn28oCTz8rKmLjxbTHJMsTtU8i8Bf Ou6Uz6TAdIP3KcdVJFKMCrlszQ1d9ii/+0CigEvBc1ZCoH5NrOLnfGAl9lLhAp3gmHAq FfiJeQnjBp2AlBZ55RR3qDhMorRNeybCQ5viUifZAFG0yNESRMIC0fzryUUSCgbsvUgq LA== Received: from oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 38u25vr29v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:40 +0000 Received: from userp3020.oracle.com (userp3020.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14SIEdJQ108682; Fri, 28 May 2021 18:14:39 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2108.outbound.protection.outlook.com [104.47.70.108]) by userp3020.oracle.com with ESMTP id 38qbqvpqe5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DCWhRSNNr9C/oLf0KuHXMjcLotVQJ9+TH6H6F08nW7qRJ0A2EEWXMKnGLSh6Yu0nWUcFx17Ro38q5xZZneFBujnFoZkK0MVKTT5NdIm1Fja9ZblLIozhOQAJHCC8yvJfZCeUnWuAJv/hKxarD4pXDc4qyryjClK8etThMAniNlihzurL9Y3XOUi29f4T6Ozuzz+MlQscIU8jymOSlgPJ3awmVpIy1TjdbMp7SKqM3Fvhi9u9cTkfOoUeumoFnhenqHy4BC5Tm4thEpYmcc5nBmqkwZV9Va9auUC9v2FlSlcpQVwDI2m84Es2fMcbmllcLlU7GU4oJhkngniUzd9AHQ== 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=5zjrGU1LVvYAaCcVQp4Xmmcx+IdojJSNMK9VkvKp2gA=; b=G+d3dNeZh+9xtAxDyhrW9JqX9qZrj16tD9bt0Dz4DA3eG6GRSV0F5APSjw8HI0eF2XJCIZmv68+Jn1Nu3S8WO7kQSid94mVi9AUOtiZCAAE+WsD5AqcE8+z1jxpMPKe6aSrsqwPC3LeC6ijMf3UngJL8YCAnIDLxHEiUTARr9OiTkW/6OU39ANp5fm2Y7CIB8b5wyrEVMLyWGeFtnXnvG6WOPlZKBAVWuej7rHFkpczN79EipOfoLCvfb8MCOIuhjqpG5yBFrBjAUBDsl9rJ5MUtXIBW6zyMlGVExcmmfy4XbDyP3a81j4RfqadYf215xc+EOAoYTSauXECqpIbkbQ== 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=5zjrGU1LVvYAaCcVQp4Xmmcx+IdojJSNMK9VkvKp2gA=; b=hJ9jT5pKJZAcg1L8DOULA8UFXF2e+Gp4zUpLOlD4GzMRVfUj4r5H4Rh/iIEJKQv1S4dn4zNceJXcetqc8n4Y2jaZyuWG+kv+mY4fPJ+nIpO1gSbgJa9RUG+C0MqKahmd+4uyevUZImfo6IrU0eo4HmvBMAXxy/saXSSnmA4nz5M= 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 CO1PR10MB4723.namprd10.prod.outlook.com (2603:10b6:303:9c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.22; Fri, 28 May 2021 18:14:36 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%6]) with mapi id 15.20.4173.024; Fri, 28 May 2021 18:14:36 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v3 6/7] ACPI ERST: qtest for ERST Date: Fri, 28 May 2021 14:14:18 -0400 Message-Id: <1622225659-16847-7-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> References: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) 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 SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Fri, 28 May 2021 18:14:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6f655ef5-ca0d-48a0-20da-08d922047374 X-MS-TrafficTypeDiagnostic: CO1PR10MB4723: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E2vknUKD7T9OoRk+TPzwmsTXpYEMByXsamn64jo8xRjeJsF50vcnPu2l2wjfXEPbRlJ6QmaOVPkyVuib0QuzS+NyzIHDTmODiiRnEDoVTFhPK0WpT3+06h1ZKVSRRTl91NHWd1AzeADJUXjFlKt80C6G9hUU63mq8cVWCKaT2VBuVSxeFTtklC3ygs5f5j5YLmrPVL47d69iN/Q8T8qmhDYi2CTbyeg9jU4Nf1mK5YeXp3Id6FVsMwTeVw1ohR/cnVoTMrnqcaVSiwLC1DAQ0h8cbuT8GoZCbQozYTPx5Eo/ttm6tZzSew5l+/X2ZOsA+1dDsliIoyUSa/Q7EeThdf9IvGBMYr4wH0bRJkANrhtajqECKUfuL0gq3thmg9ATNzQZFD3/+wNxDrwR0wQ/i1G1gPzndlhojut/83lzwFRzDraHRE3tewXvdGzcDCwAXLfA44oYDrHSDijgc9YctyPEqk3JXCfiDlKrmcTDcxD3lhpn/jVT8oNNazAsRVBtq0GKYxMJUPhHjX7QEXO6jn+7H6BzgB1TXM7oqsc6PiyCWI6KtAmnbB91td07irAJsjcukVVPSXZqGbi/DuRfe7b3VjCJWZiA0muNLl8wsx79ATg6KovDk8lo3POAIBDtyBqCZK9f78w4/YzT+sjd3g== 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:(396003)(366004)(346002)(39860400002)(136003)(376002)(6666004)(316002)(478600001)(36756003)(38100700002)(38350700002)(186003)(16526019)(6486002)(8676002)(86362001)(8936002)(6916009)(5660300002)(52116002)(2616005)(66556008)(107886003)(2906002)(4326008)(26005)(66946007)(66476007)(956004)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: iX2uSOi0k5KCSZOsC/rxGkkegYBBC8i2RpY7N9TeaTmkLMgllcn+tV7GAWQQqXs6raOBIJRlJmgoMhIsam2kG0mJhN9BGtvcD/NxTTFftZcZAz+mOqh5+9DMUk44A0ij6g/x26pc0IJ7UYEF8hhGhAlPF5oh+kCEHaSaVHUP5DIMj8e4lQAjXdZdUt54y0SEESuQrqSOe1rJ5D1WH5tTayOMtwzPLQAGtUzep9JzAydJ9uzMc3AebVUGt2jdWE6WcTh7zJj9w/PXsB1uad5o6PelIIVfQN89yQHrwFT9VTs7ZfZogrl6eggq9Jbgl+4UJ15GJhFrs9bZXvscCGZOXC6agcOrL3wWmAAHCeR12aHB6tRw1Gy+qhEthz5aSaw5yUSvF7ItPdflkCh+jzf7WLOYBbx+YN1vGM447T0YhzfxdQ1hh1EPBgpuOjZq44DXkzep8Uhw0efKQoaUlYpG2NSLSOtaNSH8B3QSY3GWgKjeebih8LCIYlaV1n7k/QaD8AQgNXDU9CpuFEnrFUD70OmGhkMxWJJY/43M2/Q172STJBaAbgY+daacvQTuqdE3eOjZ1s8SwatyMgwtnqPqJeEH9ROcx5tQUZxzTPr3auURqte14v5ZnvdIUa3ec1EixBzmeB9mYNlJ5xaVH6U4GipuuPG1sy0RG0K4rN0xg9YGye3vV80UjRJLg25V3t7Dp7WlkVPcqn25dqwMvh6NjLXwFMi9HjfHxE74LrEGLqXINDoN1lttur5xbyIy+V8P6DdHeyYrmbsffoU+d3/nm4nuYpvdWuRKROGXL5nz2IRE2fS8yacZGtMg0f+q9vNXe9yCHjKLUvtD3i3jnzDHeCswNCzRBpfwrYd5oXa+8DMWqTg/KCJaS7ohOTBkEfUtxN8BmBdPDSP1duwhkNNp8W3FK2gtbAGbnpQ4NcEUkwzF3Facosjq7gQ6Km+kIULx9gzon5ycAaMZXd1fCLsGIojHJKwbKymmvhJkEWD/TSii7+goRog/b9ydgvbWp+QM+jBGNRXFikjJVgXZQYA1xBVdigfz8Vai1GG06hIbkmzlu9C/KkqruYOkYQ2AnRfnzHIE9K3qHPka+dNtQicIoQtzZ9Um9/IKnAugjOayofA3OcO6/2WON8A5WQ+HfKvJ7jhCeaZ9Ii/rdjL2MeCXKJ2GbqZh1hSn9MbBKn5CdZfDus+E/+QoSfOwCiDuVWQl7XJDgNMDTHDcXC+j9EQt6OQzevHxOK1k3jq6DdyYHKbywUiJP10+9IWEXYQHIKDzBSliVK+SCMqfBhBvFk4uN23xrjUM3+6+HJWATFsyp60+XtDZnLKG+kIIatpqx8dI X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f655ef5-ca0d-48a0-20da-08d922047374 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2021 18:14:36.3134 (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: 9hqidoLBf4HixUwvcIdN5g+2K9G1Ha8BGGJLrAAMs2h+fT2Sn/sRPR39O+n9GXPaa9N0XsOoQQUtAV0ZuCvPBr84OjrEG+gS2V31txgT+tg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4723 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9998 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105280119 X-Proofpoint-ORIG-GUID: 6H3fwxd1Fmm3H_OlhOwvuVgpiYI8oIWg X-Proofpoint-GUID: 6H3fwxd1Fmm3H_OlhOwvuVgpiYI8oIWg Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 | 106 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/qtest/meson.build | 2 + 2 files changed, 108 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..ce7fc70 --- /dev/null +++ b/tests/qtest/erst-test.c @@ -0,0 +1,106 @@ +/* + * 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 " \ + "-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; + + 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);\ + + /* Check addr_range is offset of base */ + g_assert((base + 16) == log_address_range); + + 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 Fri May 28 18:14: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: 12287373 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, 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 AD411C2B9F7 for ; Fri, 28 May 2021 18:23:34 +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 F2E2D611AE for ; Fri, 28 May 2021 18:23:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2E2D611AE 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]:54894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmh8u-0003jc-VO for qemu-devel@archiver.kernel.org; Fri, 28 May 2021 14:23:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0O-0001n3-1h for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:44 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:35536) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmh0M-0007Tv-5u for qemu-devel@nongnu.org; Fri, 28 May 2021 14:14:43 -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 14SIEfWc015210; Fri, 28 May 2021 18:14:41 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=5jaI4k+d0YHnBYchMwZ+GUpIEEBMe/FodXUxkK7dRJs=; b=p3sJ/LyqlPnA0+P0ANfHuinC9vnUnUSUVHKL4BF0SbR4Y2IPr7i4gCATBGRD7WoeBvWd Go456PQGYBP7W0MwAhQUqByGAJdYdpEFKrc9o8n1f5yZFm4QQenuttwh+onXoxMXunmC DyAKEA8BiBSo3SMS+7lWGqb1OeEvcvR450SgweXIO6IkssshM+dR9Rx9dibwSXFEfF47 sYIqXtZBcJNJTw4OMYiI15rLzNFcJKWQy5uBLJvYKnCKTUGlv984x6DbwK9ReyJjZeio YOe1b3fVk5oPYAVcs1srdMWmX62/R5KIEe7nZ3DJSm8EwNU6/VtY4Bkb5+cEnspezhPs rw== Received: from oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 38u31br1r0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:40 +0000 Received: from userp3020.oracle.com (userp3020.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14SIEdJR108682; Fri, 28 May 2021 18:14:39 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2108.outbound.protection.outlook.com [104.47.70.108]) by userp3020.oracle.com with ESMTP id 38qbqvpqe5-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 May 2021 18:14:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c8XdSldp1uifLRTQI5DRpKHt6mgK20RfZjY1MTZbCy1OGK3QGDZexPiutj5BPH3y8jni2rPP7UFzOVxtFhwwOnlCrEx5bdpVn9YDP59UOdpWQ+AD6+q7ceiWjnyCKP7BSUSTKOF1POgdOLQUjecFI8m4gowI2xPNO0DpDAJRzJOHbz+gL2DyPhBxZJZYyKF/9ystUbBt6xex408GyVja2iq0kpfAJ9wmktI2eKXwU/p7tAfOwzm90LbAlu7j4asFCW5XYMMoG2mflxWawnWxMKcduZwyp3aNLvQvAMLc5kTvoOQPMhg+24PR30vubzzylaTzpIvIhlkVkKfZq6RWfg== 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=5jaI4k+d0YHnBYchMwZ+GUpIEEBMe/FodXUxkK7dRJs=; b=jOgcgvJp9tIRisdXdVUuQMOeW/nOxFtuoSmvX8RviZ2Wh2mHhFaTu9SGhfKQy+YjkCFshv5TpEHnvbY1B9eTsR929cRFxuqWsoIi5E+UrpcW7b9GvIN2wg8Sl1X75qTsyfPm5WXqqpDPC4VFowNziynY4X7kyuCqv7MolnZcRFv4WvmvQCQuS2Sg2yT2E7zOS4H4oh/F5YxwGWbSVEk/dTRxbum8KKRy0xwJJVQW7Ov5j7Q/VqNjL4FqdH4VszBNgE8nqNtm7N+tA2Ai8LoZmUwqrh6TEWjtdQoTxRWWCmwVdEYHHZ2AttxEe2LCZRfv+26/a5ap5SxCx9SgptuUKg== 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=5jaI4k+d0YHnBYchMwZ+GUpIEEBMe/FodXUxkK7dRJs=; b=0OCYqJwFK9ieyJpjz1zlsm3e/wVZQiZ5IQk+xR5QYJPnMVkYy+l/zA29q5mOIwtr/YQD1/xzSAO0j5ZgPlpl2CSEEDezqzSH0KSPXIzXqHjblthlrZBP4REKtZABYeXONP9DJotXzoUOoJlzXou3mciwNIkVC4X0bsYJhYpaHLE= 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 CO1PR10MB4723.namprd10.prod.outlook.com (2603:10b6:303:9c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.22; Fri, 28 May 2021 18:14:38 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::a0af:e69c:6e81:b8fc%6]) with mapi id 15.20.4173.024; Fri, 28 May 2021 18:14:38 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v3 7/7] ACPI ERST: step 6 of bios-tables-test.c Date: Fri, 28 May 2021 14:14:19 -0400 Message-Id: <1622225659-16847-8-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> References: <1622225659-16847-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.201.23] X-ClientProxiedBy: SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) 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 SN7PR04CA0201.namprd04.prod.outlook.com (2603:10b6:806:126::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Fri, 28 May 2021 18:14:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e9ba06ed-0b95-451a-b4a2-08d922047463 X-MS-TrafficTypeDiagnostic: CO1PR10MB4723: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:113; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VBOZq75PocDhwEHQDrMDGuWkl99NcRBR2HiiwFh+0ajkbNVBwYp+IxH6l/ouWMHdoZfalpg2B+YXXuj0F6S7b3dGFgdOinZwuXPkgB+bvuwBnwq54Swq1Uao1HTPOov3dEBaghbZgimLBkX1Eb9MdHziUxszV6OHR+5Xh6ihggZexgSbUCsa505bW3Z1lb5ydNhzjcCQVo6MDZFxvxyaGlgL6GyGFzNg8Dfw8mYvw+NxE9Tw4MHF4N/mB3sYlFSY2MgUXTFoo395XMnENwMM02KhF+3FBL6bfQTWjs6vF9+45ruvIEet9VXd1nuWgvB7oAZmkag/aiR6sgpps9Xjh+kU786A0uc4ee7Vo02JkMyvQs1mkMIQUYjj9qioxDHiCqNmc7yFDh8vImPA2bJKl4fgYtDqlahquPpmMwPJRjkxaCrwTtQ9soY7cw4uTduQBfmhax2fpZu24lIaWTk77wkguwkx1B511NgnoE+1W7SMsTlN3rLgEF8bBfdTG0A45IigGwlj8qx7glMP2JTYdx+EUW8BqHc2rTFt/BWSkU1ApcNLfUF4mzW6T/GVFQwaMuGvcmwtBsmEFsi2KPV0WkNzYVqoL3+Y+c5VmRBQPRdk82K69reQbNogC+O2vMa2/S+F3TeFXb2e6DYYAqiMaQ== 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:(396003)(366004)(346002)(39860400002)(136003)(376002)(6666004)(316002)(478600001)(36756003)(38100700002)(38350700002)(83380400001)(186003)(16526019)(6486002)(8676002)(86362001)(8936002)(6916009)(5660300002)(52116002)(2616005)(66556008)(107886003)(2906002)(4326008)(26005)(66946007)(66476007)(956004)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: vofURnIitdEakCsMtdTvms6gzRIauoeIxvF5sCoxEl23r8jf/PBK8JXw/iI/FxssCvY9Dh070SvJHBUpYBPaE92wdygtlWvDdS0jLPC6UN+/STk9E//PJMZaXJJFwHSiyCwgc0minxoo2uQjcnK5MHjZpyYit/h8KvHPhxsAcFYmfk4bN180C+gyjeGqJlzB5agWZEkTOCkaJ/14ncZxFM2z4itBdJ+rdXxQHSxn3yZs/RiDHc6D/D4gnSCyMJKAhbNP0vMcAZRrMT3zcmbMRFfEl26YXtIXpx0m+coFvbjfEryg3rlJvSaw0JfTG3QQz9h+PhQqc7evm3j+QdjUCUNDrwz77GQ6c8awDdHeY+954vbvA4+mUBgT0PrRL4WwOdipJtVI3TBynobm11zXlRjlwVxPf0O2QjVRaIA1UyHFUV6xbdy2t03VuPMN25MGjLOQ7and90hlO8VeCTHDGSfQGlMbgZE4rAH4K6V3tAXOGuU0ZEc4adrNVsXklt71m2q+jDr5uab8e9ZgRggPLEQwRojKFMfB+Nz1gpPp/XVzu+J4cqSh7641duZszEeiAuqwHZP2cSjKzngdVAz90vJAlVcndR+GNkJDtT2GHx9YwA8M4MRipV7l0dfFKh9hEnZqYmfMNFBCyl2stNBMex9Kd9oFEFFrKIhTqm7YmXdHztnfIzuGVMgiJz81lpPqpIsuotyZxGToQwVK+5QBp8NoGGbwM9Zhx3xt8M5ciVtoKAkr9df5XL0U8qFYfQfi1LVL2HRwCC0Xn35NkmPGX+Bz7jOJ4OsgrNKNbMd9DQtnvoH8BBq4ulUcHjtEtuNodt76mnZjnyHjuKhanchROjarJgf4zxa0ZZEDAhbRPX7OKg8tdc47JXtMR01R0LLiBXR+xQ6pdQ8AtQA2QFZbkxvOEFldwi3YIkSHxto4qzE6OznaFWXgukPBpzUEGH14cwYnXQvf/jscf+689FjSfZ5Uf87qcawkgN85u1UvMdrRiDILr7lXm99NJ98VLMxk4epVkuOpBsWy6kXmmuoh+e0lkFBLt/+MrpxKvH4uQgysennySvQSPv4zFMnLTc1Zhiz60HjoOCH1YVed1Iw2V0NRdmZqkl7uns/0SyyNZAFh3++3RUHRddhXAhXUNNzvKyDdJXzO8reafsDrztXx2z/6XcFmGMPft0iC+kpKgwub1eRO/I6bpu3qUoc6qElpL9+SUVBZx51JH8AOfGP/2u/FmgxYGuCKvNtJVaViBNw6fgbth8NM550E3ObuZWCrg0ijQsGti5lQ8sazHwroH3O3DUv5OQWzBxa+ecvLg/neiB83MlCf4tFO53iqEYcv X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9ba06ed-0b95-451a-b4a2-08d922047463 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2021 18:14:37.9790 (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: HUfVdNsR57qRPxmS0vqTzTLllNdDfmsRxZrsEaW/8iF1oYOaD6C8v5HISOo9HC+anjIm28hLbQJ7jkyup2QD2X0r9Lqxt5lWUjU2yChf6zM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4723 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9998 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105280119 X-Proofpoint-ORIG-GUID: pOM92uW7UbHUNREUlFCLCYkGCppSkdjd X-Proofpoint-GUID: pOM92uW7UbHUNREUlFCLCYkGCppSkdjd 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, 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" Signed-off-by: Eric DeVolder --- 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 ---- 3 files changed, 4 deletions(-) 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