From nobody Fri May 17 07:55:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1612827645; cv=pass; d=zohomail.com; s=zohoarc; b=a4m7Izs7u/Hn7gFrJMC5xMMQ8OCco1qsIqC1DvXuUkmdLxUtus09txlLDy4vqED/yTLZbtx6E1WYXzRi46Bg/CXZra3pKIqeSt2fdJnXYloF5UEnx670xCmGg1rrenj4D0PKqjKLIXYBvQfM57xOjD9T7z88IpsW48OiQwvT9EU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612827645; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wZfAvjwjzb4XNzJEnJp2r64ok9W1vDs4HG855mJ8SyE=; b=T8KvBY1moNKFW7PeIlINdKxMgLs0zoDnUz6EDqIIcJ/6Q8QW3eBuGZxpLq7pKxjV5ShL8Hj5MAJxf3qyBxmBDB4hZMMX9ZYeA/OsgG8gnRxzUPR6LzGdfvGysAEmk0nZWxwKuq2RPKIUS2o1TxI77gwXWky9JkP4qD21KlgI6IQ= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612827645498998.2045396130543; Mon, 8 Feb 2021 15:40:45 -0800 (PST) Received: from localhost ([::1]:55084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9G96-00064F-8t for importer@patchew.org; Mon, 08 Feb 2021 18:40:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dc0-0000lg-84 for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:25 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:56718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dbx-0002hy-MW for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:23 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118KuP4O009589; Mon, 8 Feb 2021 20:58:17 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 36hk2kdc5u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:16 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118K5q7L157095; Mon, 8 Feb 2021 20:58:16 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by aserp3030.oracle.com with ESMTP id 36j4pmtyjb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:16 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1599.namprd10.prod.outlook.com (2603:10b6:300:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20; Mon, 8 Feb 2021 20:58:14 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2%7]) with mapi id 15.20.3825.030; Mon, 8 Feb 2021 20:58:14 +0000 Received: from ban25x6uut23.us.oracle.com (138.3.200.23) by BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.21 via Frontend Transport; Mon, 8 Feb 2021 20:58:12 +0000 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=dK8zPR+8mtKgSULL2Eb2yIeHABy+POJKAOI7S0jf0VblbkAioz9gexosCyqUTQpJf7zG KKIjtO9VPFemuvLa3V5Yty/vIqkc2WR9fs20CPe3Dvrma1cM16zOuc7wJW3eWO8FaGQK Vw9J85mYinG5oeGXP1m+jnv5K7tRCFhnbNN6IwBQ8Q1Kkh+Kmb3/iQtQ6h53EunPqBsB ktlDHMbKWTvwTDTF3wxYIto2eHzpLRf5SOrdOzbNx4XWn0AZfYtK30WWmdsoQMxC4x/5 ZIx57vHzRCPWGnKbEDsMwBrY8cBM6pUs2syNKE0r+TV/M3m0V6qZE+bXegW6FKCyrvYe kw== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kby2g+o0ptLNX7hnBNCF2TpVsk2JRecd9zF0r/eoG6Zc7Gnx1KBdp+9pdtArD2aw4b0+jwBfiVy/j5pw/8LXn0qEeCR1ILz5/DZK22llM+8JRp1F/87TUlNY6IQOre1TiUKSr74isVD5R9uNbCVURnlpJt2mfF6DjON4XrNE1i6xDL6y3G1sX32Oia/5MrMnvbfvOH6jYPImzUQZHq8313FJ0hg7koL9AQQ+0bvXWCYa+wMOHP5iOluDzMS1URMuGjPD60omOQhjctWSMSxZZ6E4heb8QpM8hfHuiJsWfIP1mJ4CIAgd72JlJ6hVS8AOutY0RNQghyg+v3Cg9hwtSw== 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=Ygiwt4uX7qDZzOtvZA1DbQuoR77lSt47Q9A4ybxUvBj51mZdUPPIID4Po7Ev6Kjd5hPUBQyeA6X1cMNiBp5MjgrW5DlIlTvdK0mtNyDwcxn1DUR4aVnRXyet70nTRv4rfKiyxrm0OimOzmQcdUKQKDbYNDROnJnv3xopY5axTBdmWqHxAetKG/xVOR/snvHCXrWUAnqg9D5bCJ2ZmK2Uiuxyo3hIjZd+/wbl5VQrcKld5ELmPwHSemogVfufQ6kZ/+Y36kCO4RMeyXzPtcIhSkVvS0F61MyocGSAMO5/8o0VGWfRm55HRQyR/o5XoCAgLzDge8JxTiAfDDrd3U+DXA== 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=xXjtM8sfQiAapyeuOA6OCjvuKAyVQYk07az8isrb2R05SqlPt1tNLXNUeAJv73MNkO/0dLor+js9768CZSyqaah9YlTMK8L4qCVJ5Ig+r22VTaVZPqN//3pOMU65j0cVsT6vrbEeJ6nd8Oz19ZthPAsQawlCk5EBH8xZGTCzyCE= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oracle.com; From: Eric DeVolder To: mst@redhat.com, imammedo@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, qemu-devel@nongnu.org Subject: [PATCH v2 1/7] ACPI ERST: bios-tables-test.c steps 1 and 2 Date: Mon, 8 Feb 2021 15:57:53 -0500 Message-Id: <1612817879-21511-2-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> References: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.200.23] X-ClientProxiedBy: BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 596a93ce-df9e-4e34-5a06-08d8cc744039 X-MS-TrafficTypeDiagnostic: MWHPR10MB1599: 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: OFdexJ8mQnsRkouzXSmmhzYc2jfOrOZVOK9m1agnOV9lbXiE4mAfyLPE0upJfpYqpHBIl5Sm5NfDtAWRmFzmDCYJCM+xIQKPv2EjXOzv+PEkVCurbrS/uVltn4yWnjviYc9aWNWg+EupaYxzyXlqt5WQs8n1lyj5V/SszaahmSUMNUnIGmRFRk2FBxjP0br78guPOUYV3/2ZqNsp5BvIPQP0pugzTzXUVaLqueZbQqNY2W2Nt29rUSCfHiI8fZJ0OdFfFhNwGq4e8gfYFPNMIL4rGVBeNQTClIaKEh/JMIuhsTnt3FfmOdcDLimUteoStZIvDe/+UZl1bS2a3C4AmUYUK61jsZhd4gw5hJOCAx2oHnmkVG2a8YoJb84pFa0X1agKTOxUoUBtIb3aTgbRWIfjehddAeBYB8X89iWlHwQcv9zrPHrHnaJ0vKSHA0YzfZqbXxUecDLQH6r8bP7ZToFV/IYeg0B9Gmoi85OqCU+kYYpdhzIS/4BWAPQgl+e7geAlCri7RXUy9YfXIbWUkQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(396003)(346002)(39860400002)(6666004)(4326008)(316002)(2616005)(52116002)(186003)(86362001)(36756003)(16526019)(956004)(5660300002)(478600001)(66476007)(107886003)(8936002)(26005)(66556008)(8676002)(66946007)(6486002)(2906002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?nxoJq+ksMTzPaMB9krXRr0eDN1yTpg3fB4QXzs5sVRtoAJZdD1nMOV2Fmx8y?= =?us-ascii?Q?Ch+cM8Sz508omMFvFrBbHJXt1xsnMyGZVX+ob+tybLf0FkhfCQp1R+BtzCId?= =?us-ascii?Q?WKtOHCRZ/Z8dSCkKv6u7fyYYTpxFP8/Z/RkW5WHN/0Bt6l1JMY82Ij6+lUUk?= =?us-ascii?Q?PVn4Ff+UYBzkHWUCHpGJGc6BtMiY5yGXF/woRneA+oxQ/mReG3k9uu7aWKRG?= =?us-ascii?Q?FvI9aRJT4N+7XytVtfCyWsXae5XZ73+Uyes4mriSvhnOngacwIXCzZhvnMNm?= =?us-ascii?Q?LYww/QxjWDiG7fKgZnDMn45Fal+LSHObiEOIbgHEBkKfTahutNS5KSNfrEhh?= =?us-ascii?Q?3IC1ZSB5fdG+OMxkJNrLcwEUAMN0efW/8W+9vOt7OeU/W5MWK/ty+uQp3p9f?= =?us-ascii?Q?jtG2Yc0N4kkn5JZu/sVJi6uYdgaGIJ//8iykgUPGJcoZBM4tqZC05a7WrukJ?= =?us-ascii?Q?AytpfqYp47eH+57oh3gAUcdpxJeioSKCaZsMiI1w2pWedEHssXLlfbKgPqBq?= =?us-ascii?Q?MWzEDHYvfjxsIYc7eqUTOOE+JxBZfR+rmOl0uhxD0WhcrDePeAniIx9a/lvK?= =?us-ascii?Q?42JwWUYY+gSIUBF4wImCROKdrCwOGMY7NIP1W/MlvjhE6SZ757pWvKSedTXy?= =?us-ascii?Q?4BKtL0KKbxZJMNDl4C053K3mS4Kn67xf7oRcY6BevlXo0b1rmiXy1Ln22pIW?= =?us-ascii?Q?hNRZOnyId+WnlGIg6tbXcoO3usjifgFZt8oi63G0p9q321am6ofvxVjiiy+U?= =?us-ascii?Q?yIqinDXlQClU/IMnnWqtFHVfc2KzssvW00W0rtMNV6obB+GE0BmApFFfO+/F?= =?us-ascii?Q?GQpo8RhdmQHLRNvmaP/HDO0Iv6uVnDEw99PrOEU7f9QZefCkTItBGblvqPeq?= =?us-ascii?Q?xGY/rYO08gTqHBayzSDECTvXGoq3poKA7ml4IzCDRP/99qgk4oWPyxPMBMQ3?= =?us-ascii?Q?brh20NN7EsXPyfwg2Yz5ni6k6WbbIIi162p8yFWwjJiSLTzXVKgpVSQaFQMx?= =?us-ascii?Q?LCT8ChYgXD//ONd3xSVUugwjn2bizxb1F16xB/LiRUc8LVxhvHWYTqDsvbHx?= =?us-ascii?Q?/cnb7pfgpEUmm5Edqqh+SGup+tspEau4ewI1BDzyStWGMNQrMU9Xdym/vVkf?= =?us-ascii?Q?6CTz11/9jQZItB6u17EhLE29GCeghKoTjfAjchwN6l7clDJovD3sATsg6jw4?= =?us-ascii?Q?1UHYk+mOpWMkhWclKmZjL+UPgOT0I2RYQpNvL9kZid0ZM9ydQZviMQPaNlkW?= =?us-ascii?Q?hyZ2MJXsrlNdONBp0PZLnofjTmMjAkfLk+wCkZviXNLmNVW8qO5CgiQ2derZ?= =?us-ascii?Q?LikuMZS3d6nBvJHIAtcRY1Yi?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 596a93ce-df9e-4e34-5a06-08d8cc744039 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 20:58:14.0659 (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: MRwycwVWYhst5fpCpF+ImZ2DFQh8mo0lOi+4gwImA71yoJszGC+KMbT+IABthCNvSuGZASw3J4EW7iFwywTHSARvVd/urBM08+cTV8oaREQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1599 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 impostorscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=141.146.126.78; envelope-from=eric.devolder@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: boris.ostrovsky@oracle.com, kwilk@oracle.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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-dif= f.h per step 2. Signed-off-by: Eric DeVolder Suggested-by: Konrad Wilk --- 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", + --=20 1.8.3.1 From nobody Fri May 17 07:55:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1612830659; cv=pass; d=zohomail.com; s=zohoarc; b=Ipd/KL4+3JGHo8mjYZP8pl2LM8wYeF8xSEp8L3WaA2uJNvR3vblvUcP4Ssxn6WD68isbOeJYktgF7c0z1Id5bfEXshg7MGSX6x+3SGoXyRWjoTE/AJs4CM9oYPDNgXDJIDg/sm1qKbmB3Qyk/lfqkMiLSxIzQFOW1EeL+gPmjqI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612830659; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=j6BRnNCZQPhjjgJ8pvPJxU5tO9nSvEfSiPyzTiveAcE=; b=d8L2OXs2k0fKRMKhT4jDfloaCUiL9rZ/8K4V7VkUoQ+RswQCNiYPVKnq1WtMctK3oAsbkcHVfhBQXAfyhGePCNxyLI7k9+9iech4p6cKFGPWkGFf+sFcnEn3Ew2FHOxuLhFxatEaVtfCdR5GuX11XQ3hIUDkBpa+fBD3RtA/Yy0= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612830659545481.9589061084848; Mon, 8 Feb 2021 16:30:59 -0800 (PST) Received: from localhost ([::1]:46148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Gvf-0002wi-BA for importer@patchew.org; Mon, 08 Feb 2021 19:30:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dc3-0000ny-GJ for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:28 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:56724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dbx-0002iB-LS for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:27 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118Kv5HL009842; Mon, 8 Feb 2021 20:58:17 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 36hk2kdc5x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:17 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118K5q7M157095; Mon, 8 Feb 2021 20:58:17 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by aserp3030.oracle.com with ESMTP id 36j4pmtyjb-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:17 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1599.namprd10.prod.outlook.com (2603:10b6:300:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20; Mon, 8 Feb 2021 20:58:15 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2%7]) with mapi id 15.20.3825.030; Mon, 8 Feb 2021 20:58:15 +0000 Received: from ban25x6uut23.us.oracle.com (138.3.200.23) by BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.21 via Frontend Transport; Mon, 8 Feb 2021 20:58:14 +0000 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=j6BRnNCZQPhjjgJ8pvPJxU5tO9nSvEfSiPyzTiveAcE=; b=lluu5vA8+v8urEgVBs2NY8wB68sbIP6jLviQVBG+BoeZKfnEJ//b39gNPv/8M0KkGqIP JGf07GilgETQdPNNXAlnSEfQmk1FQFuWsaTaE/bhTKAbtmGERvymsEytJu+XZITlInr0 nDIpF+oSGHUGOHbVFv8CsT3/D1qcV6yRwlI0z57ZuN3waQFt60+YfPXXtAHglY27ehit GnymHfD88R/tqQwQD0IWHUjymv+A9YKl3pimXBDU8QfpBDbHr1X78UmxcrwMcN7u6i0A bx/n2W+fwcXxhvCj+RbfPHLDDjh3PMq40fe/Y/KI4qd8dm3RQ/xGSZ60OR2wgt+4e89s Dw== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aWu4dYRtAWxmuxIRWaCVvrXFSvj5zpSK6TVr/aNZf8H3muwzpTEF1AGt7JuzcN2eoxK1qUiKlL4csHeqwZ3vjlyOY4SeoOLDAXROoUwh4XXaEIZ7rgf+M1u7BVYgYKvWTTr8y0wbSAlAVodhwp8+t0Q2OKDGbz3IBB2lSbP3wa7zMrCPRx2DTRJScqBMYoKWzzYYL+1XefZZoLzSDXlE1CoWyc/NerY613hcBM7O+6Yb1gBgZ8pIaqPieKLRfeJKzlbNwtnBbCAK2PuLhboYwn8chBTwNLMXv6lHTMRVgfQpUg7kusL4Uao17VF6HiG5kXQLRxs2azGw0BtBOvkqfw== 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=j6BRnNCZQPhjjgJ8pvPJxU5tO9nSvEfSiPyzTiveAcE=; b=Eh8FDhCv96+Ey7V7UswYPjXxx3kgUcbi5VicBleaJXMGM9NZU6occ06W7H3ve09xL0enkFS0U/G2FX70Lq+g+qithHzhp+BHkYN/2sW5TMM0eoNaiy62b5FIr0c4V1l7vs5W9YPyE4llHue56iA2HDImHufuaY8xO+tVBJwrcy+BKjfVuhWNjzfs1MGn0W+40u2Uq4aVAtTiY0rYeeh3hew/uRMbvyEtTpnQdbLn6GwgvWOmyhpdZAm6YkK6/ue0NmM7X+QkLaHA0TPl/+WA8snvxnY0fcJfXT2F1KUl7Xt5oNk+Wp5E1a/XCH+tAm/Mkw71jfUyOTxNxEpqLpPktQ== 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=j6BRnNCZQPhjjgJ8pvPJxU5tO9nSvEfSiPyzTiveAcE=; b=Y/WuPKsyeMSActbGnfc4QSANM9LHPfHVpd6bfNVNJvnrDy7yFPJwzJNWgPM+GDiJQFfXYe8qv8XAKwex60UDs1OEBG8gnvBtlRrW6ndcqcO+m5T3vI4GnYKbevnKLqxA+WkaNDfZrmTBSsI6Y7xYHS6HcVaOInwA+zXri+4bdDk= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oracle.com; From: Eric DeVolder To: mst@redhat.com, imammedo@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, qemu-devel@nongnu.org Subject: [PATCH v2 2/7] ACPI ERST: header file for erst Date: Mon, 8 Feb 2021 15:57:54 -0500 Message-Id: <1612817879-21511-3-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> References: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.200.23] X-ClientProxiedBy: BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8cca0781-887b-4fc2-13d7-08d8cc744111 X-MS-TrafficTypeDiagnostic: MWHPR10MB1599: 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: yEC9pdn2k1MpEtsFhZVM2dSYzDBS0oO6m2iPgyPM2eMOYcfeNNABRlG6bm/SPwJ3mkkgZUJR1+9iFjp54uBmLWLPLDG4huE7pqMJAU1AtBG4JU7i8L+A25mgNzM+h1SI/7Vfd3sBMQuuQaXuPmY0ryWYVFTFIehI8KBPj+BNtk0jf0hWZsMjLnGzbMmq/6jaOy8yUdwCU6KKmNPVfwVNcqLAAQWe7WLVPm3ETTJ0UoxseRxgc9GZ6G9QrkkdZ1Dsm5phIvNkuzuJ/9wBRHiw5appX8TNRysyb2lAGBmXrNdhQLZifqTdAejuP5QlvLOnDNGVGiFuMgpbG8c+1F1OUS4VBprl1UiNjBZA2sOEO0Zl+q7RqYusaAR5l1MwiSvLZ6DZf+MvlyoIBjs3ycmqQpj2d47tBXhWTedohrE/kRypGe5o1NNHE7fLWocShRAMt11H4std8FLQcJ8jRPIO/IHAS/BwkZF31u72xp5a8XxwfQUrA3TapXTSiuIuykzMrLwMUJ+EehL0y69IWxpva7FMO8fQfr1ckVGa/e7tEpz7EU7d4VnH9b+h6ovYS6GKXsUCFZrL2mi3RvxqtdXKIftq4eR15gshHwNRyRSpik/8W96NjpwqDasG3XzoyuLhbS+1zl5mXd5tPxYIv70g5Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(396003)(346002)(39860400002)(6666004)(4326008)(316002)(2616005)(52116002)(186003)(86362001)(36756003)(16526019)(956004)(5660300002)(478600001)(66476007)(107886003)(8936002)(26005)(66556008)(8676002)(66946007)(6486002)(2906002)(7696005)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?HESCG7RDqLYueEulU6dWnwNIp1VbxNmbsdTrd7Jrwx85CaweSAl9AACRApVB?= =?us-ascii?Q?aunoM3haVweY7s6UoWjYlJTtDnSdyCtby1YQ0d8m58fxhfkO1/Qqvhqd9n6k?= =?us-ascii?Q?0P+zvYVzjMchxL8IEigCip0itfC/HYWn05CoP/X6DSyYCCZyRVq9LVz2OBRh?= =?us-ascii?Q?j8hwKkqwaWpZuME0u2vq/UWgzl27ejh341eNBefLOqSI3HVmw+3aIYmtxxh3?= =?us-ascii?Q?x8H6h2xOY12DXAurF52NzrxNPT0XDKEC07jejRfOBuJ2oCkkF85GZhrMDjYz?= =?us-ascii?Q?bm3Bibk/Ce5sm3jN4AoczeCCfRykFB4flXrpVBXZvLBG1sjevy/dqy8oIgJ6?= =?us-ascii?Q?80LFVeDD5hqHXckEtEJr4cD+T3PXf4l97EaXfZULMrDZB50mXffLi1zJFgND?= =?us-ascii?Q?nCdDKPsCR6hsf0Tn2rB0dkvZZMnQrw2E9OkW1V9Jfiitb1VZSpAFImmG+VaH?= =?us-ascii?Q?U2qacDKudm1CYkvjantbEfX7re/Pv2pG1qmxrPLjUkR5ImuJg2r4OZhqaT6w?= =?us-ascii?Q?Y5rRRQHw2TBSI6xnnDAZrTbv5/WIoVjcg2QT7gUQALk+XMA3UlzDKhNCH/8D?= =?us-ascii?Q?AkwwWiTMtgESFhrsRMTPK1TMiC3ozUcQC9VRdghmS043zFbjRyvaFGBMDiV1?= =?us-ascii?Q?KjjbhmW1G4l/40IQ++5in7VQ10wo//TniNc+5RfgFv2/Xt3mAK9533M0y2ED?= =?us-ascii?Q?KBQsXVaR9dqmG/zgywk3UnVUjgF4M9zT9qPDU0CFh8f1J6c1X4TezgATzW8d?= =?us-ascii?Q?Eok0Kmcs2aTU1kik7c+aGJgBDR5QrGUa99+ySebWQzdOoyzjAAxqxzcDzhuV?= =?us-ascii?Q?2bxcohWZExibDNXteFHxlqDD+SigscSmtBjbpLHg/wSzTTgGlKkx9hPR8nAL?= =?us-ascii?Q?+MuIjMAkofg1mKQB3HVHjO/Whi3TXztXfmnCRnblj/ylEmcS3M+TzwM5nKgw?= =?us-ascii?Q?4IoaSrm1Cx6SKOoVdgkvRqW/enGwc/Y8ljhJXQQJJFw5329eLOFnzQ886V/Y?= =?us-ascii?Q?g29RHi1JGvWomkO69iCYonQLK2QseTV7Bos1U4NnJuMqA+3h4RBSo3xTuljL?= =?us-ascii?Q?T5KC46DOrsKsgZjNbaJbWWGLP22AAbcN2nmiNNG2jWPRHt8cBceQ+ki+mnHH?= =?us-ascii?Q?OUO16lSqhIDUWv7Hy63Jp3FAZTXFAgDsFbjYz/Q62qpwJ3eebhsI1choUa5a?= =?us-ascii?Q?jE668lkxs+SPjkCEK59AJ+T9u2MGhNVkchaWridML0Bv3zKSSbuWHnHrWN0y?= =?us-ascii?Q?98pcIVq4NQMvefhi7mbKmBhmyALM+ivNL3MWFX8uZEgw4GPOx5SfiHXWnOab?= =?us-ascii?Q?yL2ZXn+9uuLxOSKsOP77mP3Y?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cca0781-887b-4fc2-13d7-08d8cc744111 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 20:58:15.4578 (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: 9wuZxZKf58X8+FF4SrUyBUY87tF2sad0Ps1E3QraRpyuoCcY7/BXNfFF1zWhluVKmFGNOhajH5KHdl4/eys08aP6ui/ROuu4E4mlp+mC6gI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1599 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 impostorscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=141.146.126.78; envelope-from=eric.devolder@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: boris.ostrovsky@oracle.com, kwilk@oracle.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This change introduces the defintions for ACPI ERST support. Signed-off-by: Eric DeVolder Suggested-by: Konrad Wilk --- include/hw/acpi/erst.h | 77 ++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 77 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..be9b3fa --- /dev/null +++ b/include/hw/acpi/erst.h @@ -0,0 +1,77 @@ +/* + * 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, hwaddr base); + +#define TYPE_ACPI_ERST "acpi-erst" + +#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 + --=20 1.8.3.1 From nobody Fri May 17 07:55:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1612830854; cv=pass; d=zohomail.com; s=zohoarc; b=E/KXib4Ticiu2PLFP06C5doFVOfPDNIS8h9rCZbc5mxRzjy7GqQeJwX4mBtSbgOQRnwHPkeaUax/SuJTE0GVzij7gJk8ZeY5vzn/y3QNFvhXbPn9n9aXYDFyHFTESZ3kA0vkZveh3hcSyJ8F5YVchILcGoPZ6OOwMGCKim1eIbs= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612830854; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=T0GyGeaqVtGEmoALF8F7WGnLy1pGaoAr8R0iSGVV0Bg=; b=K2U0CY2Hi4OhvSEuSIdciclMszVJtJ9Q/CWFAs7uNohQv7p6ZvN6r+j8+6+pFzis2yxcRA9SBmsoaaomnhJNem3bkD1qB/1Ya2XWTJ+IxLi6lZ+NWuH6/HYeGPTGQIadxg2RPLEMakIZSVq55vCD9CEqcKuzm2+EgfAl8keTTh4= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612830854904267.99549719078016; Mon, 8 Feb 2021 16:34:14 -0800 (PST) Received: from localhost ([::1]:54822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Gyq-0006ZJ-JY for importer@patchew.org; Mon, 08 Feb 2021 19:34:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dc6-0000p4-PS for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:30 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:44682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dbz-0002k3-Ca for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:29 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118KvJZv137457; Mon, 8 Feb 2021 20:58:21 GMT Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 36hkrmware-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:20 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118K5LP7020761; Mon, 8 Feb 2021 20:58:19 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2102.outbound.protection.outlook.com [104.47.55.102]) by aserp3020.oracle.com with ESMTP id 36j510b3c5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:19 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1599.namprd10.prod.outlook.com (2603:10b6:300:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20; Mon, 8 Feb 2021 20:58:17 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2%7]) with mapi id 15.20.3825.030; Mon, 8 Feb 2021 20:58:17 +0000 Received: from ban25x6uut23.us.oracle.com (138.3.200.23) by BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.21 via Frontend Transport; Mon, 8 Feb 2021 20:58:15 +0000 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=T0GyGeaqVtGEmoALF8F7WGnLy1pGaoAr8R0iSGVV0Bg=; b=eObwb2l8UcyR5Bv8/WcxvS0CWvPDIAw80khi9PTEUQ11i4muEOKyGoCXhTKVe0upDQIL yYy8zD8BRSZ9kBitabKWeptZC9ykzYUcIKXT80/BO7wJiG0RXNJRqsM8W57mmK3HeOUy NGyHkSvFz6MYQMHW42pCktPJreM2hcfMBnCJkb+r9PO51304g1tmgipXjJNXbbTlPfV/ RhJraxdQonXNxp+W/aIPPQihh4tHyS5RKGObknPd8tvOeTXxFjM51SUbxk5kKNl1VmvP VS6SoK4K7PbH7EtRByKb93GJv8vZvv+ZVas1ZCooAgR8ozwd4nEs5DTgA9RWjRmlIR03 ig== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mFdwR2c6nTHfCCwbKmavzsPPcwiotbUW3ei3TgyLR76TKa6MbisMTXyRQLec8mDPWDf/JwDIoVs/hILncNwm735RzG1+cFcCnOE3P4YseMA5GqPk7x+osk3z1Ue60qrYuIS3MNqoRdU3t9XWZu80FiRM9O2vB+w0LHAlYW97cVftTGIE6qWiAkcURtMZ7aQacY/sWY9PNOJ1uN0YeWF1kgmc1smROWp++Q4ck3ifsqrLp6BmRUSDEOt2lbrqoJsfY2zihvJ5WPAHevRgq/ilyKvcKeDtj1ip9Ld5afdYMrvFJYfxKFDUEe01ttryl2gji3azdE2k/uLYpifvd8oYdw== 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=T0GyGeaqVtGEmoALF8F7WGnLy1pGaoAr8R0iSGVV0Bg=; b=hViQrVC0Q3TkFLSqYzCAQ6puZJtWlS6iJGZUSd+kdxNsL15GtLu/JnNp/y0JBDgH2L2viiuAjR40Qgls4wIefdxJ6va1YnYa12Hhe6w1CYiU0by8HMyjkUq3/MmxdNF9l/uoJHjofy8J2ckR47YQJO5MXh12dt+wCdgUN2HtvSQjp0mQwyBkZJGyhOpoHxA5jej4d+nenU6Jn6eIgQukdTXz+8M973DIq8O95+qEF1A2BP5FHerNFNT6fvedvjU5rnE8wdxQWcgs2sBiPPwUCWUXsT58iouEmU39nhnb+wv0jNjLBhPrS1m2DTU7823OYxu+5CVmC/zTkLeUG4LYaw== 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=T0GyGeaqVtGEmoALF8F7WGnLy1pGaoAr8R0iSGVV0Bg=; b=OXJUm9Pc6ocSMpQx5Jlob37BjnZ2grsEkOooH0FOrqzoqYkx2I7xnPOimIi1s7qCp8FpRhRvaDe+Nx7e+MEu0SVfZQtMo4fLh8zc7St1sSCuB7rN2y4REsjVQcj3flBU2jLCVTDmpSPbC3ZcK5ocP7EPrfKXz4cqIrw672//zBA= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oracle.com; From: Eric DeVolder To: mst@redhat.com, imammedo@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, qemu-devel@nongnu.org Subject: [PATCH v2 3/7] ACPI ERST: support for ACPI ERST feature Date: Mon, 8 Feb 2021 15:57:55 -0500 Message-Id: <1612817879-21511-4-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> References: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.200.23] X-ClientProxiedBy: BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a199c2cc-7b0d-4a6d-700c-08d8cc7441f3 X-MS-TrafficTypeDiagnostic: MWHPR10MB1599: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 17CGgo1hWf6hjsl5kvU7pgRr+WhsgG6L4/OC34u808tzAq7gz+lYeM83Qiq+kN7bUTPLncN8cGyV5zlhoJZPLiXx9QLV5xpwrONqk35iXEQZCGhenVk6mDdA39vwKRNVNF4wSemZTKGhyIM6OeyvJVFY4XK5lGb1YfhMMHqDiPlqePasc0KkplepdFmIIvo81+doqVwFSDafQD/jl9IUEKPmKe4arkxMRFjMIE/vHuTZQrgDk2mOSJUAAsDeoyDf12kGtMp+cT/iMhQpyDVYO92EMLfdU/piipKdJeXUfkzVCIPBdqSea3w8dJ7Mo/5Wc9UB9eUlMbGGL1Hym3AWkXncitmA/keZqWAd2wl0Xet+COwQzsxnMFPFiVkmAF0mxSD8JksZoz7fP7Tm6DzU5pHysB0NwxCnXN1mL0hl9j0GemXK4fymqseubtk1VQCIiEEy3yrxgp05JQHaF6EK1Q8pvZs6L+JgMtWz+39v5ch4YRFc/LVl/3EJC9FyEu3YWS1FCjKqXsQta4MHxHbVXZlo/32Sz7CG/iI17IaGSr2SCACbnldP/PEQ1i0rZEoTJxrUFbwlud0J1MSajw4j88FhXCz0kKbovw1g2lbJw00OJ4UvVY6wUgsCVsAWToFFaRve+sc/YJJn1QjzsLATsw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(396003)(346002)(39860400002)(6666004)(4326008)(316002)(2616005)(52116002)(186003)(86362001)(30864003)(36756003)(16526019)(956004)(966005)(5660300002)(478600001)(66476007)(83380400001)(107886003)(8936002)(26005)(66556008)(8676002)(66946007)(6486002)(2906002)(7696005)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?rhUt4XesUhB1KVLNmYFUhh2mSu5BfqkwUGrTAEKYmUDAKGXBWBtmlxEBUydE?= =?us-ascii?Q?pU0mqkYrKq5Orj0nHd85K/CWOne+cev9xQTb35A4+RecO1hGX3PuLfUen9iL?= =?us-ascii?Q?mARPEC+Y6++Nz+H4TBXyBJTuJGp7EI4iKJU+xBfIWW+dTuWcIleknP9wxGpU?= =?us-ascii?Q?DNfrsnZiWjFaQmvy20+r++fBK34uK1ioaIwWiHim8VN486ot3JtYItQfTdF0?= =?us-ascii?Q?FMVNk9PUQUAehm7flqsdZBkj2pxWUVfCPGVr3/Zh69kAuj0aEG430wVU1AgL?= =?us-ascii?Q?GD0KXVMyiL91KsFdafg67IGmodnLRViylCtZUPZxzftQhwnWUg0xZwUlo4Gp?= =?us-ascii?Q?Ta+qSciNakD/dc2b5lbhCPndotfQ6R+QZxviDu7vWfL/6zlaq+oqF371Uf/E?= =?us-ascii?Q?VlWIRtxT/mK/0EgWDvDq8flDQD/0PIf13dJgC+qvH5Qg5azdaqrL2i69VKpO?= =?us-ascii?Q?AtZtlZTIflho2duXAJ6SKzs+7rVJlMAmpFXzyiHdLuuxWzLEG37P0kKRyDye?= =?us-ascii?Q?2sogqVkrD9QlDAvIErlbfSMdQPa6kpZHQJ2MuO5XZzIqhWVDki+Uc4W8iNV4?= =?us-ascii?Q?lD1mCDRtMUqvfeqGkJDjfP398IrEdLHcU2oExJ28Qkg9K5dvfWlgYh/OEy14?= =?us-ascii?Q?3rxq/H/kIORrFxa+i4kjOw+869VioRBM8FqlxG9KVCyivoQKvKJXntSZR7i4?= =?us-ascii?Q?rwVLnzOEiAWkOfr6TuFaevGcFYx2wkwGzoWrvfcebdvI0guoV4h7G9iO7UjV?= =?us-ascii?Q?IOaJhmlHpH6FBKiK5Z1PGV/EQhHjoLrcgGMP+m+qkakcC2F7GT6aKTxlm2+d?= =?us-ascii?Q?UK5YTvAYPlUfuQvGF4jhBA7CHU3qSJ/9qnItMFsqzPS3s1elIq9DD6NPNr0Y?= =?us-ascii?Q?Hg7Zx8q7N8lJO2yaRUoELKsOe3l+0PIW15QDhc5H1uWSwEtdyQgfPm/a28Ec?= =?us-ascii?Q?3jHNsIYO0geTuTDB53aM5Ur4yLcg9oITJDU18RUKFv6l1LE1/lLlo0XjV4KS?= =?us-ascii?Q?cFF4b7alOeznT1RmrYyvw/sUjut8Ru+wYMYqmc07wgISnc4hQBxB93FE8qFp?= =?us-ascii?Q?nvHatNa8dA72qtDYU+hrt1Z5qLezflXq8C45jm1GTcjYq4fVlbv6ogQi3Rjk?= =?us-ascii?Q?DT14NRuai8d/oPPes2Hxi1XIPLZPALZfXnMGvyEeQFXkc2xHAfUbV6wbRhni?= =?us-ascii?Q?c7o9M4VLKvCqSeOlIcC5a7uy3nzPAf4HUEy9OXpqmOXilYnov6DXcpOrFAGt?= =?us-ascii?Q?uYVXxYx70+B6kmoKmfoXivhruwmRlCu2pSNtAUq3MCLKdwRjoA1Ic0Lm6dfM?= =?us-ascii?Q?qlicLxFL9AO6Z0FXqBahJ08h?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a199c2cc-7b0d-4a6d-700c-08d8cc7441f3 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 20:58:16.9104 (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: WcYJ5pZf5tXdk9ckMOTusoU2DFJ7XhFQSLhznNosLbgXox04KaJRHXSbZnErhw2zSA28fQFy70OMC304a1iaSvuleMOvGzZ0pBUinocnCFg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1599 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 spamscore=0 impostorscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=156.151.31.85; envelope-from=eric.devolder@oracle.com; helo=userp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: boris.ostrovsky@oracle.com, kwilk@oracle.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 delared via the QEMU global parameter acpi-erst.filename. 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 Suggested-by: Konrad Wilk --- hw/acpi/erst.c | 952 +++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 952 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..3a342f9 --- /dev/null +++ b/hw/acpi/erst.c @@ -0,0 +1,952 @@ +/* + * 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 + */ + +#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 "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] =3D=3D 'C') && \ + ((ptr)[1] =3D=3D 'P') && \ + ((ptr)[2] =3D=3D 'E') && \ + ((ptr)[3] =3D=3D '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 ERST_BACKING_FILE_MODE 0644 /* S_IRWXU|S_IRWXG */ + +#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) + +static hwaddr erst_base; + +typedef struct { + SysBusDevice parent_obj; + + MemoryRegion iomem; + uint32_t prop_size; + char *prop_filename; + hwaddr base; + + 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 buf= fer */ + uint8_t *nvram; /* persistent storage, of length prop_size */ + +} ERSTDeviceState; + +static void update_erst_backing_file(ERSTDeviceState *s, + off_t offset, const uint8_t *data, size_t length) +{ + int fd; + + /* Bounds check */ + if ((offset + length) > s->prop_size) { + error_report("update: off 0x%lx len 0x%lx > size 0x%lx out of rang= e", + (long)offset, (long)length, (long)s->prop_size); + return; + } + + fd =3D open(s->prop_filename, O_WRONLY | O_CREAT, ERST_BACKING_FILE_MO= DE); + if (fd > 0) { + off_t src; + size_t wrc =3D 0; + src =3D lseek(fd, offset, SEEK_SET); + if (offset =3D=3D src) { + wrc =3D write(fd, data, length); + } + if ((offset !=3D src) || (length !=3D wrc)) { + error_report("ERST write failed: %d %d", (int)wrc, (int)length= ); + } + close(fd); + } else { + error_report("open failed: %s : %d", s->prop_filename, fd); + } +} + +static unsigned copy_from_nvram_by_index(ERSTDeviceState *s, unsigned inde= x) +{ + /* Read a nvram[] entry into tmp_record */ + unsigned rc =3D ACPI_ERST_STATUS_FAILED; + off_t offset =3D (index * ERST_RECORD_SIZE); + + if ((offset + ERST_RECORD_SIZE) <=3D s->prop_size) { + memcpy(s->tmp_record, &s->nvram[offset], ERST_RECORD_SIZE); + rc =3D 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 =3D ACPI_ERST_STATUS_FAILED; + off_t offset =3D (index * ERST_RECORD_SIZE); + + if ((offset + ERST_RECORD_SIZE) <=3D s->prop_size) { + memcpy(&s->nvram[offset], s->tmp_record, ERST_RECORD_SIZE); + update_erst_backing_file(s, offset, s->tmp_record, ERST_RECORD_SIZ= E); + rc =3D 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 =3D -1; + int empty_index =3D -1; + int index =3D 0; + unsigned rrc; + + *record_found =3D 0; + + do { + rrc =3D copy_from_nvram_by_index(s, (unsigned)index); + if (rrc =3D=3D ACPI_ERST_STATUS_SUCCESS) { + uint64_t this_identifier; + this_identifier =3D THE_UEFI_CPER_RECORD_ID(s->tmp_record); + if (IS_UEFI_CPER_RECORD(s->tmp_record) && + (this_identifier =3D=3D record_identifier)) { + rc =3D index; + *record_found =3D 1; + break; + } + if ((this_identifier =3D=3D ERST_INVALID_RECORD_ID) && + (empty_index < 0)) { + empty_index =3D index; /* first available for write */ + } + } + ++index; + } while (rrc =3D=3D ACPI_ERST_STATUS_SUCCESS); + + /* Record not found, allocate for writing */ + if ((rc < 0) && alloc_for_write) { + rc =3D empty_index; + } + + return rc; +} + +static unsigned clear_erst_record(ERSTDeviceState *s) +{ + unsigned rc =3D ACPI_ERST_STATUS_RECORD_NOT_FOUND; + bool record_found; + int index; + + index =3D lookup_erst_record_by_identifier(s, + s->record_identifier, &record_found, 0); + if (record_found) { + memset(s->tmp_record, 0xFF, ERST_RECORD_SIZE); + rc =3D copy_to_nvram_by_index(s, (unsigned)index); + if (rc =3D=3D ACPI_ERST_STATUS_SUCCESS) { + s->record_count -=3D 1; + } + } + + return rc; +} + +static unsigned write_erst_record(ERSTDeviceState *s) +{ + unsigned rc =3D ACPI_ERST_STATUS_FAILED; + + if (s->record_offset < (ERST_RECORD_SIZE - UEFI_CPER_RECORD_MIN_SIZE))= { + uint64_t record_identifier; + uint8_t *record =3D &s->record[s->record_offset]; + bool record_found; + int index; + + record_identifier =3D (s->record_identifier =3D=3D ERST_INVALID_RE= CORD_ID) + ? THE_UEFI_CPER_RECORD_ID(record) : s->record_identifier; + + index =3D lookup_erst_record_by_identifier(s, + record_identifier, &record_found, 1); + if (index < 0) { + rc =3D ACPI_ERST_STATUS_NOT_ENOUGH_SPACE; + } else { + if (0 !=3D 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_off= set); + rc =3D copy_to_nvram_by_index(s, (unsigned)index); + if (rc =3D=3D ACPI_ERST_STATUS_SUCCESS) { + if (!record_found) { /* not overwriting existing record */ + s->record_count +=3D 1; /* writing new record */ + } + } + } + } + + return rc; +} + +static unsigned next_erst_record(ERSTDeviceState *s, + uint64_t *record_identifier) +{ + unsigned rc =3D ACPI_ERST_STATUS_RECORD_NOT_FOUND; + unsigned index; + unsigned rrc; + + *record_identifier =3D ERST_INVALID_RECORD_ID; + + index =3D s->next_record_index; + do { + rrc =3D copy_from_nvram_by_index(s, (unsigned)index); + if (rrc =3D=3D ACPI_ERST_STATUS_SUCCESS) { + if (IS_UEFI_CPER_RECORD(s->tmp_record)) { + s->next_record_index =3D index + 1; /* where to start next= time */ + *record_identifier =3D THE_UEFI_CPER_RECORD_ID(s->tmp_reco= rd); + rc =3D ACPI_ERST_STATUS_SUCCESS; + break; + } + ++index; + } else { + if (s->next_record_index =3D=3D 0) { + rc =3D ACPI_ERST_STATUS_RECORD_STORE_EMPTY; + } + s->next_record_index =3D 0; /* at end, reset */ + } + } while (rrc =3D=3D ACPI_ERST_STATUS_SUCCESS); + + return rc; +} + +static unsigned read_erst_record(ERSTDeviceState *s) +{ + unsigned rc =3D ACPI_ERST_STATUS_RECORD_NOT_FOUND; + bool record_found; + int index; + + index =3D lookup_erst_record_by_identifier(s, + s->record_identifier, &record_found, 0); + if (record_found) { + rc =3D copy_from_nvram_by_index(s, (unsigned)index); + if (rc =3D=3D 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 */ + off_t offset; + + s->record_count =3D 0; + offset =3D 0; + do { + uint8_t *ptr =3D &s->nvram[offset]; + uint64_t record_identifier =3D THE_UEFI_CPER_RECORD_ID(ptr); + if (IS_UEFI_CPER_RECORD(ptr) && + (ERST_INVALID_RECORD_ID !=3D record_identifier)) { + s->record_count +=3D 1; + } + offset +=3D ERST_RECORD_SIZE; + } while (offset < (off_t)s->prop_size); + + return s->record_count; +} + +static void load_erst_backing_file(ERSTDeviceState *s) +{ + int fd; + struct stat statbuf; + + erst_debug("+load_erst_backing_file()\n"); + + /* Allocate and initialize nvram[] */ + s->nvram =3D g_malloc(s->prop_size); + memset(s->nvram, 0xFF, s->prop_size); + + /* Ensure backing file at least same as prop_size */ + if (stat(s->prop_filename, &statbuf) =3D=3D 0) { + /* ensure prop_size at least matches file size */ + if (statbuf.st_size < s->prop_size) { + /* Ensure records are ERST_INVALID_RECORD_ID */ + memset(s->nvram, 0xFF, s->prop_size - statbuf.st_size); + update_erst_backing_file(s, + statbuf.st_size, s->nvram, s->prop_size - statbuf.st_size); + } + } + + /* Pre-load nvram[] from backing file, if present */ + fd =3D open(s->prop_filename, O_RDONLY, ERST_BACKING_FILE_MODE); + if (fd > 0) { + size_t rrc =3D read(fd, s->nvram, s->prop_size); + (void)rrc; + close(fd); + /* + * If existing file is smaller than prop_size, it will be resized + * accordingly upon subsequent record writes. If the file + * is larger than prop_size, only prop_size bytes are utilized, + * the extra bytes are untouched (though will be lost after + * a migration when the backing file is re-written as length + * of prop_size bytes). + */ + } else { + /* Create empty backing file */ + update_erst_backing_file(s, 0, s->nvram, s->prop_size); + } + + /* Initialize record_count */ + get_erst_record_count(s); + + erst_debug("-load_erst_backing_file() %d\n", 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 =3D=3D sizeof(uint64_t)) { + /* 64b access */ + mask =3D 0xFFFFFFFFFFFFFFFFUL; + shift =3D 0; + } else { + /* 32b access */ + mask =3D 0x00000000FFFFFFFFUL; + shift =3D ((addr & 0x4) =3D=3D 0x4) ? 32 : 0; + } + + rdval =3D reg; + rdval >>=3D shift; + rdval &=3D 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 =3D=3D sizeof(uint64_t)) { + /* 64b access */ + mask =3D 0xFFFFFFFFFFFFFFFFUL; + shift =3D 0; + } else { + /* 32b access */ + mask =3D 0x00000000FFFFFFFFUL; + shift =3D ((addr & 0x4) =3D=3D 0x4) ? 32 : 0; + } + + val &=3D mask; + val <<=3D shift; + mask <<=3D shift; + wrval =3D reg; + wrval &=3D ~mask; + wrval |=3D val; + + return wrval; +} + +static void erst_write(void *opaque, hwaddr addr, + uint64_t val, unsigned size) +{ + ERSTDeviceState *s =3D (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 %10s val %016lx sz %u", + addr, erst_reg(addr), val, size); + /* The REGISTER region */ + switch (addr) { + case ERST_CSR_VALUE + 0: + case ERST_CSR_VALUE + 4: + s->reg_value =3D 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 =3D val; + break; + case ACPI_ERST_ACTION_SET_RECORD_OFFSET: + s->record_offset =3D s->reg_value; + break; + case ACPI_ERST_ACTION_EXECUTE_OPERATION: + if ((uint8_t)s->reg_value =3D=3D ERST_EXECUTE_OPERATION_MA= GIC) { + s->busy_status =3D 1; + switch (s->operation) { + case ACPI_ERST_ACTION_BEGIN_WRITE_OPERATION: + s->command_status =3D write_erst_record(s); + break; + case ACPI_ERST_ACTION_BEGIN_READ_OPERATION: + s->command_status =3D read_erst_record(s); + break; + case ACPI_ERST_ACTION_BEGIN_CLEAR_OPERATION: + s->command_status =3D clear_erst_record(s); + break; + case ACPI_ERST_ACTION_BEGIN_DUMMY_WRITE_OPERATION: + s->command_status =3D ACPI_ERST_STATUS_SUCCESS; + break; + case ACPI_ERST_ACTION_END_OPERATION: + s->command_status =3D ACPI_ERST_STATUS_SUCCESS; + break; + default: + s->command_status =3D ACPI_ERST_STATUS_FAILED; + break; + } + s->record_identifier =3D ERST_INVALID_RECORD_ID; + s->busy_status =3D 0; + } + break; + case ACPI_ERST_ACTION_CHECK_BUSY_STATUS: + s->reg_value =3D s->busy_status; + break; + case ACPI_ERST_ACTION_GET_COMMAND_STATUS: + s->reg_value =3D s->command_status; + break; + case ACPI_ERST_ACTION_GET_RECORD_IDENTIFIER: + s->command_status =3D next_erst_record(s, &s->reg_value); + break; + case ACPI_ERST_ACTION_SET_RECORD_IDENTIFIER: + s->record_identifier =3D s->reg_value; + break; + case ACPI_ERST_ACTION_GET_RECORD_COUNT: + s->reg_value =3D s->record_count; + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE: + s->reg_value =3D s->base + ERST_REG_LEN; + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_LENGTH: + s->reg_value =3D ERST_RECORD_SIZE; + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES: + s->reg_value =3D 0; /* correct/intended value */ + break; + case ACPI_ERST_ACTION_GET_EXECUTE_OPERATION_TIMINGS: + /* + * 100UL is max, 10UL is nominal + */ + s->reg_value =3D ((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 =3D addr - ERST_REG_LEN; + uint8_t *ptr =3D &s->record[offset]; + switch (size) { + default: + case sizeof(uint8_t): + *(uint8_t *)ptr =3D (uint8_t)val; + break; + case sizeof(uint16_t): + *(uint16_t *)ptr =3D (uint16_t)val; + break; + case sizeof(uint32_t): + *(uint32_t *)ptr =3D (uint32_t)val; + break; + case sizeof(uint64_t): + *(uint64_t *)ptr =3D (uint64_t)val; + break; + } + } +} + +static uint64_t erst_read(void *opaque, hwaddr addr, + unsigned size) +{ + ERSTDeviceState *s =3D (ERSTDeviceState *)opaque; + uint64_t val =3D 0; + + if (addr < ERST_REG_LEN) { + switch (addr) { + case ERST_CSR_ACTION + 0: + case ERST_CSR_ACTION + 4: + val =3D erst_rd_reg64(addr, s->reg_action, size); + break; + case ERST_CSR_VALUE + 0: + case ERST_CSR_VALUE + 4: + val =3D erst_rd_reg64(addr, s->reg_value, size); + break; + default: + break; + } + erst_debug("ERST read %016lx %10s val %016lx sz %u\n", + addr, erst_reg(addr), val, size); + } else { + /* + * The RECORD region + */ + uint8_t *ptr =3D &s->record[addr - ERST_REG_LEN]; + switch (size) { + default: + case sizeof(uint8_t): + val =3D *(uint8_t *)ptr; + break; + case sizeof(uint16_t): + val =3D *(uint16_t *)ptr; + break; + case sizeof(uint32_t): + val =3D *(uint32_t *)ptr; + break; + case sizeof(uint64_t): + val =3D *(uint64_t *)ptr; + break; + } + } + erst_debug("ERST read %016lx %10s val %016lx sz %u\n", + addr, erst_reg(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 =3D 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 =3D 1; + break; + case 16: + access_width =3D 2; + break; + case 32: + access_width =3D 3; + break; + case 64: + access_width =3D 4; + break; + default: + access_width =3D 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 =3D { + .read =3D erst_read, + .write =3D erst_write, + .endianness =3D DEVICE_NATIVE_ENDIAN, +}; + +void build_erst(GArray *table_data, BIOSLinker *linker, hwaddr base) +{ + unsigned action, insns =3D 0; + unsigned erst_start =3D table_data->len; + unsigned iec_offset =3D 0; + + /* 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 =3D 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 =3D 0; action < ACPI_ERST_MAX_ACTIONS; ++action) { + switch (action) { + case ACPI_ERST_ACTION_BEGIN_WRITE_OPERATION: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_BEGIN_READ_OPERATION: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_BEGIN_CLEAR_OPERATION: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_END_OPERATION: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_SET_RECORD_OFFSET: + insns +=3D BEA(WRITE_REGISTER , 0, 32, + ERST_CSR_VALUE , 0, MASK32); + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_EXECUTE_OPERATION: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_VALUE , ERST_EXECUTE_OPERATION_MAGIC, MASK8); + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_CHECK_BUSY_STATUS: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns +=3D BEA(READ_REGISTER_VALUE , 0, 32, + ERST_CSR_VALUE, 0x01, MASK8); + break; + case ACPI_ERST_ACTION_GET_COMMAND_STATUS: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns +=3D BEA(READ_REGISTER , 0, 32, + ERST_CSR_VALUE, 0, MASK8); + break; + case ACPI_ERST_ACTION_GET_RECORD_IDENTIFIER: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns +=3D BEA(READ_REGISTER , 0, 64, + ERST_CSR_VALUE, 0, MASK64); + break; + case ACPI_ERST_ACTION_SET_RECORD_IDENTIFIER: + insns +=3D BEA(WRITE_REGISTER , 0, 64, + ERST_CSR_VALUE , 0, MASK64); + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_GET_RECORD_COUNT: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns +=3D BEA(READ_REGISTER , 0, 32, + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_BEGIN_DUMMY_WRITE_OPERATION: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_RESERVED: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns +=3D BEA(READ_REGISTER , 0, 64, + ERST_CSR_VALUE, 0, MASK64); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_LENGTH: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns +=3D BEA(READ_REGISTER , 0, 64, + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns +=3D BEA(READ_REGISTER , 0, 32, + ERST_CSR_VALUE, 0, MASK32); + break; + case ACPI_ERST_ACTION_GET_EXECUTE_OPERATION_TIMINGS: + insns +=3D BEA(WRITE_REGISTER_VALUE, 0, 32, + ERST_CSR_ACTION, action, MASK8); + insns +=3D BEA(READ_REGISTER , 0, 64, + ERST_CSR_VALUE, 0, MASK64); + default: + insns +=3D 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) =3D cpu_to_le32(insns); + + build_header(linker, table_data, + (void *)(table_data->data + erst_start), + "ERST", table_data->len - erst_start, + 1, NULL, NULL); + + if (erst_base =3D=3D 0) { + /* + * This ACPI routine is invoked twice, but this code + * snippet needs to happen just once. + * And this code in erst_class_init() is too early. + */ + DeviceState *dev; + SysBusDevice *s; + + dev =3D qdev_new(TYPE_ACPI_ERST); + erst_debug("qdev_create dev %p\n", dev); + s =3D SYS_BUS_DEVICE(dev); + sysbus_realize_and_unref(s, &error_fatal); + + ACPIERST(dev)->base =3D base; + sysbus_mmio_map(s, 0, base); + erst_base =3D base; + erst_debug("erst_base %lx\n", base); + } +} + +/*******************************************************************/ +/*******************************************************************/ +static int erst_post_load(void *opaque, int version_id) +{ + ERSTDeviceState *s =3D opaque; + erst_debug("+erst_post_load(%d)\n", version_id); + /* Ensure nvram[] persists into backing file */ + update_erst_backing_file(s, 0, s->nvram, s->prop_size); + erst_debug("-erst_post_load()\n"); + return 0; +} + +static const VMStateDescription erst_vmstate =3D { + .name =3D "acpi-erst", + .version_id =3D 1, + .minimum_version_id =3D 1, + .post_load =3D erst_post_load, + .fields =3D (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_VARRAY_UINT32(nvram, ERSTDeviceState, prop_size, 0, + vmstate_info_uint8, uint8_t), + VMSTATE_END_OF_LIST() + } +}; + +static void erst_realizefn(DeviceState *dev, Error **errp) +{ + SysBusDevice *d =3D SYS_BUS_DEVICE(dev); + ERSTDeviceState *s =3D ACPIERST(dev); + + erst_debug("+erst_realizefn()\n"); + if (!s->prop_filename) { + s->prop_filename =3D (char *)(TYPE_ACPI_ERST ".backing"); + } + + if (!s->prop_filename) { + error_setg(errp, "'filename' property is not set"); + return; + } + + if (!(s->prop_size > ERST_RECORD_SIZE) && + (s->prop_size <=3D 0x04000000)) { + error_setg(errp, "'size' property %d is not set properly", + s->prop_size); + return; + } + + /* Convert prop_size to integer multiple of ERST_RECORD_SIZE */ + s->prop_size -=3D (s->prop_size % ERST_RECORD_SIZE); + + load_erst_backing_file(s); + + erst_debug("filename %s\n", s->prop_filename); + erst_debug("size %x\n", s->prop_size); + + 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 =3D ACPIERST(dev); + + erst_debug("+erst_unrealizefn()\n"); + if (s->nvram) { + /* Ensure nvram[] persists into backing file */ + update_erst_backing_file(s, 0, s->nvram, s->prop_size); + g_free(s->nvram); + s->nvram =3D NULL; + } + erst_debug("-erst_unrealizefn()\n"); +} + +static void erst_reset(DeviceState *dev) +{ + ERSTDeviceState *s =3D ACPIERST(dev); + + erst_debug("+erst_reset(%p) %d\n", s, s->record_count); + s->operation =3D 0; + s->busy_status =3D 0; + s->command_status =3D ACPI_ERST_STATUS_SUCCESS; + /* indicate empty/no-more until further notice */ + s->record_identifier =3D ERST_INVALID_RECORD_ID; + s->record_offset =3D 0; + s->next_record_index =3D 0; + /* NOTE: record_count and nvram[] are initialized elsewhere */ + erst_debug("-erst_reset()\n"); +} + +static Property erst_properties[] =3D { + DEFINE_PROP_UINT32("size", ERSTDeviceState, prop_size, 0x00010000), + DEFINE_PROP_STRING("filename", ERSTDeviceState, prop_filename), + DEFINE_PROP_END_OF_LIST(), +}; + +static void erst_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + + erst_debug("+erst_class_init()\n"); + dc->realize =3D erst_realizefn; + dc->unrealize =3D erst_unrealizefn; + dc->reset =3D erst_reset; + dc->vmsd =3D &erst_vmstate; + device_class_set_props(dc, erst_properties); + dc->desc =3D "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 =3D { + .name =3D TYPE_ACPI_ERST, + .parent =3D TYPE_SYS_BUS_DEVICE, + .class_init =3D erst_class_init, + .instance_size =3D sizeof(ERSTDeviceState), +}; + +static void erst_register_types(void) +{ + type_register_static(&erst_type_info); +} + +type_init(erst_register_types) --=20 1.8.3.1 From nobody Fri May 17 07:55:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1612825801; cv=pass; d=zohomail.com; s=zohoarc; b=O/RCbawpwcmtOxO6cGK4kbNSlMMuA9Xm7CJYEH/9SiOo39ZebZUqXEyN6GsZg3Hh+BuGdEtr+kFnSuJOharYq8ksDxC59ynNbuHEq8rmQsgdSMhT1pszwt9E7kAAHhHdpYBov8P+tIluJzQTK44e7M7+E/6k8LtKgamxzyu088E= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612825801; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PUkdIudox1n3NAqeXy3J/sh1lZ+ikVPvNiW5dwu3ih0=; b=aBqXlwYAom2JUqNmarHjYW9NIz/X7bzQCw/gxBPGDpEMc/OmW0EWIja4VItp1DN5xk0JL7fRtfSHRzHkb1GaK4J5/eOYBp4pS1D66Civ+l0ecbAvh/Gl0nRY34sjs9HqRLvT3yneoVgop2598CbapSVpTlfjOsxl7e8i/Y9iOoI= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612825801924880.2042283148039; Mon, 8 Feb 2021 15:10:01 -0800 (PST) Received: from localhost ([::1]:47292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9FfM-0000Vj-Qb for importer@patchew.org; Mon, 08 Feb 2021 18:10:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dc3-0000np-Co for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:28 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:56754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dbz-0002k7-J7 for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:26 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118KuPBg009595; Mon, 8 Feb 2021 20:58:21 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 36hk2kdc64-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:21 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118K5rqi157115; Mon, 8 Feb 2021 20:58:21 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2102.outbound.protection.outlook.com [104.47.55.102]) by aserp3030.oracle.com with ESMTP id 36j4pmtykn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:21 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1599.namprd10.prod.outlook.com (2603:10b6:300:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20; Mon, 8 Feb 2021 20:58:18 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2%7]) with mapi id 15.20.3825.030; Mon, 8 Feb 2021 20:58:18 +0000 Received: from ban25x6uut23.us.oracle.com (138.3.200.23) by BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.21 via Frontend Transport; Mon, 8 Feb 2021 20:58:17 +0000 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=PUkdIudox1n3NAqeXy3J/sh1lZ+ikVPvNiW5dwu3ih0=; b=gQ2X4SpF6peF0AuL70KAopKvIKAWnOVYpmC+ZU0cgSsc2N6/9ICXMrc7mCfjLogLeAU0 t+/Kk3LDshUdssOC+tKOs4ZM5ylHi8bhgIDRfw/v/9bG9rxShIsind1A5a94xePnNRh/ 8NYaUhZMFbP2l99BNeB6eHCI/sJZzFfyX5H5+I/jyayzeRTmWvi4AlADy+jCeXA9cst5 Ff7u3/RDbJA9E52R1cEqZTdqHIaNm5bI762w7moSVIQs9Dn4AcMN2DYvoS2bRlGpmxKd 6V/3bhKlyx/JS5F2TXW21sV7O+GjVMrsLFvFY+KW4DG7kEDjcvGSxNE+APZtTIBOvT9F XQ== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OQbu6iiE+eVcSGZiYOzDj/5gCZr48NBtxhB/3bF+C1/Kj3jCTpPRNgKcrVuB/UV+Rk9BZnrhsyFQCYA/HbY27WyBQJPPFor7P2nJGXLWzXzhEZZVL/kvrwVsywb40ZbTL1eaaR/9lgHqGGvJERtVz6/rSl/5uja7zVR7a2Z/+z+PsLCMy1x6bhetRf5rOpEHxa8GmghP6ru0tGEQmgL+EMyv8oEv+XDcXAS4nE3KPSEFeoTFYAZIA5G1TFFIYusvma1j1hHiaybvJefGIsBhl1DTlDVl2Xu8+ynVPUaZWCw2yn4ui//yoMgW0nk8tnqTz1SEvqRo5LAgFoo28tSehQ== 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=PUkdIudox1n3NAqeXy3J/sh1lZ+ikVPvNiW5dwu3ih0=; b=WNb3/YPVwo+CIYjI/FJFnVYDtHw+6TEvMJ34b0NH1WjGbFr8aw8tPhSe76J36yMSJ3Z02VsCDJ2o2/rQaia9p/+gCwS0Lr8xPWL2H+77fjCycCtewLQyMMmCnEDpQPLri4w8tg9t78iwmc0NaIf5RKrIO2KrS0XpZjdwtw1fm5eyns9pjtbXOyh7w/nNzpExb3yxlkzVZg15g1k7L282/dt8n1VnZ9gU/tzMIuVYBrKK2swpRPycTUcvHMbkpkXnSvDRGSp7vPqdCbebQQDaB9RBay9sfXhzebO9v8pt2R+BrIDbPkA31C32dlI2HPC5SM6SkCdl7xOUkhj9mOmJDw== 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=PUkdIudox1n3NAqeXy3J/sh1lZ+ikVPvNiW5dwu3ih0=; b=rIsT1E47YCVtpMCEJYkiU6/3rSEEW6mRCnQq4C54pzVsfNxLwEpNywkwSWE3dcbUwfAA3SBb+GpbQMkyx4HHjtmuSAq/mjqi0rWnk+3y/7sSF6tnKDuwQ8oJKVc/1nWf0XCWKs9u8L8203gYbqB9+hiemcwAmFtUgnm/9lHskcY= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oracle.com; From: Eric DeVolder To: mst@redhat.com, imammedo@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, qemu-devel@nongnu.org Subject: [PATCH v2 4/7] ACPI ERST: build step for ACPI ERST Date: Mon, 8 Feb 2021 15:57:56 -0500 Message-Id: <1612817879-21511-5-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> References: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.200.23] X-ClientProxiedBy: BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a1845e0f-1d95-459b-4385-08d8cc7442c3 X-MS-TrafficTypeDiagnostic: MWHPR10MB1599: 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: X6D38zuaBQqtDvSjdpHgHUtPE9jTBLCm7qYPl84ULngmIq453N1/XRCPExPqykTG/nDK9HjvMPnEv8r89as4KBGK2P2kpSadM8WgaaMmAUvflHjasGZNEKuwtQ7bGfxPohpYtjjoEX8mIhEJaxA+sV3WFiomi7G2kOu6p4KITqGOWwJ4YFfVXL0o3swZJPCIey/SuFnalvMjkyJaMWW49ISTgVopEW9/AvXeJROO+Qh0BK4jRwiBidpYLQj3CU8q8w23PIFPzykGXQEq9nhPWjo3XB1fni/mL8iXinGmR9OwtGozQDGZ6kfR2KdAkzdNBXlOvmwBw5OgKtaOsOcAZ66CC8K9KTjBTBAlGt5qEZgO+8QccLsrMze413RgIrwY8qFHSLVb9MCgOqmDp4nc5m0tdEFR5yrs60RjGUgbp7ZfbEpeKsaI93mrmIDiN0vGXciLfyIaDVCZlYTrTulqor0igSlLRrZcoUtGN1EHRhCBd5qxbzmf72nc1dxeNlfwtKcS/6g1ggdvjKvrMMZAYw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(396003)(346002)(39860400002)(6666004)(4326008)(316002)(2616005)(52116002)(186003)(86362001)(36756003)(16526019)(956004)(4744005)(5660300002)(478600001)(66476007)(107886003)(8936002)(26005)(66556008)(8676002)(66946007)(6486002)(2906002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?IlcwWkS/rKYsG8e4ZyiVgJ03our21Dypw/Jw0Bxhv84NiG5qpUw93TChMEZK?= =?us-ascii?Q?u9Q0Ul+7Y47Iawger+JIf0+F3uUFMVq5lsfV3Vg9oB2zvGym6Z0aqTuBKixz?= =?us-ascii?Q?xitmQ0W3sGdMKRyHI0T6xSvNfmxnmfnqT6n5+75LbwGcFWCIUNBTFzj88kze?= =?us-ascii?Q?vQR6/z2gZGYEfqa4b35cZAERBEi50zphi+BMIKX1bkwMNteOF5GQSAbozet9?= =?us-ascii?Q?FfWP86yfveYnwQcX5JnUL7jrbz6WjR0XFWYJuEFBi6LUZPUkfTmzpCRuXNox?= =?us-ascii?Q?u2fgpRwLIkFGC5i1LWPUDfhwzu7Dm5tQ46sT5Giz4TzYh1BMS71b8orBKwPr?= =?us-ascii?Q?isNSFFpPHOf69t8sSijn5Tuag4rc/StbbCWOzWTlegMES23UoLHGxTc+BA3d?= =?us-ascii?Q?3GgvHg8S7TxGdKw3diggb71Kb+qdJpyaXKNikZCDZVVe3KvsCI7EQIXU/xzW?= =?us-ascii?Q?vsWVTKTQiXIys5RGnHQy5/30QBragktPbV4EZxkFT1UwgB4oMWNAE1hWSjLP?= =?us-ascii?Q?O9acgsLN1GS99RqbhtrhfxmZ2vwfnCrl1NvVFVRwvYb1YUx9VdU2cYMx3mBh?= =?us-ascii?Q?dk/Sip/0pBV6WH5fntf3ZoJoC2oscuIyA0FLYRpmiu10XD7TKk/QH61u1oGe?= =?us-ascii?Q?hqwP+GPe5xPLp5/mJ5HPzkIWIAGIT5lgu/ZERHhSArtOVEDm3jzjEkYOLfuY?= =?us-ascii?Q?vOa882mMfOlSofazuhZp2LEZ3B8zFWr2XfKrPIFntjfpsZs0ZC8WopSYz7PS?= =?us-ascii?Q?SIO6J0mxpIURlVA7B69MQ/yMpCwps/yPTJVc4DuTy4cl/kl233M84ip9gMUP?= =?us-ascii?Q?Wn/3y9W0BACOW5HZ1f3mJpSKhVKEJvGYA/t5WGpiYg7WLIggSPNNTpnv2vyS?= =?us-ascii?Q?wW5arjMdGYYbH7Ayd5WaELqTaXEh+TYqMBJxcbnon8Q0B7ZkpYNqXt6NzDNM?= =?us-ascii?Q?ykFXPivkoAAQQ/cIi7vJ1vEAIlCk8Yx/Md7SumTLuYp/aMt+aZIv7mZImXl9?= =?us-ascii?Q?IA6W76iwJVvV4arvRIwC42cKHNQzzuaeSXv9hKKkfH9q1aMdcz+wzXlOKc1F?= =?us-ascii?Q?1i+HUH+Z/i/8w169SSaTigyIyWd9JziF5x+JxjYsuRsD+IUefg+SctTyTLt1?= =?us-ascii?Q?LNbE0/+ihYflL+zchcx/dNb+41x2S0Zhuvi1AaRfqy1LGcHKf/phP0wFUQ+T?= =?us-ascii?Q?4YucqFaHP+Umh8DfkiXfCvVUOsCkkd9q8U/bLZ7FzLNPuDnVEX51ItqqKj4G?= =?us-ascii?Q?78f2qg62df0G3YlBDdfZ3bJZRAtAWOXjSZb5xN5T5kdDB1ruiYFVkWDnjA8t?= =?us-ascii?Q?Z9aSXi8AC6PiQyvO+8dvY0qz?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1845e0f-1d95-459b-4385-08d8cc7442c3 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 20:58:18.3252 (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: jLVHwPIpHzDrahCFSNUKmnFOAsA7TbRFv4E/xX3A9ZbGn+fQZTYLVXO6Yyc8rXipvxtlCSSbQTJt1xJg98/0YSfXTZxYuZJ6Z/l/21wu1BQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1599 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 impostorscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=141.146.126.78; envelope-from=eric.devolder@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: boris.ostrovsky@oracle.com, kwilk@oracle.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This change includes ERST in the build of ACPI support. Signed-off-by: Eric DeVolder Suggested-by: Konrad Wilk --- 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= ')) --=20 1.8.3.1 From nobody Fri May 17 07:55:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1612825957; cv=pass; d=zohomail.com; s=zohoarc; b=Jnl6p08Mx//VJ7+QqQJDe8i5NVWYYr+8/Wi0y8ZGIYDF+d4Cd7AFD2gLgRAZbT6vaprVI+0MYEBAWdOS63vowbdbAVp13wKjBUMp3X/YxH1OB1PCDD2C0mLeK2I2YuPVU6TB2c0k6AFxhkmuH6iCZ4HwGvIjlWfnRBD6PUz8t0E= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612825957; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q1IJVxa3AzhQVcC6f1jaVW1MTy9h5ziV/tasrzD8OwA=; b=R8DOO6W0uuBqmT6oSmREhGvS+1zxQS2WIQITEmHNhm2wSrCRWxVMt3iHxMNANpyulpPFQ4L9Es5yBg1OFNpXSp9hAviMq/6y0IWgfOvx24OnuEj8kbyDvwq54QSwkxKGnd6Auzx/R5wC+BJH8xFxtW415ha3Uh/Q7u2NMbbgY5Y= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612825957924279.72165134089164; Mon, 8 Feb 2021 15:12:37 -0800 (PST) Received: from localhost ([::1]:54686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Fhs-0003qR-Pf for importer@patchew.org; Mon, 08 Feb 2021 18:12:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dc9-0000rB-Gn for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:33 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:34084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dc1-0002l3-Dw for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:32 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118KuQrP001246; Mon, 8 Feb 2021 20:58:22 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 36hjhqncxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:22 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118K5rqj157115; Mon, 8 Feb 2021 20:58:21 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2102.outbound.protection.outlook.com [104.47.55.102]) by aserp3030.oracle.com with ESMTP id 36j4pmtykn-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:21 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1599.namprd10.prod.outlook.com (2603:10b6:300:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20; Mon, 8 Feb 2021 20:58:20 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2%7]) with mapi id 15.20.3825.030; Mon, 8 Feb 2021 20:58:19 +0000 Received: from ban25x6uut23.us.oracle.com (138.3.200.23) by BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.21 via Frontend Transport; Mon, 8 Feb 2021 20:58:18 +0000 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=q1IJVxa3AzhQVcC6f1jaVW1MTy9h5ziV/tasrzD8OwA=; b=bcUmajmz/qOSi5rBy16ZdKIWMzNeL5PPLtR7m71HI5KXnWQp5HppDmU8Vnp0OGqZbaxg /pLgpEMLQLA0hPTB5usAjZfO3K7yHGZaoxW7jy0IO3E19vGNv+kGIUja/XLj9w25wpAm 9JzMVMLib+4y/U4gbOMzn2x05NankhE/eP7UYcTu+loHW8+B9vIcRKqNbBxEU6EvgBXu w/f+wDB3sGoKCBQZFctadMWP2Jy+owV3fHPQNAIztogsPxmVmGtTdl6em8fW/K+Y5/KB 43+w4as+xF6h+5mC51I3NpF70NH+uPw3ilJsML6GPNY+TIRAyR0aPE3H7GVvpH85C48r yQ== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NeqetFJ3dcmp3wTmf5dCSPvNXQVcb3fin1mo2NiQ/TDbZrY2SYXgz1F14m1NLZ/d6qfcIVANYfMgGcu0u4EfOUeu9zmwvro2WHY/6+J/oJtIawi7Ma3rVRBTvqc+qbTHnXOIKQrtWzbYHdiDb7kUWdGBk53tiQUpqBWB39DcxagE/k/nZ7fMq1Z1Uve51uyPx37pQHvNcnUDuobqoY7PSmJ6sa21dGvp+bWhtdQLURafisZXJhDNSv5NYP9LbFTPc9v0nYHX19UQgf2JA5uuk75tnpfGy5MZ8T9bLqz8z6whVpBmd5quJ2BPNM12/wTs9ZuqV5X0IPitaMInAT8deA== 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=q1IJVxa3AzhQVcC6f1jaVW1MTy9h5ziV/tasrzD8OwA=; b=ewT51oOvsfmJBar/4vBhBSrvFo4nsLW7JFCE9ovneKOLGQiCZ02meJlk+kVWYu21JqNTRoXVzuKn9y4cLqTiMjTtbyiEgWHo7taxDB7HM5h/gcrtkPqomAbm+O0gF4i6DcgLhbpfwiZDb1SHQujckpx1Tnay8pVriXTOMcBu+7z602IkC+zrEdUoy0vpVeEJgVLYdH2QuRTW72MgRWjQGX0Vj5tqW6Qmrxqb5kP8OphB/ajOXfnDkGjNiO+ARa/mc5vcjYpQXnHs54qhrvx4EIQkeq0ZJXLKSaS6OYw7qm91w7M1xXXO36XkNGZ4FYhVH/mhCr5S9wxo5AutuuzPhw== 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=q1IJVxa3AzhQVcC6f1jaVW1MTy9h5ziV/tasrzD8OwA=; b=EwD8p2QcQzgtMSsHB6hJzhkqO72kP+GdJWdzgKBCS+uRzsKTC8dDHnDQuUG22Zf60pth1N12QGzVTL/otDoBZDtqe9i+Kax67Vb4EYIrGzmRmSDRptZmxyei/cB575cJbqTDDT//8vdZ/ldqHZqGT+WOngOIX51hDCNmmrF6uz8= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oracle.com; From: Eric DeVolder To: mst@redhat.com, imammedo@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, qemu-devel@nongnu.org Subject: [PATCH v2 5/7] ACPI ERST: support ERST for x86 guest Date: Mon, 8 Feb 2021 15:57:57 -0500 Message-Id: <1612817879-21511-6-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> References: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.200.23] X-ClientProxiedBy: BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8ef60008-76bf-448b-41aa-08d8cc7443a4 X-MS-TrafficTypeDiagnostic: MWHPR10MB1599: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FoYDsi7oJzpvaqycjKLtGBPfFNoQ+PAXI4Lx2SGq8NOviKb5Z+ExQXX3DozZG66mXs3tnQW6NjPdav8uoADqHdKQEwg2zyyZECbWNlnJKYY/PWSe58rJ4i69SYd8rP5Ky6NtXAPfLZ2d2UCiohOyPpB5ZhyAV/Qz3R6xuxAVVGN0w4zrLc8nEmSgO6NRFNLFWNf8jx5JvsbCIXf+5xo4HQcIooKCoB9l3E7L5dWczZ0wIo20V22IrGdwR0facOIRLc5Laxwaj+frBL00JNvfkDiKUa5OIakmpHt6YN/+zSv7Yp/GL2twZbYbQVEHkIL/nrcEPvAmtY9Umot5srZzEgc0DFjUnqgg6+JR+P8CCRPKImeCVkgIszXQXo2gs3EZYkvW7qgq6Sx/7yCDbreCIyo1d0srGSDsbke71mK/wYnM3OFAwaputZReDzUglwPpwBRTxMwXR8OTsrrB64y6JbS893QNNUXI2O9OTTSkTLY2hZ39H6wMiKz9E4SbcpqByw+Jn0AiR2LdW0eRlpeIZQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(396003)(346002)(39860400002)(6666004)(4326008)(316002)(2616005)(52116002)(186003)(86362001)(36756003)(16526019)(956004)(4744005)(5660300002)(478600001)(66476007)(107886003)(8936002)(26005)(66556008)(8676002)(66946007)(6486002)(2906002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?W8bUBXKyptVe5tUWgfXQMNMZHJDKYOdWpq9dAbCT64MgNMsmHb8yTuUuphn3?= =?us-ascii?Q?WSVf0EivP9MxTDegK+Y2Vm0J1AqGuSB9piiDRHZxON1jESMB9a0K2eVSyy9V?= =?us-ascii?Q?8QhJhHLUC3EN+f3XzG74kNCB9qlp1ehRKGlQCmsY24gRG65tpHEcGY3Ve8JK?= =?us-ascii?Q?tu/L10fahiNvczkp6b7OCsGn6aY6tO2mwvqiwb5YZuvIsi32dv88FRnt3zBF?= =?us-ascii?Q?DO7eKcLuX1ZLN1xIN24WzMcYd5SmkVJJuJHvuC9hzlNiGi04ko7tLAy7Ixpo?= =?us-ascii?Q?vhMpgPRZpluh/PW9MI7w7XdGzuIMJBJo08EPKKenMA3VfOcHnRFBKBJaC8ZV?= =?us-ascii?Q?r2NyFdFmuerVJ2JVdT9L2AHBI5OIVp4aaL7CmwVg1MMyKOS8JEjeXvUUIeHi?= =?us-ascii?Q?Jq5Z/iqUNsn/nb8uuSSLR4bxyIsefNEZrOGvbhkBichyQjabbKZk9GKnp6fl?= =?us-ascii?Q?MI2AnukuA320hZydaUgq242uTX6CabKlIULb2wJ1XxKIW6exJ15wNQopJ6Xf?= =?us-ascii?Q?hfeHdlwfoGjli/LaFEFMHXsyhqp/PV0w1SabwOypeL6493ofQu/CfQViPsUP?= =?us-ascii?Q?0lwgIC+yHH6KnkohrjpHRDfHiak2eEyEmErzzVAAmB7ms5Nc6slYPGhtgdPZ?= =?us-ascii?Q?K7sZo6ZuSp9AVtpExEHoTqWzA7L/OEu8zItc0Bvf+aBSBL9cmVmxrQE+1tTF?= =?us-ascii?Q?t9xz8dyv3vWSef7Bue5tkDBsS3+fkGlfr1CEt5vQTP4PEwQypOMnPzJTOR1/?= =?us-ascii?Q?GTDTU6nyrQUZUwHfZ3NSSvCsqVqdeccMtj+IMG7WAo9VP2p85T1WNJtwzpSF?= =?us-ascii?Q?CP19drH7KM7ApkDpslzsWoiW5y/tVS4ZQt5d2F25KPnr0ZLbh3zwC2eIgSlK?= =?us-ascii?Q?9wd9sqNd4zYjINtrW8Ax59gqUA9yFqeAqaT6o0EbCv7wy6+th5e7+uIV625P?= =?us-ascii?Q?1wVkWlZxD6xAUMCHZqAhZJJaXMIqu7krLvfLNhT6bATf+rIk4wDn1yvOHtQr?= =?us-ascii?Q?nZrfLauhE/PEizjEq1uSzMiBhw6Rqp9dmR77I8rt81RlOREO0fU24MXeoAiJ?= =?us-ascii?Q?U6zo7cq38tjfS/kDLiaNImh/tlYcMIMFDPLmRHrYXWGRtHBQAUn7Gwi+ZOi5?= =?us-ascii?Q?yVjvStQg1SvG5bnDpTCxIW+/kiU5uVRdxhNRG3nzV3/nqFz7Ahuft01MMo4y?= =?us-ascii?Q?LvCqs2r9bF93uTNBIU6NiRLEwKSpEV25XZ7BTdb+n3TJgW8dg65ROmfeXknK?= =?us-ascii?Q?x1V6hEMID0Imj7BQ+lZoQ3Vrysaxy4DbHB0wC0Wt5GgeBhnhv72c9Hxt886h?= =?us-ascii?Q?8dwUidYgfp20+S6niV60VxGh?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ef60008-76bf-448b-41aa-08d8cc7443a4 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 20:58:19.8087 (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: DhbEnknkYqJc/11MGn9zLI8hT3Wo92r2ulFrNMqAulf33YAFDUEaG6+ZzQ4eAVz/s0N8aJS3T6m0+w8PQ+mjxqj16W3UiN9RW74O9IA6OAk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1599 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 impostorscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=156.151.31.86; envelope-from=eric.devolder@oracle.com; helo=userp2130.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: boris.ostrovsky@oracle.com, kwilk@oracle.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This change includes ERST support for x86 guests. Signed-off-by: Eric DeVolder Suggested-by: Konrad Wilk --- hw/i386/acpi-build.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index f18b71d..2c0b27d 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" @@ -2196,6 +2197,9 @@ void acpi_build(AcpiBuildTables *tables, MachineState= *machine) acpi_build_madt(tables_blob, tables->linker, x86ms, ACPI_DEVICE_IF(x86ms->acpi_dev)); =20 + acpi_add_table(table_offsets, tables_blob); + build_erst(tables_blob, tables->linker, HPET_BASE + 0x10000UL); + vmgenid_dev =3D find_vmgenid_dev(); if (vmgenid_dev) { acpi_add_table(table_offsets, tables_blob); --=20 1.8.3.1 From nobody Fri May 17 07:55:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1612827857; cv=pass; d=zohomail.com; s=zohoarc; b=gbm8hG4Ue/tFEZLAkppGyRmNzGFEZ9oeyhqTI/56sXjehHFnVpiqAbHUnUoq9iH75gbnf6PmNwC3PoojAIJHEZFqvfMnF8+qOHnnmEh0TpTacot3of8aWOz4Zp+v0a/4XYF4LU+nvF6VnDmtXSljW71mQGdURYYbzaIJAa3+ElA= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612827857; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mFK5egzB7/6ymCVgCMffkiWdnMVmbsIMWE3IMHkZltI=; b=VAhEE7aGWRc3zwbBL96KjL04NS8eNEEzcbz9Y47F18V/agnK30eF0Egdq4Aa5Pa7k8CgnC+y7m1CWEYlkxInKKAojE7CzytUZZFKJcLq30XaI3lsQ115UhCy70YvtG6gqPwFxz2QwF3RRYWzYkorc5knmSxyv2gA16epgBn12XE= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612827857484739.1908434981384; Mon, 8 Feb 2021 15:44:17 -0800 (PST) Received: from localhost ([::1]:37256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9GCW-000271-Dm for importer@patchew.org; Mon, 08 Feb 2021 18:44:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9DcA-0000rv-SM for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:35 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:56788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dc1-0002lA-UX for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:34 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118KvGds010184; Mon, 8 Feb 2021 20:58:23 GMT Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 36hk2kdc66-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:23 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118K5MmH020945; Mon, 8 Feb 2021 20:58:23 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by aserp3020.oracle.com with ESMTP id 36j510b3dh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:23 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1599.namprd10.prod.outlook.com (2603:10b6:300:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20; Mon, 8 Feb 2021 20:58:21 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2%7]) with mapi id 15.20.3825.030; Mon, 8 Feb 2021 20:58:21 +0000 Received: from ban25x6uut23.us.oracle.com (138.3.200.23) by BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.21 via Frontend Transport; Mon, 8 Feb 2021 20:58:20 +0000 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=mFK5egzB7/6ymCVgCMffkiWdnMVmbsIMWE3IMHkZltI=; b=xZUYPqWm2py6Qhqtrh8+o8r8ilto4y4EGiOsqS4reCeXWN91zReRGqipstotA22albHj xnXBEIdgbXP8MlPwjqbo4ey8/p2WPJtZ0nNvWeEzDFmf1h8rCoyX9UqY0m3imrNZLdHs 7qBSCNcjQB7qAMVLmqr6jMI+ttUp1c8QFP2Z4SU32ZJZ19YHGcLUAfCVljicYXzuEMMT upYEMzBq13LLsedy1GfSi90815zNr5LMbn69d89keb+704a9BWvm5nagTP11wyZIM6YK LrLMC8mmZ0V1cS5HVxFCvj0oYNdZv6I+J4t3NgrmkjpYaCwXmELJIPCZu8Opbsa8Olvf +Q== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BcxJUFP7PstnRdC7AskYhpfXl6qoMAFsIK56eXUjDDnLyIMPj/PQIdWYdC5+oWZsac3BQkidzKpLEnoaNBnmyMtpm5xNmG1X826HNzZEcuXJMUbXesMvkRbf0G7VL4ko1ed0MS4Ww0QUFpNPqnZ2677JbpLMawxYAhFK/Ff98NfwPP2MElM017YQVEbuzpdKv8YrLwJugHPIJWPVkVqR6YO1uutJ7QCp5YVVWSP6c9klDFfi0ghGaw0vgbnR51nkWRf+is+3PmP9YLX4g272AhL4YD1Mq9CaNyyZ1PsbQsrxZ4OK8Ncqokm9DEuosMVVo/iYWnVMLZxsI0/D6O7X+Q== 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=mFK5egzB7/6ymCVgCMffkiWdnMVmbsIMWE3IMHkZltI=; b=UFmWIRe5X0Aqjsjxe+P6cMSkLgYQa5/K4YFL0U8fSvCHiE+qQDmG3bLBNqQttpU9SQkIkVZdK9MoaUejVtpTgiiv1hHoP1W3kqrlWW/kZDvmslP5Oq1Q1SBUcM79r3CwKoVCf1ZtaSfPOcWcQXvCHGHzF1MwUS9BAA8ylP0UO3seJsnk2iJuQ8V/vG+gR4nPWz3lmIW1l1FbLGuQdoBHkFoj8AT7IcuHCHMm8dCksAJrtG0/6yCZvOsna72bhOUi60YOqBVibcOb8XLEDOdUGcS+mSlvaNR9gecnlUUeW0jCKTI0Xkj/NPwkKV7Lb9b9JjPrtVwbeNfv5ysmiy8O/g== 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=mFK5egzB7/6ymCVgCMffkiWdnMVmbsIMWE3IMHkZltI=; b=YyiAHXUzuDyMN1TdmmEdTzp6Iw5crs1tkOG898j2n3MxPxFwt52VRUU9Xv/KLr4FjTtqynZo/g6OqmWdTP2Mry6MoLokkAUZnPbNYDOQ9N4y4L5220wHXj2655uYoSvUDD+oEI1hjbYTFOQSjyRhjN0cmnIieaJgSJ5WetRvMhI= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oracle.com; From: Eric DeVolder To: mst@redhat.com, imammedo@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, qemu-devel@nongnu.org Subject: [PATCH v2 6/7] ACPI ERST: qtest for ERST Date: Mon, 8 Feb 2021 15:57:58 -0500 Message-Id: <1612817879-21511-7-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> References: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.200.23] X-ClientProxiedBy: BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 546c2b2c-ddef-45ee-7708-08d8cc744486 X-MS-TrafficTypeDiagnostic: MWHPR10MB1599: 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: BxRidDQtYdBHsQPqpDsQ3ECtBSAx9WRwS/GxJWVUl2blaRuM+jqPFL3ZSBPOwd+mv/QCR9cwn4qCGw2np9yfryfABOAMKU0wcvmxQwtUTUuWG15+NoDyIq9d/lvWLCqozaQnB/pUUGXA6Uh0T41ZXXDSFoRNAnlFG/bfSyvqWrKJdocq0tELaMz7q9zaBYdpiyHpAuHUVYlAMZ7lUKhCWVXbIDHZMCILN8SGEkiM6YvJq3Joh87prJG2zVIuewgxW2gPHfOGTl5/adYoAhe0smEQaNNEipG2UdL3Cb56ZY0oGSCw3/InpEnuc3/uNHmQWk0Sz0oo3w5SC5E1IfRDyoUsHpHupLC/EWNgITqnyC+9+RaJREZQlS7RpgyumKyL338jKtj3suHnvXhQmrGfkJT0BLnRZ/tdZ54woHbe+BjksUctTruNBH00w+RnwyrAjEJ8vIG3xg1cKxFVY/nNvyVxI20+Tkhhm56lrhcO7AjZJIYQsS8vtCyvDeEbPgcT7GSJKE1T3CR/CxyJ17k+VA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(396003)(346002)(39860400002)(6666004)(4326008)(316002)(2616005)(52116002)(186003)(86362001)(36756003)(16526019)(956004)(5660300002)(478600001)(66476007)(107886003)(8936002)(26005)(66556008)(8676002)(66946007)(6486002)(2906002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?6kSE8Gmzu4oSvs05QTcb7iMpB9Z0Oyg99cd+LWSijUbtODIIzz7q12uIgwYU?= =?us-ascii?Q?gbnUyPLONklWLJJfkcIzGkBEjj4vtVYNpSzFqXbdWlTMiSvbS5XQT0JQqjNn?= =?us-ascii?Q?0oFeGGyNkpehQHNyYDRczCTsZyS5zXWweQbilpyfkUCXHys/Yyl6dyMXRPIu?= =?us-ascii?Q?Dy540a5Hjc86eRpVbC0JzEwuWUsezLtK2b+mBt3H2RzlD7/6eLqqiebMu0jL?= =?us-ascii?Q?e0Te7+j0LWu/VDR10GBydBQf+hJuRToX7iZZv97l7MTuHbqxmRy6OrClHRJF?= =?us-ascii?Q?QhAKZV4JrXDMViG9/OKJMZ79jHdAlfOJc0R3Ql0/CUq+x6KYOvBQmMzI7vES?= =?us-ascii?Q?pcCoBUxENPkZRdyOxYDMlBh/KRo0cZ5Hx4hThe1cgbob7n0RJfNwEVpbuXMP?= =?us-ascii?Q?eHOkqu8rw5a3C5kw4xTOZDIFyeijsoeTRa+UfsKu0UP1UBL+osr7ovP+fVWf?= =?us-ascii?Q?M9YvNDoj6CwwL7SspbqzhYK50TALSVrwCYze8gzoR3hePGe++sD1kIcf+V2u?= =?us-ascii?Q?Yc4CQDZvCVhy6srszws36Ri9N0ESiR+QSrUTnIZXCsvFAoijynTsqY/MbJKc?= =?us-ascii?Q?zp+BVqNXPk0RoQlaJguMAh25N2CZwQLl4M1GalVq56tM9Aisn4+3RUMEzYOQ?= =?us-ascii?Q?i/5b8FlPxgfpIomYxIgz1wgurp4Dz6+u5qO1q+RQvWbdqIAkev9cDK0GoDFp?= =?us-ascii?Q?HA7qLpy4HSpjWRy54iLVqijuJ4yHHhf9MFbIc2imhO7+LaJqrXXjmXXWdrQw?= =?us-ascii?Q?tatReo49jqWLUQ/sCQDZ1r4A1Qdj51Hcz+SAnEaFDmBlqUt9/Ye4o2qQjJ1X?= =?us-ascii?Q?eLcSRbzmNb2GcEjwwx2yue7JJS9tqrmBataN/rtEtdEz8j6n5re6qmvijsHl?= =?us-ascii?Q?g9r7wSj1qCiQ5DwvheGaZzhAUfZ8VUlkzvMDz3VwCN7PJzajqQK0Mjt9CHG4?= =?us-ascii?Q?m28Jcr0TDq7L5PRnYK2AvswYVwmRslGZNbrGHy9z6Yg+uh3G0WUOkBegGLOD?= =?us-ascii?Q?nrmLBSeUqLZ+ycdmaVlUkNtFuA8Ec2xa64ZUh4fBMCQyNaD/5lox+TFXERc4?= =?us-ascii?Q?06dwyzpAMzSaMoGyEm1oMZOqa2N1guzCmT0FvKQbbw4WQWkJq8ZMDIIwudTY?= =?us-ascii?Q?H0N6C9PIFejD65TnY0xIfKN5XVyKyPJlC/7p4OeYFUXi5D3Wu4c6EPuV9Qha?= =?us-ascii?Q?/7uFIiMhIZP/8xsJMVGSvVM8I7aga+KnLcwZ2qqGbhCXRDhO9sR0wS76yHTR?= =?us-ascii?Q?w9W0kfHB8DOLxdDbiSnz969Ea02+CDT0mBwNQu9ZoKqDqyTVKIq7FhASEBnS?= =?us-ascii?Q?ZdjT/1E2qEYuhHM7l3AJ1VNp?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 546c2b2c-ddef-45ee-7708-08d8cc744486 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 20:58:21.2633 (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: keJEdMPGwvrTOiVt5JEwgK/CONgVDXRllSRVQuxZeFxXwVfUwP02nb9L28ORWzjUz3DHfxYUOn8sOUGFmkydgXdiBjNQVVCtS3BFRbqmAlI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1599 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 impostorscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=141.146.126.78; envelope-from=eric.devolder@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: boris.ostrovsky@oracle.com, kwilk@oracle.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Suggested-by: Konrad Wilk --- 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..1030e83 --- /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 late= r. + * 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 =3D 0; + + /* Wait for guest firmware to finish and start the payload. */ + boot_sector_test(qts); + + /* Tables should be initialized now. */ + rsdp_offset =3D 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, tru= e); + if (!memcmp(table_aml + 16 /* OEM Table ID */, "BXPCERST", 8)) { + /* + * 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], 8); + g_free(table_aml); + break; + } + g_free(table_aml); + } + g_free(rsdt); + return base; +} + +static char disk[] =3D "tests/erst-test-disk-XXXXXX"; + +#define ERST_CMD() \ + "-accel kvm -accel tcg " \ + "-drive id=3Dhd0,if=3Dnone,file=3D%s,format=3Draw " \ + "-device ide-hd,drive=3Dhd0 ", disk + +static void erst_get_error_log_address_range(void) +{ + QTestState *qts; + uint64_t log_address_range =3D 0; + + qts =3D qtest_initf(ERST_CMD()); + + uint64_t base =3D acpi_find_erst(qts); + g_assert(base !=3D 0); + + /* Issue GET_ERROR_LOG_ADDRESS_RANGE command */ + qtest_writel(qts, base + 0, 0xD); + /* Read GET_ERROR_LOG_ADDRESS_RANGE result */ + log_address_range =3D qtest_readq(qts, base + 8);\ + + /* Check addr_range is offset of base */ + g_assert((base + 16) =3D=3D log_address_range); + + qtest_quit(qts); +} + +int main(int argc, char **argv) +{ + int ret; + + ret =3D 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 =3D g_test_run(); + boot_sector_cleanup(disk); + + return ret; +} diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 6a67c53..8409892 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -46,6 +46,7 @@ qtests_i386 =3D \ (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test'] : [= ]) + \ (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test= '] : []) + \ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : [= ]) + \ + (config_all_devices.has_key('CONFIG_ACPI') ? ['erst-test'] : []) + = \ qtests_pci + = \ ['fdc-test', 'ide-test', @@ -208,6 +209,7 @@ qtests =3D { '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'), --=20 1.8.3.1 From nobody Fri May 17 07:55:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1612826177; cv=pass; d=zohomail.com; s=zohoarc; b=WEX6b45UaAO7OijdRRvszyBioTUp4O0t1/8ZSCOmNdpXhmTtkRSM7wZgnX4vIcYH5QrbTWbdduExMQrVrpdMC4b00I09kx2c6a0+Nkdc8PsKBG9/4/IFEWur3EZEhiKdClXySTveOFmhNy/k26QjEfRRSD6DpG66KUX2qhBKlVM= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612826177; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fpbRO5Pj227pJ+mfHgzCx03xnvItbs0J4YmY3PU2Xt0=; b=TTXJcgcOcqrIIl3FEx9LKEY6bDnt6W5DL2aRbTSwOH7th4j+P0ZD8t7gYapKFJyNC3cqr0aPwmRjMepvRf/XSOVPgzQB53rbFyAlOObXpHwZSwxS3CpdXbi5Iv2rGdH5vixnCotiWtfIgPZp8HyjMeCXYVzmh8iAJRvAFIxCfJQ= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=oracle.com); dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16128261774241004.5289036591132; Mon, 8 Feb 2021 15:16:17 -0800 (PST) Received: from localhost ([::1]:34022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9FlQ-0007BQ-26 for importer@patchew.org; Mon, 08 Feb 2021 18:16:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9DcD-0000tn-4X for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:38 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:56650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Dc5-0002mQ-03 for qemu-devel@nongnu.org; Mon, 08 Feb 2021 15:58:36 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118KvE5e047006; Mon, 8 Feb 2021 20:58:25 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 36hgmadg8q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:25 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118K4uC5009231; Mon, 8 Feb 2021 20:58:25 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2171.outbound.protection.outlook.com [104.47.59.171]) by userp3030.oracle.com with ESMTP id 36j51v5s12-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 20:58:24 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1599.namprd10.prod.outlook.com (2603:10b6:300:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20; Mon, 8 Feb 2021 20:58:22 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::1193:5eb7:7993:85a2%7]) with mapi id 15.20.3825.030; Mon, 8 Feb 2021 20:58:22 +0000 Received: from ban25x6uut23.us.oracle.com (138.3.200.23) by BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.21 via Frontend Transport; Mon, 8 Feb 2021 20:58:21 +0000 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=fpbRO5Pj227pJ+mfHgzCx03xnvItbs0J4YmY3PU2Xt0=; b=DI3FZOwwhFfOqKGRz15TTeB7UaI4YVtj6cpVesSvE/IDWsB/xp31urr2i1S0yiv+pb0z 0CGZ98E6cLY/79NvjHV5ae1Hj0lxFj3SruMbXPXc5g9unanW57PGib2xPhfWsTcJcxGo 0mQYutF3rKSp8LQoYFku2UKjZ/K9ltm4b0Awd7xGalx+/crXn1Rgcyqonkg6OnpMfz82 HlZtIg70TFcczJE3AxpiIIMhqdCO/O35H9P2GOI4Q3PZX18b/wXgfr56M41Fj1S9Jm8G D0iPmWpKqF8cD093RUv4T8yIxDc/rn35uyOgmyPSfAaC8WcfgdNMFxuSEdsCnS9wykKN Dg== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J4bF3WhmS8unFZwGeIJizG1KQzUdWNCxabq3y3rsecLFOOW0GARcEfzWHimf3RpblHdNYb7BbahlKWdW9/vU5FvFhePyu4SlxXrFGFXllrIE4rRCghU82yjn/k9+m45F7t69ozwhTEWZzQHI2A3nWiAy3Y2JHvfeautQQho4SIA1T+XDaBcgn1QDumPmlFRQ+Vaa5+ZKNnA2jFkRBkdZDJ10mItTCMgkmx9zIg9luEPReSN5SOE5cIM5pAyqsm1x6hEeLBM/VnPBx2YxsRFZha1I9DbOCJO8IXXWN2vHlRBo/p8I2U93L0SGzFj0HXwdrcpFUiwQ7if2nJq/XLHqdA== 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=fpbRO5Pj227pJ+mfHgzCx03xnvItbs0J4YmY3PU2Xt0=; b=YkrmfH3tSRJuic6VAVY7RdbdGxPt7chZ7vEHAdbHy/TlYrJfIS8dLW7FlK2Vmvz2pc2mIPxgX9if1cde7xuEljBqVJ4awcKKcl86t9LYg+MGMs5g5JDR7EhwLjc1XBXvzdx588nQRLUOzkKSGuXCXmjSJMfyQig7E3V/cKZ0OIClqvzvVcewN1hhyNH324ycXzA9Puq0gCpEl83ZJyO2MzVpB6c+e3DBW24kdeedP0APWfN52t4gQS+7aN5RlblJzrLGArnSc8RW/HW0juxB5nl9SYd4p3qhRgp2LYwo1UBl/uSnDsrnYiG5IzFvtVzOI8FMf7S7I+eKVwjbFLlD6g== 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=fpbRO5Pj227pJ+mfHgzCx03xnvItbs0J4YmY3PU2Xt0=; b=YbgTnvvn1eQWZP8eS3dV8adtcaK+2d53D8Ycb82QQfeU5YOR2qr1qABFGuqQH8yS6ef+CwwDhd3BlORUgGAF29lPrctoxLfGraQeHHc5TT726sKzMGmIJu9O/jSwZdc0TXUCv8AyAa9Q7CS+QToopXFHqq5H43Z/kV8Ajn7LRC4= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oracle.com; From: Eric DeVolder To: mst@redhat.com, imammedo@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, qemu-devel@nongnu.org Subject: [PATCH v2 7/7] ACPI ERST: bios-tables-test.c step 5 Date: Mon, 8 Feb 2021 15:57:59 -0500 Message-Id: <1612817879-21511-8-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> References: <1612817879-21511-1-git-send-email-eric.devolder@oracle.com> X-Originating-IP: [138.3.200.23] X-ClientProxiedBy: BYAPR04CA0024.namprd04.prod.outlook.com (2603:10b6:a03:40::37) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 961f7cda-26cc-4921-4111-08d8cc74455f X-MS-TrafficTypeDiagnostic: MWHPR10MB1599: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:862; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wJ007RpxZOTQ+GQxCMgTVCIyLnVSRAM7l2ZB4aNUOXR/rN9guaFIeFpQLzM8YGdFGIHQ7OnhkA2F6NGs8FxfrrM05YsfJOzlfALDHMfat9KiRNidbHmM3E4UPoLitESe4Ag8vWc3cDkeiIDjUvW7P7FicLcOUnHOXP0atyD6jGY3vm0IAW5X3Mc9zzKl+mUwRIf1RB1Zwa74S+9O6/fQGpxs0J2bs3d/WSfM6uEq5j70C4RcKNdAys5CiR+EutZ5tenAAQKuFXG5AkNSkh3FdnMc63oEj+UrvEjjRtghIkFb9SZT2OTUHTJ8ZePjARq+42eq9dxCvYYCT+IUQDOe7P/t4V9RjMS3aIEkIkHbenetKGuySH4HWDQZ/5HePts53RoD2gl7wHcqgQVsEpFb0WNFTwD0Xe9op2+6065Z5jz1+NNW5eQzUDsI9kYrb041Se9+XcRbmLyHaYj2aqI+mq7KCZjxlg4bmOfuhfYEThVF3Jvj4p5w1bScbm1d7nL1qUEiHlJ3r47KeYZ6ECr7tw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(396003)(346002)(39860400002)(6666004)(4326008)(316002)(2616005)(52116002)(186003)(86362001)(36756003)(16526019)(956004)(5660300002)(478600001)(66476007)(83380400001)(107886003)(8936002)(26005)(66556008)(8676002)(66946007)(6486002)(2906002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?v5negZB11iU30RL2gjqM3CviZaxQrgI1ctEqlci1RVhe+nzTXo7zPUxURXJc?= =?us-ascii?Q?+UcDR2c//H+4eLW1gVdugCjh61bK+HkhUafKDd51nD9v7PKf7f6GaidtPP4e?= =?us-ascii?Q?x0MFRpkBwwDm0q5uKwU7EUO0jLaBg28IRn53b84MTIbd34BN55h6ACdbDBRN?= =?us-ascii?Q?++UiMJqlmSdDDsDUXLjalnm+LO6/7udTfaL5CNtGz5gWDyezOXZ3uGGHSTUB?= =?us-ascii?Q?gZHHy9Aj/ELOQBcIWnEGtXttub4byXTrZTGyfiGTKWe8vSMhNTC20vN6yutm?= =?us-ascii?Q?GLHieowfLAzU8gZOm+QboU1+iLfv2uleCvUtJSgLSRwn3QE+coWu2Uh1M5no?= =?us-ascii?Q?BmBIgbVV6vS5lbgWWo5tKm4p59kCjemYFZhd6aVyZff0HfNEDm4JdnJkzVdH?= =?us-ascii?Q?L1tI7iQQoqCJC4UjXztxbxKc1NuhjAD45TuJmK5xW/iYIH1R0JmQ4FyedtDk?= =?us-ascii?Q?LsTzqVYee0v2inap7JFyS4cR7psi/Lg7brmpPJEP5wDK2hziT5DSXBRntYXg?= =?us-ascii?Q?pgMNu1mhjNntC8x/XEUIHizXVe7H7NlvfTEd/DYudwi+Chj0nO4E3kyrWdB5?= =?us-ascii?Q?DlIq4228tUzvp2QJMHDb5YP4W+f7KmQZE16+pqoU0suBBRzh/g4OXHzwdu97?= =?us-ascii?Q?olw6iX/wvwQm84vTrQyBhCkJgnO5jBYAr2PO3D0UOHwAYd1JZ3Cdtam1zCQJ?= =?us-ascii?Q?VntVO35Gke3dNHofdi6yvMvP0uy8EzHWxyw5lsWvcETMtttgpnPpLLwikGD3?= =?us-ascii?Q?JXMkCzr6idGlTmL1HR5jM0uRPIH01wGpnRyT2R7hVZsPzi48gO8og4tCPgl3?= =?us-ascii?Q?wmxobkE1dBqHVOSnDDj4PS212oea6MttWAbZ7pgFpKi+igM4hheQ90wr2x1r?= =?us-ascii?Q?lYa3tg/gxFmkAdyAFS9lvDijT88VtnizA2ebLZmoVNH/p6zxYlk4baKQpZAJ?= =?us-ascii?Q?Rd8+eNePes8YG925sDUoySsGyFa3L7NqZ2bAgGW/pdIhthzuKp1DqXGO4+st?= =?us-ascii?Q?dnSAJvgU5Pw/L8WkIPi1L8r+8DkHPLTUOHntfYPC2lQYKxWP9UcEVNniCBs0?= =?us-ascii?Q?Kz+A1nZK9oIWB3aTU78gcQPdet3stFRY/IsGNhsqJkuu/kx8eKJZAYAi2rGR?= =?us-ascii?Q?RHZ0IjsUaGL6TlisLqAhh4IZbu+0LYpeH2rX/Mye7Zom6w7Gldy7+pwsK57i?= =?us-ascii?Q?mDPIsgL3MO8bi9LxM6yOkmaLrflYXQvxiunDNh9bXUbcOi4LLupt3YSt/W6e?= =?us-ascii?Q?hQGuLtr4Je1d1hatzC9bj+ZR6PQkce8bYCBwv8Hv2AzLhy90Bf9JawNOwhEf?= =?us-ascii?Q?aKcxWPxZDISbDde3VP+rtia+?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 961f7cda-26cc-4921-4111-08d8cc74455f X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 20:58:22.7099 (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: nfoYPNRVBMYT5k5FRwFIBGJR0z2ZDMggwAQhi1CcX7EZT8SUGEJKzoTa3MAqNaF9HDukcXTo1g00RPzlYCQGbg1A6S+gELRKlLTiCkKPkqo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1599 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9889 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 spamscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 impostorscore=0 suspectscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080119 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=141.146.126.79; envelope-from=eric.devolder@oracle.com; helo=aserp2130.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: boris.ostrovsky@oracle.com, kwilk@oracle.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This change is step 5 of bios-tables-test.c. This change is the result of the output of rebuild-expected-aml.sh. Signed-off-by: Eric DeVolder Suggested-by: Konrad Wilk --- 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..fcfec715478919a40b23aa20fe9= 0b5dc74114f58 100644 GIT binary patch literal 976 zcmaKqSq_3Q6h+HC4;wIH2`<4vNc_`?A1=3D;C>4wDK(pSli@Dhg0>1lbC@iyIGfl{8=3D zUxxG4^^fZ?>Svx(3ir4k^?^Fzq{pfb=3Dl2IuYPL5Xarh|VK5>7+jt9gMQR0UX^!h2U zKhI`JNPcMSpC4H+{&Ry%e-ZJR=3D8u`9;nn+b{|WgC`6jP?i(UUI`6>A(pHwLQIbVMt zREF=3Dj$7%kI=3DFf@e%#r`Szg`=3DtAiuyvU9!I=3D@p8eASHvsk$UFVj4wDK(pSli@Dhg0>1lbC@iyIGfl{8=3D zUxxG4^^fZ?>Svx(3ir4k^?^Fzq{pfb=3Dl2IuYPL5Xarh|VK5>7+jt9gMQR0UX^!h2U zKhI`JNPcMSpC4H+{&Ry%e-ZJR=3D8u`9;nn+b{|WgC`6jP?i(UUI`6>A(pHwLQIbVMt zREF=3Dj$7%kI=3DFf@e%#r`Szg`=3DtAiuyvU9!I=3D@p8eASHvsk$UFVj