From patchwork Thu Oct 7 17:14:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C8EDC433EF for ; Thu, 7 Oct 2021 17:32:46 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9D0D61108 for ; Thu, 7 Oct 2021 17:32:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A9D0D61108 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:53634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYXG8-0003B0-PV for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:32:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz1-0001fW-DN for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:03 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:10772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWyy-0001TT-BF for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:03 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H4MFu009673; Thu, 7 Oct 2021 17:14:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=zmxtWD/4Gwj/+yqhLepKDph3lerrj1eGXDRU1+vvzMo=; b=AGZBdYf15F5aSQ73UZeVsP9mGbtclTIrvBrzsiZ9MIb4kKSME4crryd2e6w8xZn08FpX aPvtZECSS4fMZ8clXRnDwDgGwaU/Z1wfNQAo9aOALJiQqjnjISnwDWbbfnqgHj0tubMU UeFVZvl0J5zL75dpq/r31bbsMZwpqNTL3rDwuseS5zhYHJon/Oh5B7TFAjNVJtAvQpvI aUqV54nUbDkRGybUb50ZTQXc0RckmyV6O5Y5EAZqXTzs9AvKvi0kXrpUhnihE+JgmLi1 QA1gJOuGD0NuXR8jQpFvilwjAcVvEO6AA8z2dzyMPPTrWY1bmGt9TyGHZUD8OR/qtNbX mA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bhxbs38j2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:14:56 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HASk6072645; Thu, 7 Oct 2021 17:14:55 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2176.outbound.protection.outlook.com [104.47.58.176]) by aserp3020.oracle.com with ESMTP id 3bev91a0wx-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:14:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fLeXThzzOgFQqya3wfKRpPon6kzCJTd/tJazYHVEGDKpmnGgOVovgWBjnIJKD1KI0+yy63j+5L9RJgPs5/UvbEKivInu1DgzasYLCSOC/8xL2e1Jd244qnVFb2vGXdOzfvlyRcDVugWWVwXyO4dbFn1vRk5BY1Oex8LgQa4ztPbOIuGaeS0jhqGj0ctXpks/dYmsbsjuLn4Rd6DfDIR+YMRZRV9NQxIk/bKp8E0VxPATvGYJFY+d07vh6ZFm/CQljBC3g/8wU0waKGLOWSGgrM0g+ZwnBdqspm87aINxo3Qg9KrhQN/5jNMxs7ZMEsMO1qyS0NHMSYEyV0+kjh700g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zmxtWD/4Gwj/+yqhLepKDph3lerrj1eGXDRU1+vvzMo=; b=T+nkPDblBZHZDFWsk+4+npvNrhWNrCW9632Gw6TpnS5F2HPUXmQas458Xj3N1f8bHxac801mEZLmfyAbVsWXEeMedz43P+ax1XHRU94rOK0Lp1/McMalFTxDKDIGWfelAHhSQD1w1lWEv6HopAU1Fa3P7J/mRqRsT89I13E714HhBc8WCLKLHlH+KSgEnFWkSWd1mJsBDtZ27fhy+Pr/WvvLnZ4AvVjUhy3Ak0m5EOOJxhw5r7hZaVUM8BNfjpGANvfoYDwQxmJBgTWt/y6u2AHBANTDZKT7LNwf3EuIMpFcj6AWLgLtSCPchkgfDd0F4HEE6BvAbWh7DRCmkJzSZg== 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=zmxtWD/4Gwj/+yqhLepKDph3lerrj1eGXDRU1+vvzMo=; b=BvmNssyuJFXADpO6XUva9fpLMA50AlTKakaV6xODnv6iGp1qNLsn4RCQMR/darcSxtpCHhC2IBtXekH2czmE0uAouGU4uEj1qf0sPKGH9EsI4yj3ef5aTvamSM6n+xkv2OQ/PpltThpd3v3wl+2cyZZEC4BQQUTdhzQvnKakZfs= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:14:53 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:14:53 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 01/10] ACPI ERST: specification for ERST support Date: Thu, 7 Oct 2021 13:14:27 -0400 Message-Id: <1633626876-12115-2-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:14:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ee728842-025d-4b86-057f-08d989b5fa92 X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jnV5a6MytuBJKPfsOlz09MZuhNMisIr4laYu7LKMtaiDZkTm+ea06+5JhPPYjTAdrsrsbG5OooO7g6Yq0JNuRSAYQaVr2mcvggIfuZQFGQiNApclk2MjFnn1P2Ff4It4FyAIH85XMixXw09C9kIZ3bdMpnpAjOBG6tM53/Qt7RNVeVHGOqBfVibepBzJLUGegnsTqpTj2eG9kE/bUoTv2ih6fVl42nK/OJik4W4xRIEnctPanydJGhxGSa0pPvQLGUmfImAeEFkXLXoa3jAJiUiiINrTKLjEJzDjfUT7n3nrY8SaT/TShnh25PMfO7qO4rAHi9W/7fppGMLWVXhPR0clr/c4quOqZWuELGAaTx5qU9A5O/x+egHn4FUTG0FMQDxpKiebN0Flf894LsVr949cuYln9mHD5nJ4l3bvc82jS4osZwSMIZWWV+rYWM4bDDa+KCSIfsKInlKwks57W9gwknbgIqGnM+ZuFEiFvb9NhKkyQZS9OwmliDl072Z19j8x8I+aWQoy8SkpyrvmWOvT4SArHBdOLVFPcCY7NjyAiZQDeYkH6gGy6meijMsutiKZHf6aYqcHDFBbWYX3TJ3MWTigew6H0WLvKumnQmPzZ/te/A/Xo3KwTHn1TSYpAavUMAS6grLbJimCbOAgKPLqi83D2ny7FpWyoU+zvHVRgLkQTHIKYrmnoHzIUrOXsemai0a0Bip9agwc9B9QvA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(6916009)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(83380400001)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(45080400002)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aYKh1E7tPI3/jk1YmML0z27q+EEhSvnEOmMX84Be9aiBmEx/sz2bw8STwWtY4g9EMhdZpU8qbnMnpGDPnS2VpbKa9O9nnhyD2ezc9mh8m+5boIQliG5J6NHDc0kU3rO4gQHkThmCY9kXVerumadnWyzGXf93HFxvcT2bC8/lGvOWJL0mfPg7YvpzsJYOB1fUR1a9k7MNJ9IYjNo5+MD0br70qKfskPR+nL/VJ1F//BQBGo7Ij7DpkkZHykhtErX97qeGQZ1tQc6w9xZqsw4m5nnkr4nKePRjm1qi9do22X9ENMnaOielyr2GiEOCDdySqASr59Ol0KC7itxcOGh79ypCJppjU6keu9ks9W0EVWhRAoDypgaJ+L+X3Ay9RC3BnKpCSER/isVmFD9LCQI4AH2hqGTwEGQarK+7Z46pv8rE2etbwdE7PWQdgxvXyeYykn2oqvt3nYLjYyOdt9bEM5hFoawChtRdBa2OABuJPxkc8SLErdi9CZ5iyRHnKAnqtrSeAZhtWoISTWKZfb8YWE87iB9z8UA0aQCCfRsU5emqGjofLnSdxOSq4thXQG+mlREzGn3z5I2T921OpKEcQzq9ogGP3OvrzyVDayb+ZEeBGkEAuz8Hgz4X9yX1vhl2yne3ZKVRzoEBUFQ1gkDY0PsExgG2rqDGnF6hZyOZmjin0Ro2fPlaqvm9/TrcFWn1h+B0w5s4Fztp18BJZwgOFlAamus0pPV8nUFIhC1o+jmBS1e9H5MMf/6mtlfSv3A0wzCM8a9tzaYKt2XsD4XBcqNWOJcF/buxnIhwY6p9REQiBZYv0gtip3JAMQf+ipfeMvc8tSaIwJTZ0O3+mdTpFuJJjrUpdWKdhvvSFsju3ZV5jj6OTlsUBbfb49fCKq1c2OgkNIIHZEmdt34tqUJTtYdeeeSAMshKe+9L0hc9QesmMWr1W1uhRk1Gsy1giH7Kmeslb3vXyacyy2iZRWBCmT6JJJs+hCeenaJvxFP2tExoxBjWZPErJLCnMMu/c+BTSLRCgj4V+dL5pWkECX4OXcWI4Tsca3MDqOpetMtx1RIII1IcCfplmbwHeZ6Vi0dwhYWycfyVirt52QEdB78uwhbAfyKsGpBdHYgD3gluLgSvW153Yc4iINjnpjgBQsT1K3gZ6bkYV/87HTKxk0a6xi8rfq6dTM++PqhvboiBuT8Lnyn4LBeL5yu+UkLGL179JbQDi1/VEHcVSNvfT2zLDdqj7WNvVsNkPNC7JOy3zZB954smEpmGphV7AHcmxkn+D6Y6j6jRCSCGiaF7AOdETDMOaACWcswuzlUewSuiKA/drO2nAE3R5pnzODvac+os X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee728842-025d-4b86-057f-08d989b5fa92 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:14:53.7088 (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: SkqCUknYBoshfgdYcl8CJInGDr/JrOCPRNC9Aso+QaPC51Sz7gneXpI9QCuTrIIaa4YJYGMmaYZoBrG1oiQW8dguC7AZ/Wvg5MiOT+cxc3s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxscore=0 mlxlogscore=429 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-GUID: y7bPIKsEtRA6xYL1hkKG8xYKXzX-qoR6 X-Proofpoint-ORIG-GUID: y7bPIKsEtRA6xYL1hkKG8xYKXzX-qoR6 Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Information on the implementation of the ACPI ERST support. Signed-off-by: Eric DeVolder Acked-by: Ani Sinha --- docs/specs/acpi_erst.rst | 200 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 docs/specs/acpi_erst.rst diff --git a/docs/specs/acpi_erst.rst b/docs/specs/acpi_erst.rst new file mode 100644 index 0000000..a8a9d22 --- /dev/null +++ b/docs/specs/acpi_erst.rst @@ -0,0 +1,200 @@ +ACPI ERST DEVICE +================ + +The ACPI ERST device is utilized to support the ACPI Error Record +Serialization Table, ERST, functionality. This feature is designed for +storing error records in persistent storage for future reference +and/or debugging. + +The ACPI specification[1], in Chapter "ACPI Platform Error Interfaces +(APEI)", and specifically subsection "Error Serialization", outlines a +method for storing error records into persistent storage. + +The format of error records is described in the UEFI specification[2], +in Appendix N "Common Platform Error Record". + +While the ACPI specification allows for an NVRAM "mode" (see +GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES) where non-volatile RAM is +directly exposed for direct access by the OS/guest, this device +implements the non-NVRAM "mode". This non-NVRAM "mode" is what is +implemented by most BIOS (since flash memory requires programming +operations in order to update its contents). Furthermore, as of the +time of this writing, Linux only supports the non-NVRAM "mode". + + +Background/Motivation +--------------------- + +Linux uses the persistent storage filesystem, pstore, to record +information (eg. dmesg tail) upon panics and shutdowns. Pstore is +independent of, and runs before, kdump. In certain scenarios (ie. +hosts/guests with root filesystems on NFS/iSCSI where networking +software and/or hardware fails, and thus kdump fails), pstore may +contain information available for post-mortem debugging. + +Two common storage backends for the pstore filesystem are ACPI ERST +and UEFI. Most BIOS implement ACPI ERST. UEFI is not utilized in all +guests. With QEMU supporting ACPI ERST, it becomes a viable pstore +storage backend for virtual machines (as it is now for bare metal +machines). + +Enabling support for ACPI ERST facilitates a consistent method to +capture kernel panic information in a wide range of guests: from +resource-constrained microvms to very large guests, and in particular, +in direct-boot environments (which would lack UEFI run-time services). + +Note that Microsoft Windows also utilizes the ACPI ERST for certain +crash information, if available[3]. + + +Configuration|Usage +------------------- + +To use ACPI ERST, a memory-backend-file object and acpi-erst device +can be created, for example: + + qemu ... + -object memory-backend-file,id=erstnvram,mem-path=acpi-erst.backing,size=0x10000,share=on \ + -device acpi-erst,memdev=erstnvram + +For proper operation, the ACPI ERST device needs a memory-backend-file +object with the following parameters: + + - id: The id of the memory-backend-file object is used to associate + this memory with the acpi-erst device. + - size: The size of the ACPI ERST backing storage. This parameter is + required. + - mem-path: The location of the ACPI ERST backing storage file. This + parameter is also required. + - share: The share=on parameter is required so that updates to the + ERST backing store are written to the file. + +and ERST device: + + - memdev: Is the object id of the memory-backend-file. + - record_size: Specifies the size of the records (or slots) in the + backend storage. Must be a power of two value greater than or + equal to 4096 (PAGE_SIZE). + + +PCI Interface +------------- + +The ERST device is a PCI device with two BARs, one for accessing the +programming registers, and the other for accessing the record exchange +buffer. + +BAR0 contains the programming interface consisting of ACTION and VALUE +64-bit registers. All ERST actions/operations/side effects happen on +the write to the ACTION, by design. Any data needed by the action must +be placed into VALUE prior to writing ACTION. Reading the VALUE +simply returns the register contents, which can be updated by a +previous ACTION. + +BAR1 contains the 8KiB record exchange buffer, which is the +implemented maximum record size. + + +Backend Storage Format +---------------------- + +The backend storage is divided into fixed size "slots", 8KiB in +length, with each slot storing a single record. Not all slots need to +be occupied, and they need not be occupied in a contiguous fashion. +The ability to clear/erase specific records allows for the formation +of unoccupied slots. + +Slot 0 contains a backend storage header that identifies the contents +as ERST and also facilitates efficient access to the records. +Depending upon the size of the backend storage, additional slots will +be designated to be a part of the slot 0 header. For example, at 8KiB, +the slot 0 header can accomodate 1021 records. Thus a storage size +of 8MiB (8KiB * 1024) requires an additional slot for use by the +header. In this scenario, slot 0 and slot 1 form the backend storage +header, and records can be stored starting at slot 2. + +Below is an example layout of the backend storage format (for storage +size less than 8MiB). The size of the storage is a multiple of 8KiB, +and contains N number of slots to store records. The example below +shows two records (in CPER format) in the backend storage, while the +remaining slots are empty/available. + +:: + + Slot Record + <------------------ 8KiB --------------------> + +--------------------------------------------+ + 0 | storage header | + +--------------------------------------------+ + 1 | empty/available | + +--------------------------------------------+ + 2 | CPER | + +--------------------------------------------+ + 3 | CPER | + +--------------------------------------------+ + ... | | + +--------------------------------------------+ + N | empty/available | + +--------------------------------------------+ + +The storage header consists of some basic information and an array +of CPER record_id's to efficiently access records in the backend +storage. + +All fields in the header are stored in little endian format. + +:: + + +--------------------------------------------+ + | magic | 0x0000 + +--------------------------------------------+ + | record_offset | record_size | 0x0008 + +--------------------------------------------+ + | record_count | reserved | version | 0x0010 + +--------------------------------------------+ + | record_id[0] | 0x0018 + +--------------------------------------------+ + | record_id[1] | 0x0020 + +--------------------------------------------+ + | record_id[...] | + +--------------------------------------------+ + | record_id[N] | 0x1FF8 + +--------------------------------------------+ + +The 'magic' field contains the value 0x524F545354535245. + +The 'record_size' field contains the value 0x2000, 8KiB. + +The 'record_offset' field points to the first record_id in the array, +0x0018. + +The 'version' field contains 0x0100, the first version. + +The 'record_count' field contains the number of valid records in the +backend storage. + +The 'record_id' array fields are the 64-bit record identifiers of the +CPER record in the corresponding slot. Stated differently, the +location of a CPER record_id in the record_id[] array provides the +slot index for the corresponding record in the backend storage. + +Note that, for example, with a backend storage less than 8MiB, slot 0 +contains the header, so the record_id[0] will never contain a valid +CPER record_id. Instead slot 1 is the first available slot and thus +record_id_[1] may contain a CPER. + +A 'record_id' of all 0s or all 1s indicates an invalid record (ie. the +slot is available). + + +References +---------- + +[1] "Advanced Configuration and Power Interface Specification", + version 4.0, June 2009. + +[2] "Unified Extensible Firmware Interface Specification", + version 2.1, October 2008. + +[3] "Windows Hardware Error Architecture", specfically + "Error Record Persistence Mechanism". From patchwork Thu Oct 7 17:14:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27350C433F5 for ; Thu, 7 Oct 2021 17:37:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95BC66121F for ; Thu, 7 Oct 2021 17:37:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 95BC66121F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:40798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYXKo-00058i-Mu for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:37:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz3-0001iT-6B for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:05 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:17196) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz1-0001Xa-B5 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:04 -0400 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H4pHI020991; Thu, 7 Oct 2021 17:14:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=reLi2kXLXhRbKnWjAw/IvNQkKGM3EQgtkigu+BAB4qs=; b=JIjx7nKDmmDwQZ/7hN+WM4tTsO+xyjrfaMpa+eQJpk70Pn64kXN62SgyPrZggDs929y0 7eSl+xGmoUL6GLSzxeqD+2oKbcehrtavp+aBsMJiqsqTunhqvzQ5g8zxI8jv7ictrqO3 +sQEyiv7NO/+F/az+1Kq/DRFvkOf5Dgc4gXySilyRhR9PBK6DGiXTavPkL3VNZdpPN+r trsqaYskAo4EE38KK1z4Q+R44g++/BO7EGDUB8I9XsBEXf8KyhD+VYPfDLxcR3H3904e yN6iTqZ38zOwBPrU0ymLLzOZ3jfMxJi9QIPEtmVyzxUPgrjg08N1YkQwXuTXTbLjGW+7 pg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bhwfdkc5a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:14:58 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HAS8R072649; Thu, 7 Oct 2021 17:14:57 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2172.outbound.protection.outlook.com [104.47.58.172]) by aserp3020.oracle.com with ESMTP id 3bev91a107-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:14:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nlbdznhQXLXmgH/SYxRiUmp+pwB3btG2Jo7F/cpP8FGaoGiHTY5L+j7jvPD8PzfalSwbHETqBxCAm6Sa1NMP7L4+oWLi224FGOQ6Pd2MXMtiOOfpxF5Qsbt6dPgV3YJbgeKFopZoYVC6hcwowjT+pMmfXZE7DCUhJbYA+B7i7bdZi4oRWirbIpMF4uJ6lbqJsBJ9LKooPnW+700OOgYDzvzSVhmcptQbhQACLx0PUMGmrAJ9LBuTbzOb4UFLRQ7xAcB0nuKRq2/sPlth0fND8siV4y1lKfKL72qCqkf7q4t+ytxTCK9p6bZuiDzgydCsew0j0+YuAIkDaohBTZJRVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=reLi2kXLXhRbKnWjAw/IvNQkKGM3EQgtkigu+BAB4qs=; b=ndX1+Fg3Ra/FkmOXao7hA9aEP8zaDjfINCp4IMvue/tSLwSW/YADdz9ezVUg+HUp5oa4xALVYaZnMo9jXGr18nw6Lhpvoe2nlD6jJ89jNts3fuXKsJET7ELYWLkeUAUrMvpRQmj7y3749td6VOVl7LaBAfsoSL1O8I8Xv7Q3ngttm/V0ePESs48I1hyUG6usTvNRaEn4qqMi77ZDoicQQYlc/mS8n2b8EkV3mswqiBoe+s4tIP0GqXxPT1RqVFmJa8/qXSNvY57kwMe8l9aE6qJ7bg8zk2Gmcrf9JZT6xDpFbKidUUqnD0aID4zDW4dqbBuPYXWz9wRAVJdutDDZCg== 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=reLi2kXLXhRbKnWjAw/IvNQkKGM3EQgtkigu+BAB4qs=; b=Lbh6METr56/cTSkyMwniOL8mYG0ZumkXGgKWCvXWMr71eZNvmnHwjEf9DXObmWKlf2EY1nWWF8HW2BvFFYOxTkHAd8msTsgygUimZXloV0Fx/glK5Bpm14qpKuyh040XnK76M+SVWyUXP5mPd0FUtp/BBF1Pwdp1MChfSlgOQxg= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:14:55 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:14:55 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 02/10] ACPI ERST: PCI device_id for ERST Date: Thu, 7 Oct 2021 13:14:28 -0400 Message-Id: <1633626876-12115-3-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:14:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a714b004-e73c-4bf3-0056-08d989b5fb6e X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZhLH8IpZ7jSAWR4VJ5KD9jgqVLCCQo6yVIrjt/js38sX6lWfrVoBD1RqUksaWwvlPmeSufCR5AtByWOmx4c8G8PBRlNvR1D5UB7hIHLBeIBBzUXnv53gUGbtg1QILSDIwvbMvL2XOu9qH7AQ4J7rO7wwWveHMAEq2UgovhD1z3rNdjpBrHuDFETCtG0/v9dpQhebGOWto8hmbvvg4iSsZxuTQu9O0qi87xBRyvEgxMb/GfX5cU3+w7uMDX0epDdCVG0YA4QF3oraihIPsCSJmpKhAq7iJRH+aAuu9Ud8WX4Q1MBbpt1/qKLNghyVKl7pDzlOUOkTVY+e3r0qoPeBHtE9O4vAK9Q5cCpVXYcAbwI4QWz7uqLzf/qvdf4z7khralyvLfSCQiY6x2eQY2AcCggAyF/iM9qRv+dgaivLjJ9bUtMLA1AP8ePG3TIq7ScP8EmbcSgScmV2H5LW46RBINUhmMLj9g8La8KMZF2pOkNThgCQJolL3W8IQpi2pNHC4tetBNtPnM/zGuoaGP86N589p239510Pgj+WBGa5UgbawDyQwbDjUCVBberHdkHS2sosx6Q2kEJ8iCfuOolSmt0x9UpWkYvvDS5nfSiDzRoTYmHF5b5SwWz4x4jqqiL9rc3POsWtueozcvrCOAGxVaaSqAz6Cq726nz32mTJVXqyAglE494h/Y/wJuuuFzUFjH1EUgi2JAUbHqFLzAeG3A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(6916009)(4744005)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Z6ElOi0jnXI/BJOe5KbLiKWGACSILkmELvh3kwObFaHAL+s8P4Re3uQIIJzsXSHFZtjqi1iLMW7OJwdIEC36SM7y5BbeU8bJ0Atw5venvHyJsqvGUerR0ZBaBNiM0PFJehsRYrJdBGufZwYQB97bMGr1kgJ0k5qqg/axxT5Vd+J4nRg7ROOj32L8Cki5SJminaomQwoDC4dPimBSlreGNO4OhIvPBxAsSEPUTD8dXnOe8fCysbbQNmyb3SwKkwQAU/092O0cfvE9j6A1NT+S8LgZw3Dlt/r7y/kvFacjuRqeQ0LogD9Bo017VVxwlSj4fD4lkr+S5ap/NrphimHVNDwy0aqlA588ykeaV2y8GlXKI4JK5jz/2OBpRY543ZV5+y9WN1u2WyBU5TndT0VpJ/G4WFhfxfTPId32RaRSJ/7/rAU3WjY3X9m0qHk9mLmyax2HeHQ6L9iXlbS2rmSHuv681nVdrqEuTOCvgRjCe95kqWJvIaZo/vKgrYrwNNlR2RkxheTDYh6IHqsG0m0504iTUU9q1zy+l9iDymoQ1s3XePRWCesOdnqOBxB8PfP84qmWnNEC+z1+oot8fhsBfHwvT1hCMSxk0ZONYVZJLvXvkkCxa6dlOSf7YYggf5byVDLG2u902jlT0gUUdubqD2iPAAPBMhh/c558NA40XAqo25tG6BNqODK2lEx2rmojFPGNz6JnuY1lHyLHm6JgyIykXQa7Vt8vLorzRQgkBL2JxBKT5quux0vaFRUbn+nc8qlXusABdgMvC0QFW+1iEqccrBAiiJFtSGmf6lOAmlqAl9t+pbeWlyjBm0qtCWfEuqfJcN91albg2uKRTh8kUB1a1M/Cz6cC98p3Qz5ZnEJ20+oQjkWUK+3iomqrR2q7VlLLXaIYVbEbfJIM6U/X2B5wdbOMbTCwpuk4HC+B9RrFNYYbRnMeMUpn+GT5vkLjCfEQ8lyEJVo8JXd5qZ5Vx976Zb3O+9bs6qP7Yk+a717UjjCPUgLBtVmaMAJ8zophl5touH/N8LriWIrrD6SXgmREVUHTu0gjdymowsuXYBb/VZ3mRdbnTfKCWm2sEFo2ZlvEOwxS31BQ/ayJPCouYuJZRcNdg8hZ2xRFSJ59ZsA8IrS0jr8bXwjafpY8K54zcqu28EhXgWFKhEvh0ngHIco/vUfLH8YpJbnLX5UQaVwdXjlbieBJ+8tLH95SosLsb90+J2BhndwD9ABFwmH3ecL8wIs70bEguTHxjuwSqJLtZ9hMcGBD4xn2Gk6+PZ2S79uEUpR5TLNsucTeQsdFZ/wo+nDgAUoOMiqAWBuHOY2SNa8ml6e8Ud8/hClB4ID3 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a714b004-e73c-4bf3-0056-08d989b5fb6e X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:14:55.1784 (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: h40umOrsGoks/ZlPaMPQ0B32kS4kveIx7xDQo07kpswbJp1ebiXn5lKOQmn3VMeNJgF3LFR3ZveIN++LHKVMOVz2BkVA9glnQkIQkIulf7w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-ORIG-GUID: dweQHbY4Cm5UFTitmbecVkStGNjSH36p X-Proofpoint-GUID: dweQHbY4Cm5UFTitmbecVkStGNjSH36p Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change reserves the PCI device_id for the new ACPI ERST device. Signed-off-by: Eric DeVolder Acked-by: Igor Mammedov Acked-by: Ani Sinha --- include/hw/pci/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index d0f4266..58101d8 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -108,6 +108,7 @@ extern bool pci_available; #define PCI_DEVICE_ID_REDHAT_MDPY 0x000f #define PCI_DEVICE_ID_REDHAT_NVME 0x0010 #define PCI_DEVICE_ID_REDHAT_PVPANIC 0x0011 +#define PCI_DEVICE_ID_REDHAT_ACPI_ERST 0x0012 #define PCI_DEVICE_ID_REDHAT_QXL 0x0100 #define FMT_PCIBUS PRIx64 From patchwork Thu Oct 7 17:14:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CBEAC433EF for ; Thu, 7 Oct 2021 17:34:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB6CB61108 for ; Thu, 7 Oct 2021 17:34:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BB6CB61108 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:34016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYXHu-0000UM-VO for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:34:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz3-0001hz-2h for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:05 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:33846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWyy-0001Tm-Pb for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:04 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H4gkC028807; Thu, 7 Oct 2021 17:14:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=QVs4244pfx5/5CAw7lzpnnt08hn9BG2h/zZXOzp19ss=; b=FzpRYFnKW/AlJLz2DuP0QxGJwpkTr4CrTNe3MRw2QT7fijVUxs/vxXJLjFxolY30IGZl 8DGGJfeMjSpNKql+OxGWi7UKUWSOac0Hbg+IsONFjnqNf/i8rNl9Xs7PbW4g6OCGeNz5 NZmijUN4TQcMpQx+mQX7ecM0TGM5nlW8SskSvQhdA3h2pPraJiL2wu+MJitsRLawAStS 19TdXqBttv7rrOOkvIUZOD2zpAYxybQtvqKQdSDmY/AJSG2jb6QQGwQ45oYQ4WAlipFi 9kfMk04+SsXK+i+pDDD9vcv+UGtEiPV31+jsgyTLK9iPZWQl8s6Jb20Avw+Z8QElwy4z ww== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bj1ecj3b4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:14:58 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HAS8T072649; Thu, 7 Oct 2021 17:14:58 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2172.outbound.protection.outlook.com [104.47.58.172]) by aserp3020.oracle.com with ESMTP id 3bev91a107-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:14:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L+h2p63l9mrM5+rQXt+iSVMSw0Z3OgNn9TeR4Scc1JnMnYpnHZ1W67VSWNWiAs8mk9c8GwjJpWV6nKevYzrzVV+pC9Ye3XcHDHjqSOly4WP/2KvFtuU+3Rq5rb7kkT2A0kgMD6c4uaGoFzkuMCvYr7vKeTEEhZxLQQDCL6Yrj58hDh5KTEnpP9gf41wijNr/1gEplbrbt+FG4ZduVj6zOO6owX9t4BKAMATmD3onnsBTCtLWgqA2eyKHINz6mIQjaQUTcUHVLxHXax08JFRPuVnod58Zl8M4nbLJUJ2wWkL5EBortS7KexjT/1pBSyX1e8flE8BWrapBWRTqk0VV1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QVs4244pfx5/5CAw7lzpnnt08hn9BG2h/zZXOzp19ss=; b=gKiJ3aHKjTwHNoeOJQxsPdbRIHejI8DTSokSN3qgmYpGzOEjP4ElD2yCUeTBfWeAJAn1AUkkXbnnh5hHQpKEIH0QEqB2QL8q3x1jhhlt6QmSdrE/+f6su+VT+ojdcgOFibfyfofjOIVK4wVgNBnQcN+29woGtNwYvNW84nQjkaMnYLULwEiBEDwmsgzuDyxuiZyT2t9WUkV8VTdtZ3vKx5mPXumiAymBSvjq5LgHJhAHQWvXDfy0r+8me8u5Pum4/udOSXlaeTkQSlU7kfKPyfekGK8DQsiYDfXVlmxIz/M0aEMesMWy0zOj051OhW2SKCTvwQvEliusFe4ppn3xyQ== 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=QVs4244pfx5/5CAw7lzpnnt08hn9BG2h/zZXOzp19ss=; b=l5TOCxeVGjh2P4SjkSIbBQzUVdoVIie1W7LIeSSl/hJSchY/zfPsMSbH3ZI/B35kFqEjh+W0JOWV9z9Zgv9tM5HBSEhfENuhTAjKoEQkO2oTGzjZ1OxUryZkWbfDbSCw526vUNJl8WOGo+ciYCbGVqZLZfMteN1RqX9Nojy5qKc= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:14:56 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:14:56 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 03/10] ACPI ERST: header file for ERST Date: Thu, 7 Oct 2021 13:14:29 -0400 Message-Id: <1633626876-12115-4-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:14:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac4f9411-3c0e-4578-8765-08d989b5fc61 X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SwDvOqEtKrnsWyBMcAA7qSdCaRVJLBw/+0lZwWbS9YqV1izFsMKo6nxudISuiEFLwqeJqdy7+3vkviTUo3cNSKuPdNtKBwQA3WEGDfVMs4hvW5G9HNMpNy11rKNQdeA0hOQmpAk/MNHPnMb113dwygMA28j1ViauYvRTJ1PvTWc1jcq0vEEC8K1kVbMmxz6Cam5riYyExPB5aBR/P9vIssKc/5GnW/Dykbi9fOCFgghzKj5qg5n3Hqh185iWU5B0A7k3BIc2JsLdaXIo77TMH5cLufd8Ewkb527SZJBhlRpsEhAPOo1rE84Lp5ENG8PdvSAP1T9zE3/+UqlqhHyPuenHTpCNGOdkgmSdskajTuy688+PlTaP3V7WQYPz4OQQpdrPsIxKCYoMyaa2wQumpC3QHP3Bw8xfhQLMRIc1gylngQueusXxcIutDzBWrnOl0GheG1bGebOw6g2ZW++eVj2nPCXokuB/E6yO+dl5vXho4f1a5y+D/mYGzuYNSX0SJyybSANGbxw3Lj+5T+MdRF21cn38S8jKNIDQ+loP0MCndsHA1dfgcHDxRW8yiFzWxqf2Xuf1jK12OKGIDxssyxlUcZxTmoCX1pmwzKO/gEIVoHKhIlBl1lvabCH2cEEMWUa5qFoDtYI8/Sf2EqUp+QUjW3uRM48peKgxy5oYpEs1XKuZChQrUmZW4dgBFzxCn2HM+unX6ST2htRXlUPjvA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(6916009)(4744005)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Nozv7UfG+5qNTMZLy3H6+oy9+ujyabtao+rRyW1dnGObA524Y9IStWgVbQyfj0Z5vcAMN+ZS+Wr2yZ/kLv/o/pk1pMUrAwvyQMspArCz4sUCw0vwXABmCstHSWzOnguIon9RGcPO1vzADIqdH68A2WdOg8B7fyO70GQRCr+MDiO1jVslWYLI34SEmXKnGpNDAPCrkbZIyukLHN6D6V1/0YWmigOznc7nfHiZBoNJS/SNLkdE1336SUaZ0bqsJKz8qf/f9wQ8P/nwKko+aixMIhNaUQH4tx7iF8wp1c2JNMarQl19qgPFYyJ9pqweGFfYYy8lMBoY8pepJVeCH8dpqcZtwmz0hCrn50rDpIvpQpx8gWZkYrRmFTybjPez0eisxG/4p4LGBnpoN9Bu/jdpZ0t6kc614e25LFTowZgtQi9mOuvjSRMXvH72uL49sBmGtpmJyVFSecmPoZE+h8gKS9HUZtgtDh8MNWeHmq/4b7NmdeUgemPvhCfOlAd61m7OwX0G9Ux75XtEEdVR6L/V8/bcD0QWac5VV4Sv8gavmgRUimp/wLTJcvFRwFT3pkXysjncyF8wb/od7wbvbrFJWhQCOQn1np3ngXv+UJ0ct7a+Ze1hXQ7smc2xzZoxjQT1Uqltg6OiqJaat0enbo96SonQaqY53cw8r2B3tERpkKZiA1SLO5kd2By3BX5MSb65ulTtY1odtcLhB9evQIxX4k8WSfUZuXChlqYeCRoaDdvHUv5A2tXjhpT9mtRz8jvD7JlXs15IOuZ0h/fjCMftvQFXQeQg5HaBoDARQ1KszNUyMLx8VkN6XrlpeUz71rKipEImBXEGD0ahYeHPTxbwUqW177d9KRR3YAB0BXHQhluAN55l9MLCgTyN3fTKXdx6dmdXCZ1tESRusS5xx2gBIHlfu3Cuu5jKlcZ2KS/DwlBWUS5OYNOPgioz+m+MVkhapDGaqNaGEbyuBFa77xcXaDjNnrwG0z2epkx3Pwg3VqQO37ci1+wc5lR65Pf4qoNEs3hyxQ98xQaq2D7Grd+pc/0cComDXqu0kpS3U1+zCcMztfyPz2le4YiR0/jNmJkt70+hDY2D1CmQIwwO8qCEBQRV2yUFaTcr12M5OVTovI7YyJMsavxbEmpQdSB+l/6As/qBsvFn7AoohLJju+OAsSBmJ6arLp43nwZLpzKStKInBAXPbVlvL9dF4zbDtPi1bsR+7qm4eLxAITJIQjSSBG5i5hAQhhXRFH9+4MD8uCbPEm8HJ47JhoCPswjFbOdAa6cKGnFQd31dEz/pG5oZ9bGsSn+WFuRD/YQEW7f+OGQxXk4tNLMn4oJ4BHQw1Lb8 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac4f9411-3c0e-4578-8765-08d989b5fc61 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:14:56.7704 (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: 5wLQaKXUbzRBmtjlmPci+7kvOXgCJ4i0yUGZQjoqwdYpvIQZqHA0Kt2UxFXgdMZs9/h9l6Q2Xb5bdJbSOPkHLzd9cYDfcRepxPSEPUBZMdA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-GUID: hdSqHvfpA5LE9vAU8SNAPsPUkDnTfiqe X-Proofpoint-ORIG-GUID: hdSqHvfpA5LE9vAU8SNAPsPUkDnTfiqe Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change introduces the public defintions for ACPI ERST. Signed-off-by: Eric DeVolder --- include/hw/acpi/erst.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/hw/acpi/erst.h diff --git a/include/hw/acpi/erst.h b/include/hw/acpi/erst.h new file mode 100644 index 0000000..9d63717 --- /dev/null +++ b/include/hw/acpi/erst.h @@ -0,0 +1,19 @@ +/* + * ACPI Error Record Serialization Table, ERST, Implementation + * + * ACPI ERST introduced in ACPI 4.0, June 16, 2009. + * ACPI Platform Error Interfaces : Error Serialization + * + * Copyright (c) 2021 Oracle and/or its affiliates. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef HW_ACPI_ERST_H +#define HW_ACPI_ERST_H + +void build_erst(GArray *table_data, BIOSLinker *linker, Object *erst_dev, + const char *oem_id, const char *oem_table_id); + +#define TYPE_ACPI_ERST "acpi-erst" + +#endif From patchwork Thu Oct 7 17:14:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542463 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86E32C433F5 for ; Thu, 7 Oct 2021 17:29:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2902603E9 for ; Thu, 7 Oct 2021 17:29:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F2902603E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:47760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYXCn-0007R1-WB for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:29:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWzD-0001np-Cf for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:15 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:26968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz7-0001td-GX for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:15 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H5OEe014733; Thu, 7 Oct 2021 17:15:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=Lbb75QDmRkagqrdz6YyHWHrXBDOMop5m+OWvcmp/43g=; b=Cok3aTLhKY83Oz8IOFo4GR4ECdUSk6OJBOJnjmnyqLU8fQ3L22FoLeH2ylLtWF/Bt4yd sdd9PP9xC3L4QVSXiKNRX4iq7vOvYwGV/nvkF39S7vjlzQ9TFF14szPbOH9Tk+J1m/Mz hof68CK41IsR2KrKEztsjy5yyg2HngKhGv1ZgDaQtydrsmw6p0HVE/wke+vxtDC8z8wa CqMqdZw/TdbVwh7lr9muTj6O/p63ypfl0gCcTbzVE/vzh6k71ip6+L3FbGlb0pstgp8D 42DsOsKxNEOOYnd5kRDyhWAub/V9nUsg6hQUF0+Z0LhRvj3yiev2wG6I+yPvifer6kWG oA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bj02jjcr5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:03 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HAnrk066991; Thu, 7 Oct 2021 17:15:02 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by userp3020.oracle.com with ESMTP id 3bf16x5tk4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RwWHZke7Sd6iA3raW5kog5vqzqhEvdg0a/a6vJxuJICHVKD2WYJ49SksLG2PEO+BhMMYjYK/BI9pVacngUqu8otc0lXlGEKdz+SkZd2kglw+dY9BDZefUpMElceqoe0V/U/LQr48PORZsnDU/kjp968T00ZuiuNQS2TaUliMEgHoSwdXGSdVOscG1YRloZpk8jEsPlcuqp3ZebXZAo7Exkj85pxUlZ3tTUcm6txguUt7n5pXfhIlAVZdoRpJsgOOePdXCeYsl82m85cMnnasuUUxalyV1sN9qQ685qmKUkTnENZXk68YGvPLMlGt9Bf0azQ+ROJK7KdUvjP6fvdQ+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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Lbb75QDmRkagqrdz6YyHWHrXBDOMop5m+OWvcmp/43g=; b=NTKibV7TjBxPXvrzvpnmcIRolGTNL4o7r8lMX9LdUzcxOwW4HVAjR1MbcbqvnGqaXJre9anKJhXjxtUrtQjhB+8diC9WpHVYd+fQS4XZoC1lM53ZDZ8numnKiqje7cTlGjYyZTrv8z7iCfAy8htYCpFnxz8kLCQxg/Ms4ecP7HM7qpTZq4AvWUbDNZU8lllfwlXKpddqtPz5C3pHNGVIUgqjZsk/QNNiZqy37LI1DLeFfc2gybmwOm06SUix2W0NsN1rgGpUMmKcd15/FWTW+8inmacmZxHgRcb41D2kaKNu3s5vD+EfhtKGT8wqw0BJmEotE7cO4rKuWolry8VQUA== 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=Lbb75QDmRkagqrdz6YyHWHrXBDOMop5m+OWvcmp/43g=; b=X3uQpSTv26jbexBoJBF3yZV/deh7CG/DnjAQ1ZSx31APfaxpSZgmWL8Ytqpy6aYsUXgUvSZTMl3/JigwCtjqj76NWAD4wP7/r6oc9RVYtl/KktdMnqfF1zF0uLZfDsIsVfK47PGhNtkz9xvRV1QhB7klq5VwQAal0Nt1NnjTWas= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:14:58 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:14:58 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 04/10] ACPI ERST: support for ACPI ERST feature Date: Thu, 7 Oct 2021 13:14:30 -0400 Message-Id: <1633626876-12115-5-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:14:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b26086ed-9547-408a-f8a4-08d989b5fd6d X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CNsLXxZxvd0VuocgV3yidEEFgiDrjBOhjRo2JpFjAOMq4P9lQqlPTCDMjxEC0YSt3VvJ0gu1+ndTaqAOU3ZS/gDRL5Tu8lhEMXEUv/6A4LyLywBdhKBVxuBQH73wf+VbhETFywd4yX9Y5ejg2HFM1twC3Qs+WimlxlQJjh3AZ+cDFLaf74XP5rMg5wSBon0wTl2r1RvsQoC9O50WU/Q/f0xba5N0yrZmg2dSIqTvgWtNSCaZFGfB9m89Xp2L8sbF13JQ6EozBDdrXhrosCzdWn8Kaln1ze3LGFuwKmwBSej2SdTp5DRYBIUA6Bmz4AlopKYdVmmVIJ8vUUYFZH17pdUmhPt3XVMImI6Tkmysnl7VbwHUQnFKpxDGwCCWqaeq+uSobnduizsTPa3liQoUBnKzRaZ1pTbcIRGVb4YXL+XKoIyggRqGvyReYb3dBWuNEhz2gUveZCtc8hmow2E4TidtVVT1MOMtYXe51KUK+ltvVoIaqGVPzwHzJVghxORUdQQNlEK/Nlj18y41paI0fJfYNdb0awON0BcNarHVP3lWETyFxMaZR6IVfnvJmiwJF4EjNyFAXYrvtI6N6ZhYhd4O0UMBGVUoVpck9FsxUalzKoxOm53b9T4QGb3wbIRGJ8IcOe803caZCbiDWc8dp3bnAVfZabwrEwVz06rjfaJF7BUEXuklvnX4iSwe1YK09u0CasR7A7HyP03PK9NhpA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(30864003)(66946007)(6916009)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(83380400001)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ksCGRBndTUNzuVEs0JCzbzAaIEY3aOTG5W1UlVxYng4Y1X0dTrm3srClCXEict6hVoJSW5xwlHeelKiwIN0D38qyxP2DcfeZP0gRH32/c0N1EapSnLGkd/DbQsiwhAza2QCF6iHiDeUpbXdiKsATVWZXXedhicbD6GpQVp/LrxlJMfnlGC/DCmmi2Wif+/NBVopoJrfzXi/p033HHh7ZeKAd31ogphOrzWw2qgqOwXDlpMxw/3O1YYtoHg+KLbb2sEPCI8HiU+aCRrBhXnqEFIpYbaQhKlbiYtcjDbiI2qfZ35jCg5wBLomvSXRzG/4gtIDYCqrFZTd/e0AivQ6nM9AEEBy6QCNuaV0HtXK8TyalApCy4qRl6jjYDjAB/EyRgREnr6xDmSpQIZZ4S4HUfhmTQbqv0TIitZanCsv8sbh3kWv5trKsFF0cO+TwVy6JSMKv75Gy0YoFWFs/ok40QtxhL59a9Bi/9CYm/P4LfWFz21iJLvhO3zAtzSOBzugkuT3lrxurDRVE+6ikAXnRcKHXJIkmWgzZmanexv1lqCAWpY7NH6XeQyA5Ggn+ZybEc2jMbG2EfUkW5u32sxhLifk1El5WsBpvIoPZ2t0XmEFSN19QIiYtYOFL/PDlAAj0bpJ0sjVi4lRFlOaZoTR7hxxPynZybh91xVOaKmlMRoP96AoZuNQA6bTHe4gnxXHVypUYrV02bATVg3m0U4/HN1AEhvr2ob0H1teOVvR3ZmCSKGitKWoUPY1NzeTuZOX0FgWJwCxzPz2xlpVxvr1Q51BwreXxIDRb7P3W6qPAZ7UnJGteqq4HIgaHmSqNN01eMz5i7j96hhlPVzBCQFrDLUIQApnGuaXT3fhvEuqDITVXNB4X+0mYpkAIiTpKtAX9ePP/Kr459R91Vt6XNp6I2cWm9/DB/Zg6FDmRb9PDEGIoNMij6K0+lGvif1ZyK3XM6Mtzpe4/8WccH4YGvj6LaKl/9QD2mMfMvgeICwvYlmH/wgcoOEFC99pHbaGfF7gFfCooe7zoCB63ZhbXkUJeOD/HGEJGwYnaIpwlAaUaXbmZjSn1LHfBqjZpnxfyqVcZVISB/cZFe+89RT3vC8U2CoTg5HUvjsG11cuCrgfyvNtuePKx5RVQ/6khXEvQRD5nouMyLAmIF/DQYdCRBmSOwbOTGzZWJMV+wp4ie1GxnmrGeqMYXWZY2L9+40uRzBDOZyUutaYqvwZxoKzEjx6P/oqlBktjmNSsA9+WePoU7qIcS0Pvq+C7/EMxKs8Oo/J03noCeot9HCBYP5fGaVNfnErG+rQWh1K45RtEx8A+8MinTuV3jkLIjmPd9gOv3+pM X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b26086ed-9547-408a-f8a4-08d989b5fd6d X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:14:58.5067 (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: qy9GG3aNApiZtUTIG+0NgtkptbPlpHxY0YxXLtGM1wMstQX0SoZ0R1oIT7wXuLTE8xyd+0auRywNSZRf2QOuYvMARk8iFYalLgOBNtpS6Dc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-ORIG-GUID: Jf4EB6gGrTJb9pMbLnsuA1qtQl5Kro1I X-Proofpoint-GUID: Jf4EB6gGrTJb9pMbLnsuA1qtQl5Kro1I Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This implements a PCI device for ACPI ERST. This implements the non-NVRAM "mode" of operation for ERST as it is supported by Linux and Windows. Signed-off-by: Eric DeVolder --- hw/acpi/erst.c | 836 +++++++++++++++++++++++++++++++++++++++++++++++++++ hw/acpi/meson.build | 1 + hw/acpi/trace-events | 15 + 3 files changed, 852 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..af7e1a9 --- /dev/null +++ b/hw/acpi/erst.c @@ -0,0 +1,836 @@ +/* + * ACPI Error Record Serialization Table, ERST, Implementation + * + * ACPI ERST introduced in ACPI 4.0, June 16, 2009. + * ACPI Platform Error Interfaces : Error Serialization + * + * Copyright (c) 2021 Oracle and/or its affiliates. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "hw/qdev-core.h" +#include "exec/memory.h" +#include "qom/object.h" +#include "hw/pci/pci.h" +#include "qom/object_interfaces.h" +#include "qemu/error-report.h" +#include "migration/vmstate.h" +#include "hw/qdev-properties.h" +#include "hw/acpi/acpi.h" +#include "hw/acpi/acpi-defs.h" +#include "hw/acpi/aml-build.h" +#include "hw/acpi/bios-linker-loader.h" +#include "exec/address-spaces.h" +#include "sysemu/hostmem.h" +#include "hw/acpi/erst.h" +#include "trace.h" + +/* ACPI 4.0: Table 17-16 Serialization Actions */ +#define ACTION_BEGIN_WRITE_OPERATION 0x0 +#define ACTION_BEGIN_READ_OPERATION 0x1 +#define ACTION_BEGIN_CLEAR_OPERATION 0x2 +#define ACTION_END_OPERATION 0x3 +#define ACTION_SET_RECORD_OFFSET 0x4 +#define ACTION_EXECUTE_OPERATION 0x5 +#define ACTION_CHECK_BUSY_STATUS 0x6 +#define ACTION_GET_COMMAND_STATUS 0x7 +#define ACTION_GET_RECORD_IDENTIFIER 0x8 +#define ACTION_SET_RECORD_IDENTIFIER 0x9 +#define ACTION_GET_RECORD_COUNT 0xA +#define ACTION_BEGIN_DUMMY_WRITE_OPERATION 0xB +#define ACTION_RESERVED 0xC +#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE 0xD +#define ACTION_GET_ERROR_LOG_ADDRESS_LENGTH 0xE +#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0xF +#define ACTION_GET_EXECUTE_OPERATION_TIMINGS 0x10 + +/* ACPI 4.0: Table 17-17 Command Status Definitions */ +#define STATUS_SUCCESS 0x00 +#define STATUS_NOT_ENOUGH_SPACE 0x01 +#define STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define STATUS_FAILED 0x03 +#define STATUS_RECORD_STORE_EMPTY 0x04 +#define STATUS_RECORD_NOT_FOUND 0x05 + + +/* UEFI 2.1: Appendix N Common Platform Error Record */ +#define UEFI_CPER_RECORD_MIN_SIZE 128U +#define UEFI_CPER_RECORD_LENGTH_OFFSET 20U +#define UEFI_CPER_RECORD_ID_OFFSET 96U +#define IS_UEFI_CPER_RECORD(ptr) \ + (((ptr)[0] == 'C') && \ + ((ptr)[1] == 'P') && \ + ((ptr)[2] == 'E') && \ + ((ptr)[3] == 'R')) + +/* + * NOTE that when accessing CPER fields within a record, memcpy() + * is utilized to avoid a possible misaligned access on the host. + */ + +/* + * This implementation is an ACTION (cmd) and VALUE (data) + * interface consisting of just two 64-bit registers. + */ +#define ERST_REG_SIZE (16UL) +#define ERST_ACTION_OFFSET (0UL) /* action (cmd) */ +#define ERST_VALUE_OFFSET (8UL) /* argument/value (data) */ + +/* + * ERST_RECORD_SIZE is the buffer size for exchanging ERST + * record contents. Thus, it defines the maximum record size. + * As this is mapped through a PCI BAR, it must be a power of + * two and larger than UEFI_CPER_RECORD_MIN_SIZE. + * The backing storage is divided into fixed size "slots", + * each ERST_RECORD_SIZE in length, and each "slot" + * storing a single record. No attempt at optimizing storage + * through compression, compaction, etc is attempted. + * NOTE that slot 0 is reserved for the backing storage header. + * Depending upon the size of the backing storage, additional + * slots will be part of the slot 0 header in order to account + * for a record_id for each available remaining slot. + */ +/* 8KiB records, not too small, not too big */ +#define ERST_RECORD_SIZE (8192UL) + +#define ACPI_ERST_MEMDEV_PROP "memdev" +#define ACPI_ERST_RECORD_SIZE_PROP "record_size" + +/* + * From the ACPI ERST spec sections: + * A record id of all 0s is used to indicate 'unspecified' record id. + * A record id of all 1s is used to indicate empty or end. + */ +#define ERST_UNSPECIFIED_RECORD_ID (0UL) +#define ERST_EMPTY_END_RECORD_ID (~0UL) +#define ERST_EXECUTE_OPERATION_MAGIC 0x9CUL +#define ERST_IS_VALID_RECORD_ID(rid) \ + ((rid != ERST_UNSPECIFIED_RECORD_ID) && \ + (rid != ERST_EMPTY_END_RECORD_ID)) +#define ERST_STORE_MAGIC 0x524F545354535245UL /* ERSTSTOR */ + +typedef struct { + uint64_t magic; + uint32_t record_size; + uint32_t storage_offset; /* offset to record storage beyond header */ + uint16_t version; + uint16_t reserved; + uint32_t record_count; + uint64_t map[]; /* contains record_ids, and position indicates index */ +} __attribute__((packed)) ERSTStorageHeader; + +/* + * Object cast macro + */ +#define ACPIERST(obj) \ + OBJECT_CHECK(ERSTDeviceState, (obj), TYPE_ACPI_ERST) + +/* + * Main ERST device state structure + */ +typedef struct { + PCIDevice parent_obj; + + /* Backend storage */ + HostMemoryBackend *hostmem; + MemoryRegion *hostmem_mr; + uint32_t storage_size; + uint32_t default_record_size; + + /* Programming registers */ + MemoryRegion iomem_mr; + + /* Exchange buffer */ + MemoryRegion exchange_mr; + + /* Interface state */ + uint8_t operation; + uint8_t busy_status; + uint8_t command_status; + uint32_t record_offset; + uint64_t reg_action; + uint64_t reg_value; + uint64_t record_identifier; + ERSTStorageHeader *header; + unsigned first_record_index; + unsigned last_record_index; + unsigned next_record_index; + +} ERSTDeviceState; + +/*******************************************************************/ +/*******************************************************************/ + +static uint8_t *get_nvram_ptr_by_index(ERSTDeviceState *s, unsigned index) +{ + uint8_t *rc = NULL; + off_t offset = (index * le32_to_cpu(s->header->record_size)); + + g_assert(offset < s->storage_size); + + rc = memory_region_get_ram_ptr(s->hostmem_mr); + rc += offset; + + return rc; +} + +static void make_erst_storage_header(ERSTDeviceState *s) +{ + ERSTStorageHeader *header = s->header; + unsigned mapsz, headersz; + + header->magic = cpu_to_le64(ERST_STORE_MAGIC); + header->record_size = cpu_to_le32(s->default_record_size); + header->version = cpu_to_le16(0x0100); + header->reserved = cpu_to_le16(0x0000); + + /* Compute mapsize */ + mapsz = s->storage_size / s->default_record_size; + mapsz *= sizeof(uint64_t); + /* Compute header+map size */ + headersz = sizeof(ERSTStorageHeader) + mapsz; + /* Round up to nearest integer multiple of ERST_RECORD_SIZE */ + headersz = QEMU_ALIGN_UP(headersz, s->default_record_size); + header->storage_offset = cpu_to_le32(headersz); + + /* + * The HostMemoryBackend initializes contents to zero, + * so all record_ids stashed in the map are zero'd. + * As well the record_count is zero. Properly initialized. + */ +} + +static void check_erst_backend_storage(ERSTDeviceState *s, Error **errp) +{ + ERSTStorageHeader *header; + uint32_t record_size; + + header = memory_region_get_ram_ptr(s->hostmem_mr); + s->header = header; + + /* Ensure pointer to header is 64-bit aligned */ + g_assert(QEMU_PTR_IS_ALIGNED(header, sizeof(uint64_t))); + + /* + * Check if header is uninitialized; HostMemoryBackend inits to 0 + */ + if (le64_to_cpu(header->magic) == 0UL) { + make_erst_storage_header(s); + } + + /* Validity check record_size */ + record_size = le32_to_cpu(header->record_size); + if (!( + (record_size) && /* non zero */ + (record_size >= UEFI_CPER_RECORD_MIN_SIZE) && + (((record_size - 1) & record_size) == 0) && /* is power of 2 */ + (record_size >= 4096) /* PAGE_SIZE */ + )) { + error_setg(errp, "ERST record_size %u is invalid", record_size); + } + + /* Validity check header */ + if (!( + (le64_to_cpu(header->magic) == ERST_STORE_MAGIC) && + ((le32_to_cpu(header->storage_offset) % record_size) == 0) && + (le16_to_cpu(header->version) == 0x0100) && + (le16_to_cpu(header->reserved) == 0) + )) { + error_setg(errp, "ERST backend storage header is invalid"); + } + + /* Check storage_size against record_size */ + if (((s->storage_size % record_size) != 0) || + (record_size > s->storage_size)) { + error_setg(errp, "ACPI ERST requires size be multiple of " + "record size (%uKiB)", record_size); + } + + /* Compute offset of first and last record storage slot */ + s->first_record_index = le32_to_cpu(header->storage_offset) + / record_size; + s->last_record_index = (s->storage_size / record_size); +} + +static void update_map_entry(ERSTDeviceState *s, unsigned index, + uint64_t record_id) +{ + if (index < s->last_record_index) { + s->header->map[index] = cpu_to_le64(record_id); + } +} + +static unsigned allocate_erst_record(ERSTDeviceState *s) +{ + unsigned rc = 0; /* 0 not a valid index */ + unsigned index = s->first_record_index; + + for (; index < s->last_record_index; ++index) { + if (le64_to_cpu(s->header->map[index]) == ERST_UNSPECIFIED_RECORD_ID) { + rc = index; + break; + } + } + + return rc; +} + +static unsigned lookup_erst_record(ERSTDeviceState *s, + uint64_t record_identifier) +{ + unsigned rc = 0; /* 0 not a valid index */ + + /* Find the record_identifier in the map */ + if (record_identifier != ERST_UNSPECIFIED_RECORD_ID) { + /* + * Count number of valid records encountered, and + * short-circuit the loop if identifier not found + */ + uint32_t record_count = le32_to_cpu(s->header->record_count); + unsigned count = 0; + unsigned index; + for (index = s->first_record_index; index < s->last_record_index && + count < record_count; ++index) { + if (le64_to_cpu(s->header->map[index]) == record_identifier) { + rc = index; + break; + } + if (le64_to_cpu(s->header->map[index]) != + ERST_UNSPECIFIED_RECORD_ID) { + ++count; + } + } + } + + return rc; +} + +/* + * ACPI 4.0: 17.4.1.1 Serialization Actions, also see + * ACPI 4.0: 17.4.2.2 Operations - Reading 6.c and 2.c + */ +static unsigned get_next_record_identifier(ERSTDeviceState *s, + uint64_t *record_identifier, bool first) +{ + unsigned found = 0; + unsigned index; + + /* For operations needing to return 'first' record identifer */ + if (first) { + /* Reset initial index to beginning */ + s->next_record_index = s->first_record_index; + } + index = s->next_record_index; + + *record_identifier = ERST_EMPTY_END_RECORD_ID; + + if (le32_to_cpu(s->header->record_count)) { + for (; index < s->last_record_index; ++index) { + if (le64_to_cpu(s->header->map[index]) != + ERST_UNSPECIFIED_RECORD_ID) { + /* where to start next time */ + s->next_record_index = index + 1; + *record_identifier = le64_to_cpu(s->header->map[index]); + found = 1; + break; + } + } + } + if (!found) { + /* at end (ie scan complete), reset */ + s->next_record_index = s->first_record_index; + } + + return STATUS_SUCCESS; +} + +/* ACPI 4.0: 17.4.2.3 Operations - Clearing */ +static unsigned clear_erst_record(ERSTDeviceState *s) +{ + unsigned rc = STATUS_RECORD_NOT_FOUND; + unsigned index; + + /* Check for valid record identifier */ + if (!ERST_IS_VALID_RECORD_ID(s->record_identifier)) { + return STATUS_FAILED; + } + + index = lookup_erst_record(s, s->record_identifier); + if (index) { + /* No need to wipe record, just invalidate its map entry */ + uint32_t record_count; + update_map_entry(s, index, ERST_UNSPECIFIED_RECORD_ID); + record_count = le32_to_cpu(s->header->record_count); + record_count -= 1; + s->header->record_count = cpu_to_le32(record_count); + rc = STATUS_SUCCESS; + } + + return rc; +} + +/* ACPI 4.0: 17.4.2.2 Operations - Reading */ +static unsigned read_erst_record(ERSTDeviceState *s) +{ + unsigned rc = STATUS_RECORD_NOT_FOUND; + unsigned exchange_length; + unsigned index; + + /* Check if backend storage is empty */ + if (le32_to_cpu(s->header->record_count) == 0) { + return STATUS_RECORD_STORE_EMPTY; + } + + exchange_length = memory_region_size(&s->exchange_mr); + + /* Check for record identifier of all 0s */ + if (s->record_identifier == ERST_UNSPECIFIED_RECORD_ID) { + /* Set to 'first' record in storage */ + get_next_record_identifier(s, &s->record_identifier, true); + /* record_identifier is now a valid id, or all 1s */ + } + + /* Check for record identifier of all 1s */ + if (s->record_identifier == ERST_EMPTY_END_RECORD_ID) { + return STATUS_FAILED; + } + + /* Validate record_offset */ + if (s->record_offset > (exchange_length - UEFI_CPER_RECORD_MIN_SIZE)) { + return STATUS_FAILED; + } + + index = lookup_erst_record(s, s->record_identifier); + if (index) { + uint8_t *nvram; + uint8_t *exchange; + uint32_t record_length; + + /* Obtain pointer to the exchange buffer */ + exchange = memory_region_get_ram_ptr(&s->exchange_mr); + exchange += s->record_offset; + /* Obtain pointer to slot in storage */ + nvram = get_nvram_ptr_by_index(s, index); + /* Validate CPER record_length */ + memcpy((uint8_t *)&record_length, + &nvram[UEFI_CPER_RECORD_LENGTH_OFFSET], + sizeof(uint32_t)); + record_length = le32_to_cpu(record_length); + if (record_length < UEFI_CPER_RECORD_MIN_SIZE) { + rc = STATUS_FAILED; + } + if ((s->record_offset + record_length) > exchange_length) { + rc = STATUS_FAILED; + } + /* If all is ok, copy the record to the exchange buffer */ + if (rc != STATUS_FAILED) { + memcpy(exchange, nvram, record_length); + rc = STATUS_SUCCESS; + } + } else { + /* Set to 'first' record in storage */ + get_next_record_identifier(s, &s->record_identifier, true); + } + + return rc; +} + +/* ACPI 4.0: 17.4.2.1 Operations - Writing */ +static unsigned write_erst_record(ERSTDeviceState *s) +{ + unsigned rc = STATUS_FAILED; + unsigned exchange_length; + unsigned index; + uint64_t record_identifier; + uint32_t record_length; + uint8_t *exchange; + uint8_t *nvram = NULL; + bool record_found = false; + + exchange_length = memory_region_size(&s->exchange_mr); + + /* Validate record_offset */ + if (s->record_offset > (exchange_length - UEFI_CPER_RECORD_MIN_SIZE)) { + return STATUS_FAILED; + } + + /* Obtain pointer to record in the exchange buffer */ + exchange = memory_region_get_ram_ptr(&s->exchange_mr); + exchange += s->record_offset; + + /* Validate CPER record_length */ + memcpy((uint8_t *)&record_length, &exchange[UEFI_CPER_RECORD_LENGTH_OFFSET], + sizeof(uint32_t)); + record_length = le32_to_cpu(record_length); + if (record_length < UEFI_CPER_RECORD_MIN_SIZE) { + return STATUS_FAILED; + } + if ((s->record_offset + record_length) > exchange_length) { + return STATUS_FAILED; + } + + /* Extract record identifier */ + memcpy((uint8_t *)&record_identifier, &exchange[UEFI_CPER_RECORD_ID_OFFSET], + sizeof(uint64_t)); + record_identifier = le64_to_cpu(record_identifier); + + /* Check for valid record identifier */ + if (!ERST_IS_VALID_RECORD_ID(record_identifier)) { + return STATUS_FAILED; + } + + index = lookup_erst_record(s, record_identifier); + if (index) { + /* Record found, overwrite existing record */ + nvram = get_nvram_ptr_by_index(s, index); + record_found = true; + } else { + /* Record not found, not an overwrite, allocate for write */ + index = allocate_erst_record(s); + if (index) { + nvram = get_nvram_ptr_by_index(s, index); + } else { + rc = STATUS_NOT_ENOUGH_SPACE; + } + } + if (nvram) { + /* Write the record into the slot */ + memcpy(nvram, exchange, record_length); + memset(nvram + record_length, exchange_length - record_length, 0xFF); + /* If a new record, increment the record_count */ + if (!record_found) { + uint32_t record_count; + record_count = le32_to_cpu(s->header->record_count); + record_count += 1; /* writing new record */ + s->header->record_count = cpu_to_le32(record_count); + } + update_map_entry(s, index, record_identifier); + rc = STATUS_SUCCESS; + } + + return rc; +} + +/*******************************************************************/ + +static uint64_t erst_rd_reg64(hwaddr addr, + uint64_t reg, unsigned size) +{ + uint64_t rdval; + uint64_t mask; + unsigned shift; + + if (size == sizeof(uint64_t)) { + /* 64b access */ + mask = 0xFFFFFFFFFFFFFFFFUL; + shift = 0; + } else { + /* 32b access */ + mask = 0x00000000FFFFFFFFUL; + shift = ((addr & 0x4) == 0x4) ? 32 : 0; + } + + rdval = reg; + rdval >>= shift; + rdval &= mask; + + return rdval; +} + +static uint64_t erst_wr_reg64(hwaddr addr, + uint64_t reg, uint64_t val, unsigned size) +{ + uint64_t wrval; + uint64_t mask; + unsigned shift; + + if (size == sizeof(uint64_t)) { + /* 64b access */ + mask = 0xFFFFFFFFFFFFFFFFUL; + shift = 0; + } else { + /* 32b access */ + mask = 0x00000000FFFFFFFFUL; + shift = ((addr & 0x4) == 0x4) ? 32 : 0; + } + + val &= mask; + val <<= shift; + mask <<= shift; + wrval = reg; + wrval &= ~mask; + wrval |= val; + + return wrval; +} + +static void erst_reg_write(void *opaque, hwaddr addr, + uint64_t val, unsigned size) +{ + ERSTDeviceState *s = (ERSTDeviceState *)opaque; + + /* + * NOTE: All actions/operations/side effects happen on the WRITE, + * by this implementation's design. The READs simply return the + * reg_value contents. + */ + trace_acpi_erst_reg_write(addr, val, size); + + switch (addr) { + case ERST_VALUE_OFFSET + 0: + case ERST_VALUE_OFFSET + 4: + s->reg_value = erst_wr_reg64(addr, s->reg_value, val, size); + break; + case ERST_ACTION_OFFSET + 0: + /* + * NOTE: all valid values written to this register are of the + * ACTION_* variety. Thus there is no need to make this a 64-bit + * register, 32-bits is appropriate. As such ERST_ACTION_OFFSET+4 + * is not needed. + */ + switch (val) { + case ACTION_BEGIN_WRITE_OPERATION: + case ACTION_BEGIN_READ_OPERATION: + case ACTION_BEGIN_CLEAR_OPERATION: + case ACTION_BEGIN_DUMMY_WRITE_OPERATION: + case ACTION_END_OPERATION: + s->operation = val; + break; + case ACTION_SET_RECORD_OFFSET: + s->record_offset = s->reg_value; + break; + case ACTION_EXECUTE_OPERATION: + if ((uint8_t)s->reg_value == ERST_EXECUTE_OPERATION_MAGIC) { + s->busy_status = 1; + switch (s->operation) { + case ACTION_BEGIN_WRITE_OPERATION: + s->command_status = write_erst_record(s); + break; + case ACTION_BEGIN_READ_OPERATION: + s->command_status = read_erst_record(s); + break; + case ACTION_BEGIN_CLEAR_OPERATION: + s->command_status = clear_erst_record(s); + break; + case ACTION_BEGIN_DUMMY_WRITE_OPERATION: + s->command_status = STATUS_SUCCESS; + break; + case ACTION_END_OPERATION: + s->command_status = STATUS_SUCCESS; + break; + default: + s->command_status = STATUS_FAILED; + break; + } + s->busy_status = 0; + } + break; + case ACTION_CHECK_BUSY_STATUS: + s->reg_value = s->busy_status; + break; + case ACTION_GET_COMMAND_STATUS: + s->reg_value = s->command_status; + break; + case ACTION_GET_RECORD_IDENTIFIER: + s->command_status = get_next_record_identifier(s, + &s->reg_value, false); + break; + case ACTION_SET_RECORD_IDENTIFIER: + s->record_identifier = s->reg_value; + break; + case ACTION_GET_RECORD_COUNT: + s->reg_value = le32_to_cpu(s->header->record_count); + break; + case ACTION_GET_ERROR_LOG_ADDRESS_RANGE: + s->reg_value = (hwaddr)pci_get_bar_addr(PCI_DEVICE(s), 1); + break; + case ACTION_GET_ERROR_LOG_ADDRESS_LENGTH: + s->reg_value = le32_to_cpu(s->header->record_size); + break; + case ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES: + s->reg_value = 0x0; /* intentional, not NVRAM mode */ + break; + case ACTION_GET_EXECUTE_OPERATION_TIMINGS: + s->reg_value = + (100ULL << 32) | /* 100us max time */ + (10ULL << 0) ; /* 10us min time */ + break; + default: + /* Unknown action/command, NOP */ + break; + } + break; + default: + /* This should not happen, but if it does, NOP */ + break; + } +} + +static uint64_t erst_reg_read(void *opaque, hwaddr addr, + unsigned size) +{ + ERSTDeviceState *s = (ERSTDeviceState *)opaque; + uint64_t val = 0; + + switch (addr) { + case ERST_ACTION_OFFSET + 0: + case ERST_ACTION_OFFSET + 4: + val = erst_rd_reg64(addr, s->reg_action, size); + break; + case ERST_VALUE_OFFSET + 0: + case ERST_VALUE_OFFSET + 4: + val = erst_rd_reg64(addr, s->reg_value, size); + break; + default: + break; + } + trace_acpi_erst_reg_read(addr, val, size); + return val; +} + +static const MemoryRegionOps erst_reg_ops = { + .read = erst_reg_read, + .write = erst_reg_write, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +/*******************************************************************/ +/*******************************************************************/ +static int erst_post_load(void *opaque, int version_id) +{ + ERSTDeviceState *s = opaque; + + /* Recompute pointer to header */ + s->header = (ERSTStorageHeader *)get_nvram_ptr_by_index(s, 0); + trace_acpi_erst_post_load(s->header, le32_to_cpu(s->header->record_size)); + + return 0; +} + +static const VMStateDescription erst_vmstate = { + .name = "acpi-erst", + .version_id = 1, + .minimum_version_id = 1, + .post_load = erst_post_load, + .fields = (VMStateField[]) { + VMSTATE_UINT8(operation, ERSTDeviceState), + VMSTATE_UINT8(busy_status, ERSTDeviceState), + VMSTATE_UINT8(command_status, ERSTDeviceState), + VMSTATE_UINT32(record_offset, ERSTDeviceState), + VMSTATE_UINT64(reg_action, ERSTDeviceState), + VMSTATE_UINT64(reg_value, ERSTDeviceState), + VMSTATE_UINT64(record_identifier, ERSTDeviceState), + VMSTATE_UINT32(next_record_index, ERSTDeviceState), + VMSTATE_END_OF_LIST() + } +}; + +static void erst_realizefn(PCIDevice *pci_dev, Error **errp) +{ + ERSTDeviceState *s = ACPIERST(pci_dev); + + trace_acpi_erst_realizefn_in(); + + if (!s->hostmem) { + error_setg(errp, "'" ACPI_ERST_MEMDEV_PROP "' property is not set"); + return; + } else if (host_memory_backend_is_mapped(s->hostmem)) { + error_setg(errp, "can't use already busy memdev: %s", + object_get_canonical_path_component(OBJECT(s->hostmem))); + return; + } + + s->hostmem_mr = host_memory_backend_get_memory(s->hostmem); + + /* HostMemoryBackend size will be multiple of PAGE_SIZE */ + s->storage_size = object_property_get_int(OBJECT(s->hostmem), "size", errp); + + /* Initialize backend storage and record_count */ + check_erst_backend_storage(s, errp); + + /* BAR 0: Programming registers */ + memory_region_init_io(&s->iomem_mr, OBJECT(pci_dev), &erst_reg_ops, s, + TYPE_ACPI_ERST, ERST_REG_SIZE); + pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem_mr); + + /* BAR 1: Exchange buffer memory */ + memory_region_init_ram(&s->exchange_mr, OBJECT(pci_dev), + "erst.exchange", + le32_to_cpu(s->header->record_size), errp); + pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY, + &s->exchange_mr); + + /* Include the backend storage in the migration stream */ + vmstate_register_ram_global(s->hostmem_mr); + + trace_acpi_erst_realizefn_out(s->storage_size); +} + +static void erst_reset(DeviceState *dev) +{ + ERSTDeviceState *s = ACPIERST(dev); + + trace_acpi_erst_reset_in(le32_to_cpu(s->header->record_count)); + s->operation = 0; + s->busy_status = 0; + s->command_status = STATUS_SUCCESS; + s->record_identifier = ERST_UNSPECIFIED_RECORD_ID; + s->record_offset = 0; + s->next_record_index = s->first_record_index; + /* NOTE: first/last_record_index are computed only once */ + trace_acpi_erst_reset_out(le32_to_cpu(s->header->record_count)); +} + +static Property erst_properties[] = { + DEFINE_PROP_LINK(ACPI_ERST_MEMDEV_PROP, ERSTDeviceState, hostmem, + TYPE_MEMORY_BACKEND, HostMemoryBackend *), + DEFINE_PROP_UINT32(ACPI_ERST_RECORD_SIZE_PROP, ERSTDeviceState, + default_record_size, ERST_RECORD_SIZE), + DEFINE_PROP_END_OF_LIST(), +}; + +static void erst_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); + + trace_acpi_erst_class_init_in(); + k->realize = erst_realizefn; + k->vendor_id = PCI_VENDOR_ID_REDHAT; + k->device_id = PCI_DEVICE_ID_REDHAT_ACPI_ERST; + k->revision = 0x00; + k->class_id = PCI_CLASS_OTHERS; + dc->reset = erst_reset; + dc->vmsd = &erst_vmstate; + dc->user_creatable = true; + dc->hotpluggable = false; + device_class_set_props(dc, erst_properties); + dc->desc = "ACPI Error Record Serialization Table (ERST) device"; + set_bit(DEVICE_CATEGORY_MISC, dc->categories); + trace_acpi_erst_class_init_out(); +} + +static const TypeInfo erst_type_info = { + .name = TYPE_ACPI_ERST, + .parent = TYPE_PCI_DEVICE, + .class_init = erst_class_init, + .instance_size = sizeof(ERSTDeviceState), + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { } + } +}; + +static void erst_register_types(void) +{ + type_register_static(&erst_type_info); +} + +type_init(erst_register_types) diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index 7d8c0eb..348b94f 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -5,6 +5,7 @@ acpi_ss.add(files( 'bios-linker-loader.c', 'core.c', 'utils.c', + 'erst.c', )) acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu.c', 'cpu_hotplug.c')) acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_false: files('acpi-cpu-hotplug-stub.c')) diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events index 974d770..2250126 100644 --- a/hw/acpi/trace-events +++ b/hw/acpi/trace-events @@ -55,3 +55,18 @@ piix4_gpe_writeb(uint64_t addr, unsigned width, uint64_t val) "addr: 0x%" PRIx64 # tco.c tco_timer_reload(int ticks, int msec) "ticks=%d (%d ms)" tco_timer_expired(int timeouts_no, bool strap, bool no_reboot) "timeouts_no=%d no_reboot=%d/%d" + +# erst.c +acpi_erst_reg_write(uint64_t addr, uint64_t val, unsigned size) "addr: 0x%04" PRIx64 " <== 0x%016" PRIx64 " (size: %u)" +acpi_erst_reg_read(uint64_t addr, uint64_t val, unsigned size) " addr: 0x%04" PRIx64 " ==> 0x%016" PRIx64 " (size: %u)" +acpi_erst_mem_write(uint64_t addr, uint64_t val, unsigned size) "addr: 0x%06" PRIx64 " <== 0x%016" PRIx64 " (size: %u)" +acpi_erst_mem_read(uint64_t addr, uint64_t val, unsigned size) " addr: 0x%06" PRIx64 " ==> 0x%016" PRIx64 " (size: %u)" +acpi_erst_pci_bar_0(uint64_t addr) "BAR0: 0x%016" PRIx64 +acpi_erst_pci_bar_1(uint64_t addr) "BAR1: 0x%016" PRIx64 +acpi_erst_realizefn_in(void) +acpi_erst_realizefn_out(unsigned size) "total nvram size %u bytes" +acpi_erst_reset_in(unsigned record_count) "record_count %u" +acpi_erst_reset_out(unsigned record_count) "record_count %u" +acpi_erst_post_load(void *header, unsigned slot_size) "header: 0x%p slot_size %u" +acpi_erst_class_init_in(void) +acpi_erst_class_init_out(void) From patchwork Thu Oct 7 17:14:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97318C433EF for ; Thu, 7 Oct 2021 17:27:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1526C6056B for ; Thu, 7 Oct 2021 17:27:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1526C6056B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:40862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYXAx-0002rT-9t for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:27:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz9-0001mH-1X for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:12 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:46474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz5-0001sP-Ix for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:10 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H48n6026161; Thu, 7 Oct 2021 17:15:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=3oF4/6y1nW280ds+7Ltfqza2dsE1+k/SiIes9Av4WLI=; b=MRw7E2bkB/3zSJUYw/xNDHfVJvpVkwu7JZusWIieWx1WVnV5/fTzycdK0PbjkT0nDSVv 5bz+XktYJXvsfU1pAKs92bzhpEBDPcuIOQ+MqMwPVSU9mDxTu4uI75sr9pwvj2O3F46F c7q42zj84nFuQwsUdb0WiKcQBnyTTXyasJQMKk5YSif6jXXDuO6FRxlBjfo8PbCg3Mio dF1By8R5SkT725Gl02WpA4wxVdBaXuGlA4bCJo132Ry1NSLvz6K1LfGoMNDCdBLZVjR+ 5YywPE0jPBZNwtaDmop2epenz6alu2+vgaOTOnZmQGxsWFukx7lSCjT9ZGQG46xQ/Rwx eA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bhy2daq1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:04 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HAnrn066991; Thu, 7 Oct 2021 17:15:03 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by userp3020.oracle.com with ESMTP id 3bf16x5tk4-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dRad8MwhqHr7u9eQUZ1O3G9ky5J9zONEEH4RM+T91odYGFOz6gjD8YhsTRmHCjotpbegboWgHGY5gEEfvnH1OprBWK7NwbpVD/CtYRVjWuMg0186/FBmI0f1KXqyVDC+r1L+13FmQjJ+8ubpYOKLcXV1bjfhpIqOnFbwEEzRu6GpyBtciGC5ZBstp74AZxt7AGsACrJDdajwQPKzQGSLIm283Kei8bysdbzYH9lYpZSgqFGbmQSrQ51C/f5W33ehbnxNrsABzl+Q3HW0WVyQXPpLgEpMkz9q7v/kTXnmsGBogrv/xbCiUPOQkm9XprsY308vQCUzj4YsFLSX9z5Iiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3oF4/6y1nW280ds+7Ltfqza2dsE1+k/SiIes9Av4WLI=; b=Cx1eAe1f93PO66UJZzKL+erLmjyK2iPeVbgkW3wZ8I9eyGQNKneogrqUe2pTn51j3pSdQkgSL1itF55A7pgY3P7Bd26bc1yDbwceaf+DnAXeftJqEf7kAD624hnlER9f8u2Dh3zYyhi4fHyyWSJqJAGW7M7uDgDGtuOvqxoBCZwXWMIB9vTgPlYggGOTRYPq35Hla+VeI9ilGaOB/+ZAJe83qG/A5SaQf7j4JtvtmaUDYSww1pqT4VI6qBwJ9Wx80pPx32ARcPOf9w/0jZ4WudVuBKtWms2UoVHVolHYObFFpFmo8a86LNGIXz/ZNOFOkviLEq7Qlfmuc9rgjziLLw== 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=3oF4/6y1nW280ds+7Ltfqza2dsE1+k/SiIes9Av4WLI=; b=ssOwbEbvFOqDGVbYF/STSiJpM+PY+hg0cNYdHl46zPsdEAu/F1eLeCmheheL220vP+JMmfzSv3pNcsxsSSXIJ/B9IsVse4AFdnq0ZsATdh69VebY1lI7N3aBAuyax4dJhym7nrbXTU0uLpI3097mRtFoyJHB6PhT7wXj56Lftk8= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:15:00 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:15:00 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 05/10] ACPI ERST: build the ACPI ERST table Date: Thu, 7 Oct 2021 13:14:31 -0400 Message-Id: <1633626876-12115-6-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:14:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5893b8ac-d1fd-491d-b968-08d989b5fe4f X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bpITon1iTlmobp49Ebxgc+m1u1K8P6qW2HZfmPjJYxMo13nbdCKYT/IWDHUdctCpAN9IV0nv0Vff9KaSyKUzH2Mveb7thWCwWEW+3ECUfje8oJcY1F/yjdbmig1NMdH+ltEqn/AXsJPml0EkmGxIpRZ23FCzV0C/sOJzZdM50hWxQDOqXSwJJcb+w5eiOWVMtURWRFmSCoSLNg1vTlpGSWh6qbSy5mxTr3UWSSuAEWRItx2gle5a9oUUV0rawRkX0rlpd6O2yLEQ6RVe8ABjtP10AymOAJD+y3kolKCP/9BBiesmx4qkd+Jof9GQOnGNvXY5TynNeCKftHN3Gpq9NdK2/T+QqyZ4RGMlViUB/GZCKZF9l4VHNf76CE5+IMGPNcAi05j3ZLAKgAsXQxlQcZmT53MYyDYA0kwXzNwKoxdXanxMWky7cNKU+XTxdsNfN7kvAWeOg1Z4rWFeFt6rmeDxyFYiPgMBPQJNL30YxGkpFhmfgI1vf9AipM/Wcqu+kLGcd+fUDWVXphOH34hzR1NTT7jpjGX8FUgZkvZ2vCwLdydJth+DDA8YxDyWp0Sw9kDjzFLCXCbcFu0AEIfFmo6u5OQinkZ3blAIiqZpd1255QHVfQDQhN5JMfXPeeh7J9WzXYy/eu8434pOvMp0QiEr8BQXG8VtkhGQUR02Tf409+2SJ/WCxCh4TnEWX/eyYAmeuMSvnu2FE10yfn/Z7Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(6916009)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(83380400001)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: omOKUnc4h3mj/k4zu2QhaITV3TnlWn6xf+l7KYdh7iorgYEDitW+dci0/HLZc4PpSN5GrwwkGh9Kym/pz6rU/QdyA2HexzWWi6GK8DxSWiO9k5w4tCjHsgfpJqyaCdhpnMrqHFs5V/pYj71TmGxuSQd5HWouE2IdVhziF1qOwoIjsc0/OJ8379Unt93VDSpkJUqYCJDrNpFF0fdheST+/P8lMIPmoto7Wg3DZlAkYc8j/Y1UukuEb9ZKoijL5SuB8wWz+3tucUFe2LIyJG7qFmmyto3aXgX4L0D8Ys5Mi8lZqw4lPa6fEEXXsrTuoZh5NK2XykcBtXE+7pHByDg4bSYiFNqVwvBauwAOFR9Exo3PuRx3NofdzGDljIG/ivwvKs2nd29kiXozpLCXm6VOBFf+ZT8n9jJq6ecDoExL3EQnLS6nA3ShxfQ7a1TaiEg+utJlk2SpfeJ5Ll0EqwD0BfXF5n6o6jQYoERlPLElxxU9IR/z20u2J6NbQnJqDl+iHLaq0xxYI6zPWzWH/w7dnPSmMoEPZbv2akpe8OxA06UQP7TeFXAp/fUW9n7deqCxRLW/Pe7Xz8jp6WCf2ih/Oqi7LSFtVkV+o+T6GgRd62kA+JPSWUrv2O8MgUllYWBpuwoV1YwRbku46MWVZiyRekbzQmY2pkB86MvUqfx8Ohemref+w3SljsOQuKGAE5yVAhpTpqLMbn5tBhNnyR5yY5lE9mRmbZiasOos15VcfnPwqFVzjwhAHsbRVy1O+PklkOPJasVHETByxAe623253ya0V+Jyz6RJUkKhfCnhYU1HLq9ce02QDNEgCfwlmaBc/0L+9fPMGg61STbKWWm/mBDgM9+3zksi2K3dPb33OmFYt4U99AHB/IKYo+y8NmR+jbK7/dkPuJ1tjj9o01XvPnlk2gNjd39nCNzgGpZ1nLeIjDt9v1L2wi2qPZSQkFxBjYHN97/dZMKs0rQUNFKviV8vRu24guYltE0u96T5VYcoL+92mHaQApbE6oCFycVUJurtJs9tuS3wuls5C6a2gaKlp2e8gr4WsTVqVOpi91xoYVXnfge5vKbB5+J+dpl+69NVeznBFS5Qf1WUDkWuuiUS9MrerMD+BDPagz2nnrLBsO+m2SU4qJz+/++UXBiB0f48jOwrWYFXCLAvThZuzRJVubLAP5myNxEu2y03NsuMc+fpGxlBx37QYjV0RrH+J+SPDH+n4DLapZZupPAgeEj1YjShejW8P/YV0oPuS7mJv5Y+RPDQgYUtFfp0cPnDTAam+ZCE8kL9IppfFUhFds5U2U/6pbfMg1TVoGypnyLSljJaa3/twwwLdZ6kTAWU X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5893b8ac-d1fd-491d-b968-08d989b5fe4f X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:14:59.9504 (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: CmXIcMwxqKFK5Yt37leVB71L84QmTG6SZi/5swyAesMaAeCLJspNCH5f9kB4N3+qbM7Jamxyl9obw/6tuHOHWJD2+zg5oIHzVaUwCohEBl0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-ORIG-GUID: JXM5P_77cQUHhC61KjCqlJGlVu5U-QEw X-Proofpoint-GUID: JXM5P_77cQUHhC61KjCqlJGlVu5U-QEw Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This builds the ACPI ERST table to inform OSPM how to communicate with the acpi-erst device. Signed-off-by: Eric DeVolder --- hw/acpi/erst.c | 239 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index af7e1a9..177fa51 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -701,6 +701,245 @@ static const MemoryRegionOps erst_reg_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; + +/*******************************************************************/ +/*******************************************************************/ + +/* ACPI 4.0: Table 17-19 Serialization Instructions */ +#define INST_READ_REGISTER 0x00 +#define INST_READ_REGISTER_VALUE 0x01 +#define INST_WRITE_REGISTER 0x02 +#define INST_WRITE_REGISTER_VALUE 0x03 +#define INST_NOOP 0x04 +#define INST_LOAD_VAR1 0x05 +#define INST_LOAD_VAR2 0x06 +#define INST_STORE_VAR1 0x07 +#define INST_ADD 0x08 +#define INST_SUBTRACT 0x09 +#define INST_ADD_VALUE 0x0A +#define INST_SUBTRACT_VALUE 0x0B +#define INST_STALL 0x0C +#define INST_STALL_WHILE_TRUE 0x0D +#define INST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define INST_GOTO 0x0F +#define INST_SET_SRC_ADDRESS_BASE 0x10 +#define INST_SET_DST_ADDRESS_BASE 0x11 +#define INST_MOVE_DATA 0x12 + +/* ACPI 4.0: 17.4.1.2 Serialization Instruction Entries */ +static void build_serialization_instruction_entry(GArray *table_data, + uint8_t serialization_action, + uint8_t instruction, + uint8_t flags, + uint8_t register_bit_width, + uint64_t register_address, + uint64_t value, + uint64_t mask) +{ + /* ACPI 4.0: Table 17-18 Serialization Instruction Entry */ + struct AcpiGenericAddress gas; + + /* Serialization Action */ + build_append_int_noprefix(table_data, serialization_action, 1); + /* Instruction */ + build_append_int_noprefix(table_data, instruction , 1); + /* Flags */ + build_append_int_noprefix(table_data, flags , 1); + /* Reserved */ + build_append_int_noprefix(table_data, 0 , 1); + /* Register Region */ + gas.space_id = AML_SYSTEM_MEMORY; + gas.bit_width = register_bit_width; + gas.bit_offset = 0; + switch (register_bit_width) { + case 8: + gas.access_width = 1; + break; + case 16: + gas.access_width = 2; + break; + case 32: + gas.access_width = 3; + break; + case 64: + gas.access_width = 4; + break; + default: + gas.access_width = 0; + break; + } + gas.address = register_address; + build_append_gas_from_struct(table_data, &gas); + /* Value */ + build_append_int_noprefix(table_data, value , 8); + /* Mask */ + build_append_int_noprefix(table_data, mask , 8); +} + +/* ACPI 4.0: 17.4.1 Serialization Action Table */ +void build_erst(GArray *table_data, BIOSLinker *linker, Object *erst_dev, + const char *oem_id, const char *oem_table_id) +{ + GArray *table_instruction_data; + unsigned action; + unsigned erst_start = table_data->len; + hwaddr bar0, bar1; + + bar0 = (hwaddr)pci_get_bar_addr(PCI_DEVICE(erst_dev), 0); + trace_acpi_erst_pci_bar_0(bar0); + bar1 = (hwaddr)pci_get_bar_addr(PCI_DEVICE(erst_dev), 1); + trace_acpi_erst_pci_bar_1(bar1); + +#define MASK8 0x00000000000000FFUL +#define MASK16 0x000000000000FFFFUL +#define MASK32 0x00000000FFFFFFFFUL +#define MASK64 0xFFFFFFFFFFFFFFFFUL + + /* + * Serialization Action Table + * The serialization action table must be generated first + * so that its size can be known in order to populate the + * Instruction Entry Count field. + */ + table_instruction_data = g_array_new(FALSE, FALSE, sizeof(char)); + + /* Serialization Instruction Entries */ + action = ACTION_BEGIN_WRITE_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_BEGIN_READ_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_BEGIN_CLEAR_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_END_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_SET_RECORD_OFFSET; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER , 0, 32, + bar0 + ERST_VALUE_OFFSET , 0, MASK32); + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_EXECUTE_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_VALUE_OFFSET , ERST_EXECUTE_OPERATION_MAGIC, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_CHECK_BUSY_STATUS; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER_VALUE , 0, 32, + bar0 + ERST_VALUE_OFFSET, 0x01, MASK8); + + action = ACTION_GET_COMMAND_STATUS; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 32, + bar0 + ERST_VALUE_OFFSET, 0, MASK8); + + action = ACTION_GET_RECORD_IDENTIFIER; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET, 0, MASK64); + + action = ACTION_SET_RECORD_IDENTIFIER; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET , 0, MASK64); + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_GET_RECORD_COUNT; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 32, + bar0 + ERST_VALUE_OFFSET, 0, MASK32); + + action = ACTION_BEGIN_DUMMY_WRITE_OPERATION; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + + action = ACTION_GET_ERROR_LOG_ADDRESS_RANGE; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET, 0, MASK64); + + action = ACTION_GET_ERROR_LOG_ADDRESS_LENGTH; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET, 0, MASK32); + + action = ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 32, + bar0 + ERST_VALUE_OFFSET, 0, MASK32); + + action = ACTION_GET_EXECUTE_OPERATION_TIMINGS; + build_serialization_instruction_entry(table_instruction_data, + action, INST_WRITE_REGISTER_VALUE, 0, 32, + bar0 + ERST_ACTION_OFFSET, action, MASK8); + build_serialization_instruction_entry(table_instruction_data, + action, INST_READ_REGISTER , 0, 64, + bar0 + ERST_VALUE_OFFSET, 0, MASK64); + + /* Serialization Header */ + acpi_data_push(table_data, sizeof(AcpiTableHeader)); + /* Serialization Header Size */ + build_append_int_noprefix(table_data, 48, 4); + /* Reserved */ + build_append_int_noprefix(table_data, 0, 4); + /* + * Instruction Entry Count + * Each instruction entry is 32 bytes + */ + build_append_int_noprefix(table_data, + (table_instruction_data->len / 32), 4); + /* Serialization Instruction Entries */ + g_array_append_vals(table_data, table_instruction_data->data, + table_instruction_data->len); + g_array_free(table_instruction_data, TRUE); + + build_header(linker, table_data, + (void *)(table_data->data + erst_start), + "ERST", table_data->len - erst_start, + 1, oem_id, oem_table_id); +} + /*******************************************************************/ /*******************************************************************/ static int erst_post_load(void *opaque, int version_id) From patchwork Thu Oct 7 17:14:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C83C5C433F5 for ; Thu, 7 Oct 2021 17:26:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5F46D6121F for ; Thu, 7 Oct 2021 17:26:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5F46D6121F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:35200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYX9n-0007X5-Ey for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:26:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWzB-0001mw-FA for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:15 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:29538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz8-0001vS-IU for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:12 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H4KZh009649; Thu, 7 Oct 2021 17:15:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=v0TTphDwFaN/Wdhghh1zaKy9tK4deSAMaFrSanCMsIM=; b=Jw1citAaOUWKb/jn3iu7lxsgA+qDrffCi6o/1fGUq6JEfr/ZlBNaotE8L7HPZzqgMq7W xXEDpwzv5uisAgeWvGhpvAw1zS4tYYfHgDTRCtUrpqn/srmzQMwkys6f+B77syGX+ZR+ TAfqb+o0SoAaWvn8/CzeMQ2Fx2qgsDca85kIAwmync/Tj5v1DNzcHXexI+qcVvrdCoca u/KKBM8KBo1s8H6sg3/LRteEJ7wN5P7vube2GUvRBE3aziHcG3EyCLYUvrpYamgpXELc VSVkx/9fevUlyyMIFTv/NDHySkhpThUhnShnbBFMnCC2Ppp4ejZ4HQkK6ZXE0dnj/16Z Dg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bhxbs38k9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:05 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HAnro066991; Thu, 7 Oct 2021 17:15:03 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by userp3020.oracle.com with ESMTP id 3bf16x5tk4-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k7OUSXfAZJa3lOCjFYPRWcofcrgJH5nOYgNRcCDYY4aDLvRF0ilkarPodRaoAig2v2qZunSxPRmuB1rpRnLg4heDBjrfq5vdG717dMhe1NDd7r2mVDIoXo33wnE//82xQqmYGMqwX2WH6s0UOatf9DoVIjXI1NiRV5J0PzKTWRb5Zqh/N7k8tVCT/r5MR+Sx33PEynlsc/E0uAFuVVTXQu5WCVgv2u9+7V6RJp3rsiK0BvAkulC5760AupT9DnKPSYMsGhLa/ky5ZsmVdlJY9C24Xj6CCHZrYb20H8caIeOP3RoISgx/r1Jy+H8qIQH2MPEOtVbBrInaRdahJTEY0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=v0TTphDwFaN/Wdhghh1zaKy9tK4deSAMaFrSanCMsIM=; b=iZMk5FM7IzYcdypgxsG6c+0Zp/lE/e348bN/ohlaVCQmhJgeYBt/iiN62z9necwYa5EuPpoCmnju4JU2c+BUKC0ClWmG/B8f52L1scu92qdGmkc1VWJVgq94UibAYKjbAIqJSubT024ev0qoJ2jflKyB31l2hYsFteARpaxrf4JlcjgGQQrau0bAsdBOW4A3FJKtQVG++768PhhavCeh97LAzTlWr9laWknlPEsYzD+CFqxJ0N+smQc5VyFug7Ko4H5GVm+T9Kl8DfdydQHYAQdY1iszvnIaus76unUBuFXjPrMBKrxPSk2Im12NSWip8hTt/TCScEkRzrSINtPQcw== 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=v0TTphDwFaN/Wdhghh1zaKy9tK4deSAMaFrSanCMsIM=; b=D0p4W8jF3Qum3Xf7u+fB74hpC6nhItbtekNjysM4opsdEgRVE939ZeuS4PjDb+AcYv7vVddSmUMSg2yvnR/5wGZ69Ai+4czlL2N9IzkQCinXdnhb6wqQNYPvLr6UrJsnljpvAtaTXGMsPhae8YyEA2ywSMJ/th0kg4lTqtXTWCI= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:15:01 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:15:01 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 06/10] ACPI ERST: create ACPI ERST table for pc/x86 machines Date: Thu, 7 Oct 2021 13:14:32 -0400 Message-Id: <1633626876-12115-7-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:15:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0a8e4774-9e20-41d4-0202-08d989b5ff2c X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kv3SmYZD3oVjClvOolRvukKgpk0R33oEK7oB5ue9l9RHp4heCQXNeFa5gnOwTrGqBD1acnvBCOtcfc3sD4bqqCvBEQ+uvmNr3VVXaMEm/HmMYO3dYmmUGZI//Qxmfu4XeRv8ivH/eWk1Lf07E8O2ncR7mo4MDh5w1ht/qLQLds0wZo+OW+r19wuLmxTF+kZXrBaEfDqrCrLH8byj9FAkYiVsK6XZbRnvpYDYdaDHqLMqA4BUxoyPhxUTYBve4c3YPfRwBxfjBI+T/DG3rGhtDDDhYh7D3lAbtE3B2+EzBQ/1Y9WePrr65+8NlpEXYf9Nb/n7PO2WIIPBGD434p1o6Vyl+7gACbEzF92cA8udJmitq+xtlI4k1Me86gsj4Zbxo64PAsSAygAdTevysKtoRmrCShB3p9TlQRNrhpFGI7cT755jopawAvRpdkRPgXUnOJI8PmRhl5TWck2fWaXblINsJotzDaactonzKqQQdRveMot6s9hbkt3bDlL7YwwmPAFWqHP7iHFF8DFOWzK9EwmHq3x8ck/+vJMxJkinseLjuotIvguzCRtsp3tp2LcotKrlY2IIYVpXTd4gxBhUn+tnTWsfXHeRoE6JEOjmbFrQP4o7x/5Y6IXjnVw0DIX5Z6lspaFinw1C1XoCuawB5Qp5C2O8w+AJQBRndqo1fQRt2bKKQh2ZOBcvpg4GfDpt3L2sfoJ8yX4kqFtKK/GNtA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(6916009)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: P48/nn6CpVVEBjM/Q1aU4uNLFkZnXfLIn+loZK+dz7v3jEuZG7cLpjkJO+pB38AUYE5OjVPWFpcHhunbcgZLccT+sv4zJ0uIs8X9mC7zXhMu64bDzyZpY9S0Z1E5jqvmkz2Kg8sd3Hsmz0jVFgx9WJfa3G9GSve2Q4WKGMdMxA0fFGTQJLybtpd149QYJUlkOf04Kto+Ls1eNQXHnbd6epZjhDOgLrlTa11gluIBae8wByvFQisgmDcpPfAskRHnbrw6V8QbdmbwDUiKyzoGZO4JEfnAzox6t/Ll9X+kQAIyvyKTmK5/zSfrLehKg0NovSOYLLIuKKxdgVKGzjLVmm+k5jQbazNCf5prVv+AuVDzv7rtLCmCy+zWi3EAWkqQVRp4SFqfdld2m2TXtshmG3soXXfE2wjeO4MB6gQ67BWSlCP5C42/eFojVBDfhXM9muCwkLCeOuZqbaWSiXURxUqefbmX27Q9cczPSu/vb+igTrtNggL72y+RtChdOra/uAKyrJiPGEccoORP8alrV3gTSFA9BnnZoUY89BPark8TjsnJw2rK0XNLm+T7+PXQCTkHt2NWrZNwo4a7iIwgjA9eYbcqL1itNUOFPQnoexpYXaKnDL0CzQpFEDfRRqZ6d9GUpZBP+uev5ueVaH9u7n0P07eJRlQ/T/ZKCFcpFdYUj9jPZLjbkhwA6S04DeisZzqvkpMOJwSWenNy4fCvze3J1G+Pw0YR1acSMQ+n9yVwZEyf/DTNUWt0F4cqeER4/6lDTkyyq6QiZBaGOeeae6OQ/VX/RQlNscmm/pqnafnkDAFWKatl/T/IIoHwmdgoH2L0rNxAlo12pQAywwlWIA7YdUWcqpqSzNEKVmwoglHnpJF8F7Knd/Ytm2f3XxOurX2dck4LXG6Gd7jpMXyjytArWXWh7V0ImXo6wup8ouDoVz/OzzBHzEKqnBYUYMe8p232eZn827XEEHKyunXd6DFRV1v6hZUKeuE+wt1d4lhCPgD95cyOMi5shDBwfkwunJYrDWWhl2RxQD7BK5V5Rz9odYTlHV3gjeIeIeMVMSQdZtVyTTd+DMu/AkcbhVQ72GoDvQjZ0x68NIvBajm08nCHpVgOVSm0z0crCp0IksBODv0qQFaRmajwkGXmc29cGyQ0RmSayBxIjjwN0QRlADu5bm+FsW/HF7c5YYZnagUV3Y8JKpvnggjlkICunEFn5+J7whbja1h238fd5byAK5lVB0dBespzstxP1ncpDAYCumm9Ya83xlLL0bgcrOqWEHiXCw1t1SobR9QK5XgyecvWKB6/TtDYET/ndAbz8HTTbqhgxFG3q8FCrZ2tOxyc X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a8e4774-9e20-41d4-0202-08d989b5ff2c X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:15:01.4896 (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: Tve16BzVPq0ND/rbkleCkkc7inJlp58Y/iT5UkKqkW6VmPxRMXPm8vv2tRAczihsDsLCvlmDh13Fz2hCpU6Ptxz2Bt9q0NDCMbpLa4FAZqw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-GUID: KnrFGD09sRq1FNwPfCu_GlOFXOD3fQdZ X-Proofpoint-ORIG-GUID: KnrFGD09sRq1FNwPfCu_GlOFXOD3fQdZ Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change exposes ACPI ERST support for x86 guests. Signed-off-by: Eric DeVolder --- hw/i386/acpi-build.c | 9 +++++++++ hw/i386/acpi-microvm.c | 9 +++++++++ include/hw/acpi/erst.h | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index dfaa47c..9436063 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -43,6 +43,7 @@ #include "sysemu/tpm.h" #include "hw/acpi/tpm.h" #include "hw/acpi/vmgenid.h" +#include "hw/acpi/erst.h" #include "sysemu/tpm_backend.h" #include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" @@ -2441,6 +2442,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) GArray *tables_blob = tables->table_data; AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL }; Object *vmgenid_dev; + Object *erst_dev; char *oem_id; char *oem_table_id; @@ -2502,6 +2504,13 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, x86ms->oem_table_id); + erst_dev = find_erst_dev(); + if (erst_dev) { + acpi_add_table(table_offsets, tables_blob); + build_erst(tables_blob, tables->linker, erst_dev, + x86ms->oem_id, x86ms->oem_table_id); + } + vmgenid_dev = find_vmgenid_dev(); if (vmgenid_dev) { acpi_add_table(table_offsets, tables_blob); diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c index 1a0f77b..6578254 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -30,6 +30,7 @@ #include "hw/acpi/bios-linker-loader.h" #include "hw/acpi/generic_event_device.h" #include "hw/acpi/utils.h" +#include "hw/acpi/erst.h" #include "hw/i386/fw_cfg.h" #include "hw/i386/microvm.h" #include "hw/pci/pci.h" @@ -159,6 +160,7 @@ static void acpi_build_microvm(AcpiBuildTables *tables, X86MachineState *x86ms = X86_MACHINE(mms); GArray *table_offsets; GArray *tables_blob = tables->table_data; + Object *erst_dev; unsigned dsdt, xsdt; AcpiFadtData pmfadt = { /* ACPI 5.0: 4.1 Hardware-Reduced ACPI */ @@ -208,6 +210,13 @@ static void acpi_build_microvm(AcpiBuildTables *tables, ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, x86ms->oem_table_id); + erst_dev = find_erst_dev(); + if (erst_dev) { + acpi_add_table(table_offsets, tables_blob); + build_erst(tables_blob, tables->linker, erst_dev, + x86ms->oem_id, x86ms->oem_table_id); + } + xsdt = tables_blob->len; build_xsdt(tables_blob, tables->linker, table_offsets, x86ms->oem_id, x86ms->oem_table_id); diff --git a/include/hw/acpi/erst.h b/include/hw/acpi/erst.h index 9d63717..b747fe7 100644 --- a/include/hw/acpi/erst.h +++ b/include/hw/acpi/erst.h @@ -16,4 +16,9 @@ void build_erst(GArray *table_data, BIOSLinker *linker, Object *erst_dev, #define TYPE_ACPI_ERST "acpi-erst" +/* returns NULL unless there is exactly one device */ +static inline Object *find_erst_dev(void) +{ + return object_resolve_path_type("", TYPE_ACPI_ERST, NULL); +} #endif From patchwork Thu Oct 7 17:14:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542447 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47CE5C433F5 for ; Thu, 7 Oct 2021 17:23:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD1AE6109F for ; Thu, 7 Oct 2021 17:23:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BD1AE6109F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:54502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYX70-0001XZ-Tv for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:23:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz8-0001mF-Qi for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:12 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:48528) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWz5-0001tf-JV for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:09 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H4rZe025160; Thu, 7 Oct 2021 17:15:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=bEuMKWR0GyjwczJI+iOqVJ89yXeASoPyupZjMOgtysc=; b=xKeXSrzfarvNih/LH44E+AL7O4eFRd6WF1VFOj5r0qZADczY6xvR4DyeOebdEPqvlCNM 1wJvlsV5G80vL7jd78rouigGM3DY9geMbrOE6H71x/wFxMCkUQAG9V0ZskVHZ+GTmQCY 5XvKEcwHNBqZIPCaD7vm3xJBXSVOhkXiDJj4Zcju9xmdh4/5G0g9dJQW8zOQ9dVIvVui HNQeFs5OXlgKwgBHh4eQVYMjqJjJ4VuARz2eOEWr2KA0bI4N9pTx5s76Zc4OGj5yXOJ8 ljoPI7Eq883utitPGVRZECZkXPd6qGeCYtJdh/W3FZewh/3uT/Ye4GCmwxGGJGFQwSyv oQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bj0pw2d2n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:05 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HAnrq066991; Thu, 7 Oct 2021 17:15:04 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by userp3020.oracle.com with ESMTP id 3bf16x5tk4-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nkPWlaMMnH7xVYTEa8tPXLdim/ChUVY5Tq8lNdftVgL7RQFGKXWTBhtUngrBbfGbATe+du/MiWUjQUN+eJI1hACLP3VSPrJjlPuQGq8qZ2IrjU9/Q9wPT9Jg3b7g2rH0DlvCoPAzK6/iidKIxHfKUSUS7TrsNFhMnDEjY+yA1mbfaCg35norl/NncctMhcebF6CYAgPAbYLojFXr2sPHJUIUuSFnrQgIohDZPAcjRxdf/R8rVhzCsf7SyAubEYujLwK1JEmv0oTKGkVGMKuR/y27XVNWhN9XjX6gI7APn4VI76q3qEYUhIl6t7vMxjgqdK2CBwVXgMW/v4w9Po1blQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bEuMKWR0GyjwczJI+iOqVJ89yXeASoPyupZjMOgtysc=; b=QtzxweNg+vm+D2JP01a+HXVUHwJuZny9vobM0fkXtqhrtsb5Ig4KYJ4NORC39RRS4WowSleDvshllb5u5J2J9n6DV0rX+nF5bUxd308vgFD5oXJpzV240CrKcp63ODEX6Zy31DHn06jr+kvgOOadPLBUBQKiFMp6+XiJCMq/uYWQZX9IAKxH2ey6Ta3bp7VeaJW44pC67uq/v5Cymz93kbO2vSrYZjGHjj+c38sPz7t+dBoi8QVpzgS9uOedF6ReEdMpCsWD0w4Oy/giDCK8jlqBNXtXECdZOicew4ValA2P9YW7LMbjEyHQrPCnOPTERgNBg4lQwMPYSRQfkYcmAQ== 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=bEuMKWR0GyjwczJI+iOqVJ89yXeASoPyupZjMOgtysc=; b=oqx4OG7wRxpx9Ut99/52cXkBzJEudEVobZnJ6ES3Spx1sE/N9acXZpl3YtEIqiUM2waQiGOtOf9OOKZz8rFgOcN04IsjGmRgl0PKg1dNYZ4AL0eHEtOezBePa1DDAa8LuOCG6N6pUaLzNsTrrFZDPhVSJBRt+1uIP6BWbD11BwQ= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:15:03 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:15:03 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 07/10] ACPI ERST: qtest for ERST Date: Thu, 7 Oct 2021 13:14:33 -0400 Message-Id: <1633626876-12115-8-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:15:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 691c135c-da38-4855-8d52-08d989b6003c X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:644; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u26lqG27Bm5QX1I9dhhWREEaTRrks99AsP44sosN1iePxgEVq+q04ZZTcFlxICS5/GW+Nvb16/tMr1F90ibXbmGceBnXWuuq18SgscDRv6cMkidvGHQrI2f2Ywtf7mbmjnuOUeW6u7sAcWr/E83N/8K1mCdYALc190AIe13P4bmN9foTJxoVHnfP63rOKBp5nQlpR7AU6EOKwMxCBA6AUYZFD84bObqgab1oVMQJbzPuAroSqeBsFwgwtwRAhadaIv2PhfRfdmAo1pevmg9N0NgQ17B6AmyP36bDfX1fYtcsAi04ILNdsNAMXhgvCKgVPfu7nZJIQnESgRbTHsjuuMIZbynMnPuZipdM4A2rf3lX2hvybFn6vatS3MJh8IQbcKANv0ILOpl9bP2z4yxgc+Vfu8VEKk0T+k2HoSz6eOc0SQZKkObyERt4TuBIoLlstLBItAwanJvUXMDGgABbk8GlqWXcObIHb84HnPkY9QMT4WQAV2p7Abkz2MabBCeTKg0j27vGYKJAZRA2O47keL/AXDTxlTy+QPymfsvgzlE+ws/r3lydkMZ54A4sxoEEwU40vvdE87/6kAFnGjsapll7Wj93VsY+sBqakZj38/RZSq1oktLdic8wS4TH6wZFyBGVz6mgB1yZ3y3D72a1yqb/q6EfvSPYp5UPwMngg/LQtmDmQywIZGw9ONrA+naDcUrjSpM6QWUIe+ySYvcxYQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(6916009)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(83380400001)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hVhtU/PY+TUSnVd0v2wGg4BAymLcVVFmQc19Lm32s3bNi0GTyrN/5j4xPXigZUxeXdTK3q6zLXTTIWlNE9N1DKvdmVB/84XzqS7daUDjahGPcmtu2Fjl1/nQr438jcIAdH/uGrsR+kQreydXPJxft0u8JqF1bZ3nZxf17iVEltUpWQ3noBRAdZmHqbKTxa7JtRXpKoSe+vOu1eK2n5RVNgUeskilIJPIjL0DcdjLGVP2szSlHCUKt91A4SFgh8wGYGSS7Sogyn8Jq4FuBT+EvaC+Gg6kGaWh8FcYxJGd0U4dAHtWDqZW7GhnJ2z21EJoVJygu2L22+wNOA5d6VAplQbDahFqkdg25kQ29PXKGCcGj7azqViPlcAe7+IIV9eXHgos8jX5OES0AFhphRoHdu1UQ3R2GTJAc5ZULnO55Wv0LZ5rnOg79YgogYkLI1UCO7XyTvFJdligC/ZBSEwfXycQVzajvDLGXvKAjryo6phlyWPB3Bk/IkOa7AZtk0NXi8TfZR6iPoZGDwiyuXv/9K8U+h7h6pvGyvgwIijBL+ppTIrXIwuClM3xnUISiyZA7TSyRmPYinyIJ+MJTZtJV8tSb4ALd3aj94t0U+NL3dZQFzDtdHi2n7B4STJfRGGY/Ipcrab5J6E07+1yX/Ng8hUGLoWR6vvk3FZ3r3s+HwD+R2rGPA27Ofc4g85qS777p++wBVuBbh19S8BqaWY9SdAZB8gfFKlZEeV1t82QqDmGz5iY/eoBzcA2YPCKICgjXkMGeDrsT/052bwZwOa0eSznLmjXe+VJkzIrmoCRbBewz9nCAAt09AjAn0AcOUu2ZsWS/VTCyf30OpErqT60ThBc9rODzvEuP+W91MtdjiHuRZ2JEbskRejUIXJLw1uHkaPOAnzNyYwhH63VN+XVYK/tBPArRpJRjcXMzgmn1IbifLTVw6DBOTSMC19MDnhbnaIwE279bQIH3bKsE8PzSu4SmFhDYJIKdakrPyx1jXgjiO7/sa80aDooqZ0ySCHD/F6hmpwGeCbDJ2fV5O3DvN4/DzxcSPkIlSHJ3tQ7Qy16QVx6AuPhqpBKfrxyipCNdUGTJwduIIxqcIFW9UlNZfMESB4fsnzGkNvCfW9+TO+jI1vde4zIMjHmCxmiVQZ1PxzYXeRRXLXl4rf05NWJ2gIE1RAx04WEk/6kmxpQMgcNSKG1CMQXxQwxOCaIVoEJSPhtJodeeGq/uuAFC7r4wjhaFjBdM7k2T0Td4Y9ll6ockSdMH6mxdCUesfdmuHj+Jz9TIal7IcHHVAJd9EdeuPTkl7+Ce4ZnAipgdjUc4hUwItN50JcQxhGoL32DQFwc X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 691c135c-da38-4855-8d52-08d989b6003c X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:15:03.2021 (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: 5PHML/TJk9slv1jF1yh9AVx5SXqEVUcdUNTWqr5ftLkWcMGPVsbQ0Qg3FG+mIh2Lw7uXTuLnhHuo8iR5nMyAda5vY3aAC+D2x2RIp/n2G+A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-ORIG-GUID: hU9VeK4_OwefQYSt0E_d1KH3aURDT6qL X-Proofpoint-GUID: hU9VeK4_OwefQYSt0E_d1KH3aURDT6qL Received-SPF: pass client-ip=205.220.177.32; envelope-from=eric.devolder@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change provides a qtest that locates and then does a simple interrogation of the ERST feature within the guest. Signed-off-by: Eric DeVolder --- tests/qtest/erst-test.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/qtest/meson.build | 2 + 2 files changed, 169 insertions(+) create mode 100644 tests/qtest/erst-test.c diff --git a/tests/qtest/erst-test.c b/tests/qtest/erst-test.c new file mode 100644 index 0000000..370c119 --- /dev/null +++ b/tests/qtest/erst-test.c @@ -0,0 +1,167 @@ +/* + * QTest testcase for acpi-erst + * + * Copyright (c) 2021 Oracle + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include +#include "libqos/libqos-pc.h" +#include "libqos/libqtest.h" +#include "qemu-common.h" + +static void save_fn(QPCIDevice *dev, int devfn, void *data) +{ + QPCIDevice **pdev = (QPCIDevice **) data; + + *pdev = dev; +} + +static QPCIDevice *get_device(QPCIBus *pcibus) +{ + QPCIDevice *dev; + + dev = NULL; + qpci_device_foreach(pcibus, 0x1b36, 0x0012, save_fn, &dev); + g_assert(dev != NULL); + + return dev; +} + +typedef struct _ERSTState { + QOSState *qs; + QPCIBar reg_bar, mem_bar; + uint64_t reg_barsize, mem_barsize; + QPCIDevice *dev; +} ERSTState; + +#define ACTION 0 +#define VALUE 8 + +static const char *reg2str(unsigned reg) +{ + switch (reg) { + case 0: + return "ACTION"; + case 8: + return "VALUE"; + default: + return NULL; + } +} + +static inline uint32_t in_reg32(ERSTState *s, unsigned reg) +{ + const char *name = reg2str(reg); + uint32_t res; + + res = qpci_io_readl(s->dev, s->reg_bar, reg); + g_test_message("*%s -> %08x", name, res); + + return res; +} + +static inline uint64_t in_reg64(ERSTState *s, unsigned reg) +{ + const char *name = reg2str(reg); + uint64_t res; + + res = qpci_io_readq(s->dev, s->reg_bar, reg); + g_test_message("*%s -> %016llx", name, (unsigned long long)res); + + return res; +} + +static inline void out_reg32(ERSTState *s, unsigned reg, uint32_t v) +{ + const char *name = reg2str(reg); + + g_test_message("%08x -> *%s", v, name); + qpci_io_writel(s->dev, s->reg_bar, reg, v); +} + +static inline void out_reg64(ERSTState *s, unsigned reg, uint64_t v) +{ + const char *name = reg2str(reg); + + g_test_message("%016llx -> *%s", (unsigned long long)v, name); + qpci_io_writeq(s->dev, s->reg_bar, reg, v); +} + +static void cleanup_vm(ERSTState *s) +{ + g_free(s->dev); + qtest_shutdown(s->qs); +} + +static void setup_vm_cmd(ERSTState *s, const char *cmd) +{ + const char *arch = qtest_get_arch(); + + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + s->qs = qtest_pc_boot(cmd); + } else { + g_printerr("erst-test tests are only available on x86\n"); + exit(EXIT_FAILURE); + } + s->dev = get_device(s->qs->pcibus); + + s->reg_bar = qpci_iomap(s->dev, 0, &s->reg_barsize); + g_assert_cmpuint(s->reg_barsize, ==, 16); + + s->mem_bar = qpci_iomap(s->dev, 1, &s->mem_barsize); + g_assert_cmpuint(s->mem_barsize, ==, 0x2000); + + qpci_device_enable(s->dev); +} + +static void test_acpi_erst_basic(void) +{ + ERSTState state; + uint64_t log_address_range; + uint64_t log_address_length; + uint32_t log_address_attr; + + setup_vm_cmd(&state, + "-object memory-backend-file," + "mem-path=acpi-erst.XXXXXX," + "size=64K," + "share=on," + "id=nvram " + "-device acpi-erst," + "memdev=nvram"); + + out_reg32(&state, ACTION, 0xD); + log_address_range = in_reg64(&state, VALUE); + out_reg32(&state, ACTION, 0xE); + log_address_length = in_reg64(&state, VALUE); + out_reg32(&state, ACTION, 0xF); + log_address_attr = in_reg32(&state, VALUE); + + /* Check log_address_range is not 0, ~0 or base */ + g_assert_cmpuint(log_address_range, !=, 0ULL); + g_assert_cmpuint(log_address_range, !=, ~0ULL); + g_assert_cmpuint(log_address_range, !=, state.reg_bar.addr); + g_assert_cmpuint(log_address_range, ==, state.mem_bar.addr); + + /* Check log_address_length is bar1_size */ + g_assert_cmpuint(log_address_length, ==, state.mem_barsize); + + /* Check log_address_attr is 0 */ + g_assert_cmpuint(log_address_attr, ==, 0); + + cleanup_vm(&state); +} + +int main(int argc, char **argv) +{ + int ret; + + g_test_init(&argc, &argv, NULL); + qtest_add_func("/acpi-erst/basic", test_acpi_erst_basic); + ret = g_test_run(); + return ret; +} diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 757bb84..d96ccf0 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -68,6 +68,7 @@ qtests_i386 = \ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \ (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \ (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \ + (config_all_devices.has_key('CONFIG_ACPI') ? ['erst-test'] : []) + \ qtests_pci + \ ['fdc-test', 'ide-test', @@ -246,6 +247,7 @@ qtests = { 'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'], 'cdrom-test': files('boot-sector.c'), 'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1, + 'erst-test': files('erst-test.c'), 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], 'migration-test': files('migration-helpers.c'), 'pxe-test': files('boot-sector.c'), From patchwork Thu Oct 7 17:14:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542471 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 872A6C433EF for ; Thu, 7 Oct 2021 17:33:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2737660E09 for ; Thu, 7 Oct 2021 17:33:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2737660E09 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:55332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYXGR-0004Kh-BI for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:33:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWzH-0001p2-Bi for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:20 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:36200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWzA-0001xd-UT for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:19 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H5Og6014736; Thu, 7 Oct 2021 17:15:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=NbM1uYoCA/XcZj7C7eIJtD4iTl23PjIQZIIrfLnFMhc=; b=O2qophfVyGryFLsKvMPo+Onc2cBgMc84qSPCGUbbTlNrZP9nHfhFxp0ny6UR/du9IiDE ylYnXBmn9YWjwe0JF+Eka46R3FJs+Bt1kFKnkZYLsCFU6G5M3yOeQv1scoCyRybT9D3b F75kdHhOkIkzVwN+GEzyn5XT3+AacE1WaQ1kHb7iiIhu920m02lqYHh3DlUfgfIloRvi yZdwsug+wykJ9ji+/WQSihLYO/Rck0+/I1jluIO1UiGB8mtgoMPOyU+0fR6YeuC3a5LF 8F7J7wMtwjG5N5D8ydKx/bl45VzxwIWA1J0ssTFgc2oIEzEYcZo/ln1E1g0TBmxN/mc8 oQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3bj02jjcrm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:08 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HAlcr119293; Thu, 7 Oct 2021 17:15:06 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2175.outbound.protection.outlook.com [104.47.58.175]) by userp3030.oracle.com with ESMTP id 3bf0sak5vy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hLbId+CHjkej2Z1VN5bpKAtKroeg/RcBur16J0EOBq/0xdfWRGF0nhkAKxvMDVMOzIItJ2kkBndaJzXVxB8ApmQulxj3Fv/9bbkWVaE+xWRgPmK/wCuvAiZdAdT/bd2uIiOrAthHoqf+VtXudEWu7C1S6GTQmWH8t3r5dEd6wfeb1K7f/7Twqrjk73f23EXVyDbfVLFaIoIvSJuWR/C+C6W6q0KLE4N3hZCi+b3TM5cYqdV/SgmMcqNteXhZzSYu9iWAMDRgZsu2VUtaAylkmkJk3YZZBkXDpq0tZcXKtZI2Ay+F8PJifjUowtoQ6K/Ph3Ce0fbUqEAHeNBJ79EktQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NbM1uYoCA/XcZj7C7eIJtD4iTl23PjIQZIIrfLnFMhc=; b=oWhPq11f1x6Y80R+sKTJjCdEBTsJvAdVbd1MaSy8yeOthiW68jNzgZobc7fGfmkYck1czvdMJf07zI9323ZRy8F1kEsaHs4h6UJFklN+ySgSu6DyyHtjleyHJESqpcpjmxpjORgdN4EaNXJI3p5eZj7hHB010p4Hzrhsm+elqabk0mnO2vNOfuc9r32jt7zlRMLAwID6aOSqeG6sL/m88+EtKVQkzFd2ZbM40vXNASkzgLtT6UG2yxz6uSbh78Ypn6uWouYKWDw1DD2ClG+ZS8nmDJSb+aAjD2o8/SyDtyYn1JNRX24yas+liDqZAY0cGT4s30awum45SoqjN3nEwQ== 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=NbM1uYoCA/XcZj7C7eIJtD4iTl23PjIQZIIrfLnFMhc=; b=NKePLrvFNjLQBmkKPwAWuyauV8A4lpS0MPayNAVRwIcI2mHp12WAr8RT+xeGkU+AX1EOUc5yXkupDsmonk52FlBAy/AMWYLKfPBNV3bBPZvmVPqJsoRGe+gRFykNwdpr4P9KDpD+YbC5bV63Vw1c3uaSZRxs2Tk3lc+Vd75k6qo= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:15:04 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:15:04 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 08/10] ACPI ERST: bios-tables-test testcase Date: Thu, 7 Oct 2021 13:14:34 -0400 Message-Id: <1633626876-12115-9-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:15:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5961ca8f-afef-43ac-6e17-08d989b60114 X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:415; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aRBoAIBioyojp34ibqxhkdasgepd6/6Qdyx03tdVySWOCvLkFecD6vGvwBtvL6fpp1kzCYOO9yUq8zQVo7p8BTSukQ6suhS/13GqlhFdQYALvs10us83WlQXX+ngESFc3lo+ypL6ZIZz+yital5AxS14kgRrW3GyNUe7Mt+VVetvrK0XIUpfm7ARNi4N2oxhz14fPyerX74f0IHR23dBQkHy4wVSaeP+3sCqPFMXRHhtiNruB5xYy9mtfkhgwTzhXnR+aYaRCFv5ztdlQJirfHSy6NvJCMljNBK+HF9lyYDhvjdTMouMg6DoCAX/SisGXnGPq2tJpPUciqzoTrbWVR9krUPX8uXJL1Uz2OO9ZerGgkZa4/QtsdGBAHrufPKnMl4ykzLUwyXbVlSlWqbgEPO5Lms7v5aQLOLwUeAkHBjHnINOv+w3OC7Y0aJjocP9grrx3Ozk9bVN3jOvusQBwrrP+OoASPdJKdSqDwwerg+jN9tWsmSQmM67jhYUSiGLJUlZwE+QjCcWRzcbv55YEptyMkJZsT2lhaEEMyc+/XWwfKjVUL8TJJnHRTZjm0D9RvZHpI3hJL4Xh9KneBKoiWIoagLo34Ww0MZqQSRCTJ6Wf6XW0lLLwj0XT6SW454UtykERt8ij6Fx5BuWxy4j7jusHkH1yVPimFbTblq9vYNHEN2P2Jfyf8XjtuO/hgqcoxdOkSfX7qR0Yqy2MufnQw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(6916009)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +VvNHYk5rr56xowbkaIqrcOXDV3uCk52cTmdNVgu71itH8idmr83Ae48IZBoaGOFTm9EWtHkjijaGFrQU15GU56GG93Uc9oKjU/+p4R4wGIU38rRsi496+aIjpinhCe9NRdvI9/IXGHooqPjCtqRp8UYKavMNtqiOm8vvt+4CnbyZ6lGGiNKNTetufrmjORiG9DTz7n5n12NS+Y01OoygF51vg00IoUqIf4CWOkr14BKgEEZnEE6tMtorgV8sKXBISnlBi6yCiYRSV3CkNCX7X/jlYhx4tRUS2c8zF7/lzw6v7GBQzQC+vH1HUGZEREBX7Qo3Ccj0TCd6FpTCY+EN5NgHi5fR6naJAjqd8xouGJd37/2ETp3Lq7EIIPpHSTwm5ny13QpSUwpqYVNQeQqrE79Gs2GyCDLmUz8CTdJeaJCZI/ylc+doJ8po8RTJpcFMYWcLGVuYTxnD/TZ8+xNPIbZvngncyLvQBZoLB2NJmaLnU/+NAKO7x04nqPhSm42yvMycnTV6iDhxP0JPmFXH4sdBzKboiT6DXjS1X2RhldguGYVl4YqBcPi1BQGz5rLGQS47alUntE+VwFIuiU6+/rOrGUQZ149ZlF9hRtb/92Iz68GPkU4DJyQFqH9ODnzVvSUF+gf7b8ccesrey6YwNO3mRcDfcj50aHCrS1CzX0elVKUvcUkBb412HZWblIcZcJLpHG9XLKQZKx8+C5bmgd5fpURgcUdk0QEPyrwHN+Wvdd9YUDukJpYjS4vYhYJBlFz+igdmBO4ho2EAJkwqFRkQXLu3BQEvl/MH714whmSDE/9qowp/qkWNHaCWSb6oQKHMcfUcRWidKS0tX4bxwD8XD2UxJlB9+TWpIDgnmw2NePgLtkVakzb13kqomdcMep+lPRqFpEP6Nxm1Pa4w+U2hbP8YZL+5wctMANrIitk4p+SEOYjXVEYplFKRMDOz0QQlwnJnsVfgBS08V5kUr8vaojHb+f+I98VMsYGTEcvBvvylp1oslDmX1OyEKFGt91swf3e1onkM4isRdq/HLwcUfmOjDr/fkwkq0jr36H5tIh6La0+6ZsYEZ+aVihpJPPaKb6cqE8jsCkGAIb12VSxP6X/2vVosJEiTSl7JZ64dcjyrJXhrtGMnwZLKsfFugzEb0MaBoKyDKGf3zOAmzVEd3cGkFPeWWIDR/v2Yq2goooRhjhdSdTiEua+Jt502r87C9uXG4OE4f7/pPDG1wGhJ3RgYbP+yFxPoNOUDzAIQl8Dod9utlkIuNZbXEb62+FWjwNSU/QDlDMSZDZ++/z68/RaEc6w78OcoDDKqREgXlgzCxJ+18oGbeGlqZBN X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5961ca8f-afef-43ac-6e17-08d989b60114 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:15:04.6866 (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: epInjTQ/wg92CJ5lXxXXgMMLZO0cvmAeerresIETQrNvERbe2KlPmzlFA/hL2zLR9xh8Q6RdSkbnJxrhjnRtP7bGjCM88mYfFY8z7ywLwLQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 adultscore=0 mlxscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-ORIG-GUID: qbRoAAfX6zcrB-aRpFzA5ilpJe97M_in X-Proofpoint-GUID: qbRoAAfX6zcrB-aRpFzA5ilpJe97M_in Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This change implements the test suite checks for the ERST table. Signed-off-by: Eric DeVolder --- tests/qtest/bios-tables-test.c | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 4f11d03..617eaf6 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1381,6 +1381,57 @@ static void test_acpi_piix4_tcg_acpi_hmat(void) test_acpi_tcg_acpi_hmat(MACHINE_PC); } +static void test_acpi_erst(const char *machine) +{ + gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL); + gchar *params; + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = machine; + data.variant = ".acpierst"; + params = g_strdup_printf( + " -object memory-backend-file,id=erstnvram," + "mem-path=%s,size=0x10000,share=on" + " -device acpi-erst,memdev=erstnvram", tmp_path); + test_acpi_one(params, &data); + free_test_data(&data); + g_free(params); + g_assert(g_rmdir(tmp_path) == 0); + g_free(tmp_path); +} + +static void test_acpi_piix4_erst(void) +{ + test_acpi_erst(MACHINE_PC); +} + +static void test_acpi_q35_erst(void) +{ + test_acpi_erst(MACHINE_Q35); +} + +static void test_acpi_microvm_erst(void) +{ + gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL); + gchar *params; + test_data data; + + test_acpi_microvm_prepare(&data); + data.variant = ".pcie"; + data.tcg_only = true; /* need constant host-phys-bits */ + params = g_strdup_printf(" -machine microvm," + "acpi=on,ioapic2=off,rtc=off,pcie=on" + " -object memory-backend-file,id=erstnvram," + "mem-path=%s,size=0x10000,share=on" + " -device acpi-erst,memdev=erstnvram", tmp_path); + test_acpi_one(params, &data); + g_free(params); + g_assert(g_rmdir(tmp_path) == 0); + g_free(tmp_path); + free_test_data(&data); +} + static void test_acpi_virt_tcg(void) { test_data data = { @@ -1566,7 +1617,11 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_microvm); if (strcmp(arch, "x86_64") == 0) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); + qtest_add_func("acpi/microvm/acpierst", test_acpi_microvm_erst); } + qtest_add_func("acpi/piix4/acpierst", test_acpi_piix4_erst); + qtest_add_func("acpi/q35/acpierst", test_acpi_q35_erst); + } else if (strcmp(arch, "aarch64") == 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); From patchwork Thu Oct 7 17:14:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55F47C433EF for ; Thu, 7 Oct 2021 17:34:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00AB261108 for ; Thu, 7 Oct 2021 17:34:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 00AB261108 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:35322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYXIA-0001Me-7N for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:34:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWzI-0001pC-FY for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:22 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:42944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWzD-0001zp-6C for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:19 -0400 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H4pHb020991; Thu, 7 Oct 2021 17:15:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=0pnkBo0Jo0Mv2Z/pP8Uw4ieZq+cGWDm3B+qrm35nYuQ=; b=RwxCzUy76tEmRaWFz76IUwZIBQSJqwJhLnEhEMMi7lmTkcuNMi5MrJ9cHc6kR+InZwdQ kPmJV558bH/rE7R1Gl5jULztPjYZm97uQ7ghZWbfYMd2pTLg2S1r//Vn+fkrJVTu0G6M 0/gynZAdyDIK9wQerTLdsXq58WN14/zmMs9/bc0leQkVJ3pXAua9mVljF4vrN5l9736f XuJPJifify3nZhECbItsWAan4VfeIYUpO2LIY53waITI8FZoT5z/Fuz+fdWmpYgQl9S2 NMKFVLmNCgZy9aoNbvGbgYy+Vy+IG/cKobr66A0Y6tpnZ6HNBfsuyMpZDMmr5PpgTmgL +g== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3bhwfdkc6x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:10 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HAnnF119620; Thu, 7 Oct 2021 17:15:09 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2175.outbound.protection.outlook.com [104.47.58.175]) by userp3030.oracle.com with ESMTP id 3bf0sak5y2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gupm39fX0SPX20yX2PUmJhSeUFdekJTqvHQAbV1r34GqX77lwlchwa/m+k/Wt7A39nFngukK1JzS0hnAxtOzyo32z4SDj+FT7ZT+tBjii2nz0JZ/YVNdYZAPpOXvVcW6yzHE5bD2GYtA7+aOKHTXpBCVtYJ0hFXd9o8GkERJom8Y/z9qGIsZ2NvXWE5ASNfBUDs0re63q/t50TlvWO3rjW+Q5+IbnPnVyXLdBsuQn53wBseWrTg1PqdYu8v5Yt2pMDdt34xZno4Ol0QyYPB4V5RW0vIwK03Dgu/9Q8nvm+EGrVz6kypqrnCAl+vVe9xiClkdXkQ/V31/EiUnBNwzbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0pnkBo0Jo0Mv2Z/pP8Uw4ieZq+cGWDm3B+qrm35nYuQ=; b=JaCCqUSyfJNoeV0lDVFwj3XEe6/15KbC8d3q7HwZWu3zu/vStYHXE+dw3FpSJJ9N1b4N7educJ7MYh6stKGZOa9ADg6zhxDgNwV3DqMJiO5ZQSE+wgiL+6s6a8XMQ37T5K04IfAmI5c32N7dn9RM13zKEAMJ1HZMWAq/T7ienVzEj6iylIcZHmIm+d47eYv0AHIiwMRYWKBeZnY9URTshQIm9dG2k4bbFtxmljcWcW7DoDKSz7afU61eRS0iST071Gi8TTcMnayKruncues3DDMVDbwuqA01ID8zJXqM6M7PRIwjIMOS966ZdIuxKKJTeu3pz0v9MrzqYXXs1znF2Q== 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=0pnkBo0Jo0Mv2Z/pP8Uw4ieZq+cGWDm3B+qrm35nYuQ=; b=k7kVjhZURi7Dr566+yS6lAkyO2hH1a4kYVeEnonzN0KxyUc/BtSvkHk43m5FNmqdX0KORNPnsgY7zScDtvuygIfLlU7Cq0edGkuK9BmPcpDVZuU/fPAURHEUxFRBtWkYyo6OSnrLb+cClXtgWbRJPkjm9aHkeSuEvA3EncT6XGg= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by CO1PR10MB5524.namprd10.prod.outlook.com (2603:10b6:303:163::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 7 Oct 2021 17:15:06 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:15:06 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 09/10] ACPI ERST: bios-tables-test.c steps 1 and 2 Date: Thu, 7 Oct 2021 13:14:35 -0400 Message-Id: <1633626876-12115-10-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:15:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 14d9c685-500f-4d81-4f59-08d989b601f8 X-MS-TrafficTypeDiagnostic: CO1PR10MB5524: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Ey1PhUngfzZi+7fu+36EJAjk+0h5H0uSEypnjiUr4s6RYl3lyd545/5fOB2oVyvhWPtGVW4QX7E98O3Aic5s3ybnR6gouK2UQIMZHxglpoPuZjYtA7o5QlflpEJh7s5jG1mnJKQYlBSclvDgRM/3hkp5qG99s50mcwhqDhacniGu9XsZvgnqO1RfcOmSN24IYIdO1R3j/BhHj6eJq2XlDvFAvcy/akRsZYDaW0VEA3wucgIjxmthn5vnSCqwLJ+zHBVyinCt1jV4zPP5NLgKk9WduI2VLT6XEYsfi94f0cjsjF/3VWh8mbsvPETE5oQNkgKszA16Ghu8iMgCGWn/x94xzpJDF7rcO3MklD3t1tREytJhS+xcUIx/rae355OsxFx25u5NhhJ21VNUduHtOE3dmcijSBTheDigj9IGPXLjgwyjwz+ztD6C7NRJlh5i3lz9a3/xzAYdfQhMaFM/KfmGNnCTmi3jf+pAAJxu+Obq8usHCdGAwu5/Vn6iiKPRjYB3uZHG/dPlbQbXPYGdMS29qnttNWBhpq04FtoWR5cyPQgy3vkyBM122vGzQFP6qCL5UTT3URoyFQvt4EprL2Ir0m+UbgFb16bm6ddawofk/PqljO8K4izNkqMKbFQVNgsCavkBkj+uhmLZKFinPeKvJBGkbpThD3Vnr5kzeuzkJIXESU3GnNILPfgWuRgr9+48nFnejMnrjhLz1n1Mg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(6916009)(38350700002)(66476007)(2906002)(36756003)(66556008)(107886003)(5660300002)(316002)(86362001)(8676002)(2616005)(8936002)(6666004)(956004)(4326008)(508600001)(186003)(6486002)(52116002)(7696005)(26005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WbIf7ZkXWoFSju9G4v7+kV3czdMc4jA47NN0G+KKo7mouB/3VLqeU1bAK6D8b07pwiJppu2FaVLM8jmT7Xy77UlNkm3EPMHsGnjlQSscXh24jzh4oCDk2m26YcQkQFupR3Wo0LfSEHWmERfjJ8LL+Egk3OwbLrfsh7h8x9ml95WBcOXaaOupD3GB7LRCETSxxez4SX/IyTyJZEgOyABYJg0TONwx1023KpVO0KPiqOds07hqQ21Z2c63TVMKdNYGMbeKTwHCVJOJt/CfUgWPQAkfZbZyXDyXbm2/a4qdxO5yyC40KV6FxuVRxA9hwEtgMpDNMirKSsX6svjEsyoWgyJQWl4mm0mKY4sVHFSpsQfKzjHz2ScVY2W1TfBfxvprDTmq0A9KGx8+QVknzRPMJgVZ/J4MOeEYO6ctPGiUT7Qm1LxEhv6r1SR+DUqMJITYZia0l1mxCkULwDVS/jVcQQOd30xZWRCl3iRgO9Q8ExzGCA1zUDPqmFVmaU+EkQwYvRzwv/uhEFNa5aCNv0NbJeKsDBhK7i/dN/bmd7uHSZDYjV3SDzSj3UNRcxkmii014NDT/BwXznICtyusWSKQyBeNH8i7DWFlOHzBIXRAovVofI3YAkGUeXpDd+0osq4FxzHr1cD/uyhsdmwWY9tC+J19mG68n2FuyTKc5cKYkS1cJpQOI4EYyZE/PzPETOc0E7nabfSb26AvWskVrlAgo9MRVn7CKMWd+Hfhex67BoD9O5G6b7w9+mMRI78yVx6MVol5N0dUuXysZ4KwQqwOCvcya3DOrIOlsH3AvPkqyBXVEHV5c7Akbhb56mPPkQL5mIJVj2yHwwobUOTSkiJFSZEiBAe+y3w8fUBRgaU5Clc2kZi1Zb2OT1q/GUrP7mibwxPyidJTshTuY1b1qE0jrsbPAlARENPCI4Kt1a6Mt1hOI88pr8DUaSVb4sCIrB+e6N7KuAku76gaPCmepSXVUs+9zwk625Je78c5/Uz736Qorj/1jhTPBUlKuuHe7AKrDf5cxutpt2exqLPtup+TgMMErJVqxiFE1cY+3mhLx/pWD9wK5DDVhlVbQWp+Bz0GU01hkjkgVsGzL0YdrhBqOKkCaeh0w9JY2cbC8h1P3rVI/jWkNDOByC0pZqhw4hFsnVhlzMUufImkF0zyysm7EkI50DJyIhwKarUm3uVIpnqgjqTIohycfoc37WOpPXstu2j8QW6zSqf+o68LibufikYzxhxvbg2kIbOaPhH71WG8qc/mkEeZvDFnpSxRBJtSjEG9cSaW3PbtUjmqnp35BzKM6uKo+u1bfxeVERYdSolLumiitWdG1FTJY3abPNjM X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14d9c685-500f-4d81-4f59-08d989b601f8 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:15:06.1481 (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: 8Uqj4NH0K1Um1ymn2lQz26eoa9XKn4x/t257IyVJQyf04JSrxowB/eEAJ8OpxUs8hzXe4eGgZH/AADK4NdMMMd1+LNUax78DXwvXSwfiDLY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5524 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 adultscore=0 mlxscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-ORIG-GUID: wIdcVV4e8b3k6nITadl9qjaG8KDPPTiE X-Proofpoint-GUID: wIdcVV4e8b3k6nITadl9qjaG8KDPPTiE Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Following the guidelines in tests/qtest/bios-tables-test.c, this change adds empty placeholder files per step 1 for the new ERST table, and excludes resulting changed files in bios-tables-test-allowed-diff.h per step 2. Signed-off-by: Eric DeVolder Acked-by: Igor Mammedov --- tests/data/acpi/microvm/ERST.pcie | 0 tests/data/acpi/pc/DSDT.acpierst | 0 tests/data/acpi/pc/ERST | 0 tests/data/acpi/q35/DSDT.acpierst | 0 tests/data/acpi/q35/ERST | 0 tests/qtest/bios-tables-test-allowed-diff.h | 5 +++++ 6 files changed, 5 insertions(+) create mode 100644 tests/data/acpi/microvm/ERST.pcie create mode 100644 tests/data/acpi/pc/DSDT.acpierst create mode 100644 tests/data/acpi/pc/ERST create mode 100644 tests/data/acpi/q35/DSDT.acpierst create mode 100644 tests/data/acpi/q35/ERST diff --git a/tests/data/acpi/microvm/ERST.pcie b/tests/data/acpi/microvm/ERST.pcie new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/pc/DSDT.acpierst b/tests/data/acpi/pc/DSDT.acpierst new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/pc/ERST b/tests/data/acpi/pc/ERST new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/q35/DSDT.acpierst b/tests/data/acpi/q35/DSDT.acpierst new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/acpi/q35/ERST 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..c06241a 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,6 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT.acpierst", +"tests/data/acpi/pc/ERST", +"tests/data/acpi/q35/DSDT.acpierst", +"tests/data/acpi/q35/ERST", +"tests/data/acpi/microvm/ERST.pcie", From patchwork Thu Oct 7 17:14:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 12542457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 952CCC433EF for ; Thu, 7 Oct 2021 17:27:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 006FF60BD3 for ; Thu, 7 Oct 2021 17:27:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 006FF60BD3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:39574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYXAj-00021i-4o for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 13:27:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWzK-0001pL-B8 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:22 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:46422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYWzG-00020b-0b for qemu-devel@nongnu.org; Thu, 07 Oct 2021 13:15:22 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197H4KZo009649; Thu, 7 Oct 2021 17:15:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2021-07-09; bh=Wv59vW0KqEDpsVuwaZE9IM3vMDxCdd6vMNO7bRRBxds=; b=MTBQ6cv6B20DEkfTKMkc2sop6c4xYCYqawdqTQdTKgZ23BuuF9f7VniJkjLswJQLczCo 5Zfwp834hjmfVWVbiYho1D8upAFBGyvBWn7TyUu8fzoEo6HEsIsAOXmfAhHJJLdUMJVH EGOBbNrZulrcoSDftWpF7+LOfGmDh8QWV2qbuxLp0Anknp3BBI1EHDrJlye11djspk7X Z7J1wPUbn9AIEHja+YntGrTF+bOaf0x44XexUNSt5NhpzOCivRVmXHm45rOdMJds2WfR KBVj0t2xhy75ic5XeV6pBPhUl58DNgWgAiRCx967YPZ+fqk4WPCd3iCJHH1bNqKG+bu0 +Q== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3bhxbs38n3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:12 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197HA7J1131723; Thu, 7 Oct 2021 17:15:11 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by aserp3030.oracle.com with ESMTP id 3bev7wt1pf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 17:15:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LuswiQ1T6wwoeVz/dwRR4gQGy6hI4G3P21raLh3cFeHRq/rvvjWuGV573ZGG2jnPG9aM0UBv00zkpIDHOKWExee3FFhNdFxzFQqF6xafkWfEd/x8ukRle1wzq6zf9JaU0rEhhW0YMCu6FT3Bm2gfHZ+KJ2DurSRx3Ha/nMpFTZ4yr9Zt3lPIGLwAYpTixz2/3XmXMfYKNULNVeJEdGJ+PBG+lHD6ALS4Q3IKS6Z/p4Xeh5h0dwZUVV0hI5+nrts+BtA84IiEXW4i/Um8Droj/NKVjTZ7GWbReOjmMo1I2fQe9GBPUuWI3fIOIroiKEWw1WeGqTcl/SgZmd2B5ZB90A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wv59vW0KqEDpsVuwaZE9IM3vMDxCdd6vMNO7bRRBxds=; b=H6w7Pj1v/x4e9xnyD4JM+6t7RwwyzzfpMt6kfnQn0qCSgsDy3uKGm1OC+s4FEu3ZRdXc5vBv0Doqc7RakWRzxWVhGNl3mlm/EhSZxxuHbyF79SZzvwD2N2LIxd4UVonLqvYnc6W1Zk7m69YoURV4W9lk1/EcRUgaQ04VqPia51ZTlSenq+ETN+yF7ddwrDW4z+Y2MedOOVCpwHlbaF8jDWryQqbpQVVcZay7amaqVHk6gJ9RadDodEcQVTtEnX3ros6UUI28LE0C2q3d9kTgnPXYzzb+Q8WjJvMloRLyUaAQldDwoX/Pu+03rPD20ugkYVWKFsghwiqPx9KlS6U8Aw== 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=Wv59vW0KqEDpsVuwaZE9IM3vMDxCdd6vMNO7bRRBxds=; b=ao8GCZKugkYBSURN02M+/oqlw5V74FHzOFULNCkh/HTQ/471bYDs5Rz7F62/o5vLcWXDp/3I6bax7hbhek5FdOwNyNrSmKRoJSshwEm9TIwA1l/fQJkRWylbPVaaCn9WOmGLeFwTSTQ9lQkScbzTaUbbCsD98esx3L88b2LU6S0= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by MWHPR10MB1806.namprd10.prod.outlook.com (2603:10b6:300:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Thu, 7 Oct 2021 17:15:08 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::90ef:e061:a4c2:acd6%7]) with mapi id 15.20.4566.023; Thu, 7 Oct 2021 17:15:07 +0000 From: Eric DeVolder To: qemu-devel@nongnu.org Subject: [PATCH v7 10/10] ACPI ERST: step 6 of bios-tables-test.c Date: Thu, 7 Oct 2021 13:14:36 -0400 Message-Id: <1633626876-12115-11-git-send-email-eric.devolder@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> References: <1633626876-12115-1-git-send-email-eric.devolder@oracle.com> X-ClientProxiedBy: MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 Received: from ban25x6uut23.us.oracle.com (138.3.201.23) by MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Thu, 7 Oct 2021 17:15:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1f9acaef-ce6a-4bf8-57e3-08d989b602e8 X-MS-TrafficTypeDiagnostic: MWHPR10MB1806: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:590; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nLCX+dU7+ct5tX5ExaPcpPjVzoCFXho2sjyJVtuX1PEPiquljYeaEXXFrLNKXi478cxl460bjijn6GVqzWPrIJOQo6IQVn0JVe8f4IhYUn5a91q9aJ9X3Q/8nRh3IjMKy+hQhX38Z0YbKN6av47U9bqmbHnfHuSjXU0CCWSpmQr6cCS8U/3EmwQWVyqgtP0uwoZ+3w8tF+JPwl4n/IGUoNcCVglnPM9KJKs3MFiVfDXZQ0GVHnP+ysJF7drdOvLl5m6phNmA/se6b+n52wF4seTZFmoaICDvASQwF0q/2pIz+viEBjqUpK19vfzxy6LpUBaPxKjkptLWfsT6j3nHJ6KSqc9BnxRvztXIM0NmWbygh8i/IqfXjp22R2NonGeg+e2f8HadKiX0OgapRicrwqwjC2j+dVRh1ziJrY8Oio4Z3kZZJW0tR8o2KZrtwU2bPtspicwbYemBqJb8UdUKpiJrbam7x5ASg3laYBeL6RXCegz/c5MguEY9nQwDXKYcWUjBYuMtj95vAK7GSUaUrpQM2zu5OLOCuMbl13pjxChhB1iIjI81T3EpjAHot0K1JUhwBcgPR52/1ccBWAm42sFqUkLxd5vDkGi4YXY/HThZ73TrV2mQkdkcZVSAO0GsrN6Bf+eVqLuoY3G64NvcaBb7WTlYf8bixGhhfnuko48MwQQqmj7jaegUlb0uulxVXOkd8UaITpM3TRsEE5Xmbg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4531.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(30864003)(2906002)(6916009)(66476007)(66556008)(8936002)(86362001)(8676002)(36756003)(38350700002)(4326008)(38100700002)(66946007)(107886003)(2616005)(83380400001)(6486002)(508600001)(316002)(26005)(5660300002)(186003)(6666004)(7696005)(52116002)(956004)(579004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9Nu/3LwvKtHd7OHPcPOqSxovv6iWgfz7ffWQWAyegiI1BWQkbOfl22Fu5BKHp+Bzx8mr4jEVNoxbtfvxiYHxQzcJY8hqpYJ6NOarrWAH6+sdA9QPxvGqSp67YhKD+eH1AfVJX0wKSyHWA8WLn9AYwVTeaWx/JsBe2YG+NfN+ptv2D8eyBeqf+dz8fNp4tEmEuK1u09Yqlgwe9E+QtTJQMYk8MsdjaCRqqhmbYm9LSn0yPmqpXJZIbWuUydVcLJWSnWS/jnJR9iycXFaMJyYAuinvyAt1uaGNxRDDF7nLf8S+bigX/Wl1No3H4KqbOqAJMePZ3s2QB4YZj2Ly4XtXVTFFcuvlHMLdmhl9wWT2bxCJPmUnW6SQrZhk6oaHj2EMIgCO0K+Ci/c7Z7ySRRCA3HELEK6i52Nx5uL7y1rTHy3r2s7ICC7ot7hgaNzuYWrWYvjhwxpcdCWCcGeQftmNQWL2V4PeeJZdTlq8PYMdKoir59lk2ahXETU2qcw/t1/CJORcnCC5jJfbmtKjQFUcjdMk0yNxi8fyn/qKWC3uHzON2Eq6SeTJoVtDlS39t5al3koYJ/6mNyCa1NW0O/2jkoUGuTHPhCZAGszW/PEFzudEyUybMCMV2X/l1citBvOXt1+4OlQBfcUot4YAhTDYsBGY7lN9Pd80rJRFC3osrIVGqAZn3gPnAVY22i9ISBu6MS7fFavHGkzv2j4iEyw+SMG4//1GFq6K7KNVyYjxmpVouFHfkWtwxjxMvNLooLHg2v4uUIQQITofuSrikjzAPj5ZeysJoL46CgBUNDSvxAHBnmpojUGkiHTcsIV9dTpeCeri9YW6xlH6jMpKlBBmvYilW89yneHgRXrd6zNLlqrXpIX5LEQXOFXu/kYqsy0y7FJlI44tupRuIYV/baUkmZl20zWeoxCdbff8mBxwgBMHdRvA+F9lG6Rqk2hIClwLd7qn8AMbBawaPXxFZDUj/9TUIdd3wvJdARF/cNB8Et84SrO99Z4zMvWovIK0s4nSgUvZQLoBPKZuxIh6XvqkpJMV3w+Xok7WbGqFwxVOg6fJOM9YgXz26DAa9VKm2en7IMfGwelJigZTDa7z6hex8ssKKE6sCRTcmQAMU0HYSD4vKGE+jWdFB2rpGmYIY3kiFTNwtGPjHeH6TK1LJAPjZxTxQc2EJjwAQ/oyX1zPD9RvGgv3J4eoB3Yhw9kVnSz9xTNzG7jGYf9xQTrf4G3PD3vmEgBRdBSmtFQlwcUXaT2od4g0g7bfZgoeNofcFlJCWP7fkmJ5oTYiQ4gzbQECJNhID7upeaQwPCK4yw9c9w+PHzDwopNbUTJkmwIiZE9b X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f9acaef-ce6a-4bf8-57e3-08d989b602e8 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 17:15:07.7132 (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: pEi3qbeubnX+LMhXSqKw+C6ryZL6ozAGe88IZy/jrsfIksNl9j41gggO6iVe0lJ8+dm+ZOkxBBWp8oMx4lW8rKveNuxSlS6s/3a3G+Z6XcY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1806 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070112 X-Proofpoint-GUID: hXgbpAuowtI7XmT4dPWGgs0QzlcU-r7e X-Proofpoint-ORIG-GUID: hXgbpAuowtI7XmT4dPWGgs0QzlcU-r7e Received-SPF: pass client-ip=205.220.165.32; envelope-from=eric.devolder@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, konrad.wilk@oracle.com, pbonzini@redhat.com, ani@anisinha.ca, imammedo@redhat.com, boris.ostrovsky@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Following the guidelines in tests/qtest/bios-tables-test.c, this is step 6. Below is the disassembly of an ERST table, tests/data/acpi/pc/ERST. This is a PCI device and as such its base address can change; it is possible for the address fields to differ between this and other ERST tables. [000h 0000 4] Signature : "ERST" [Error Record Serialization Table] [004h 0004 4] Table Length : 00000390 [008h 0008 1] Revision : 01 [009h 0009 1] Checksum : D6 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 4] Serialization Header Length : 00000030 [028h 0040 4] Reserved : 00000000 [02Ch 0044 4] Instruction Entry Count : 0000001B [030h 0048 1] Action : 00 [Begin Write Operation] [031h 0049 1] Instruction : 03 [Write Register Value] [032h 0050 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [033h 0051 1] Reserved : 00 [034h 0052 12] Register Region : [Generic Address Structure] [034h 0052 1] Space ID : 00 [SystemMemory] [035h 0053 1] Bit Width : 20 [036h 0054 1] Bit Offset : 00 [037h 0055 1] Encoded Access Width : 03 [DWord Access:32] [038h 0056 8] Address : 00000000FEBF3000 [040h 0064 8] Value : 0000000000000000 [048h 0072 8] Mask : 00000000000000FF [050h 0080 1] Action : 01 [Begin Read Operation] [051h 0081 1] Instruction : 03 [Write Register Value] [052h 0082 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [053h 0083 1] Reserved : 00 [054h 0084 12] Register Region : [Generic Address Structure] [054h 0084 1] Space ID : 00 [SystemMemory] [055h 0085 1] Bit Width : 20 [056h 0086 1] Bit Offset : 00 [057h 0087 1] Encoded Access Width : 03 [DWord Access:32] [058h 0088 8] Address : 00000000FEBF3000 [060h 0096 8] Value : 0000000000000001 [068h 0104 8] Mask : 00000000000000FF [070h 0112 1] Action : 02 [Begin Clear Operation] [071h 0113 1] Instruction : 03 [Write Register Value] [072h 0114 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [073h 0115 1] Reserved : 00 [074h 0116 12] Register Region : [Generic Address Structure] [074h 0116 1] Space ID : 00 [SystemMemory] [075h 0117 1] Bit Width : 20 [076h 0118 1] Bit Offset : 00 [077h 0119 1] Encoded Access Width : 03 [DWord Access:32] [078h 0120 8] Address : 00000000FEBF3000 [080h 0128 8] Value : 0000000000000002 [088h 0136 8] Mask : 00000000000000FF [090h 0144 1] Action : 03 [End Operation] [091h 0145 1] Instruction : 03 [Write Register Value] [092h 0146 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [093h 0147 1] Reserved : 00 [094h 0148 12] Register Region : [Generic Address Structure] [094h 0148 1] Space ID : 00 [SystemMemory] [095h 0149 1] Bit Width : 20 [096h 0150 1] Bit Offset : 00 [097h 0151 1] Encoded Access Width : 03 [DWord Access:32] [098h 0152 8] Address : 00000000FEBF3000 [0A0h 0160 8] Value : 0000000000000003 [0A8h 0168 8] Mask : 00000000000000FF [0B0h 0176 1] Action : 04 [Set Record Offset] [0B1h 0177 1] Instruction : 02 [Write Register] [0B2h 0178 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [0B3h 0179 1] Reserved : 00 [0B4h 0180 12] Register Region : [Generic Address Structure] [0B4h 0180 1] Space ID : 00 [SystemMemory] [0B5h 0181 1] Bit Width : 20 [0B6h 0182 1] Bit Offset : 00 [0B7h 0183 1] Encoded Access Width : 03 [DWord Access:32] [0B8h 0184 8] Address : 00000000FEBF3008 [0C0h 0192 8] Value : 0000000000000000 [0C8h 0200 8] Mask : 00000000FFFFFFFF [0D0h 0208 1] Action : 04 [Set Record Offset] [0D1h 0209 1] Instruction : 03 [Write Register Value] [0D2h 0210 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [0D3h 0211 1] Reserved : 00 [0D4h 0212 12] Register Region : [Generic Address Structure] [0D4h 0212 1] Space ID : 00 [SystemMemory] [0D5h 0213 1] Bit Width : 20 [0D6h 0214 1] Bit Offset : 00 [0D7h 0215 1] Encoded Access Width : 03 [DWord Access:32] [0D8h 0216 8] Address : 00000000FEBF3000 [0E0h 0224 8] Value : 0000000000000004 [0E8h 0232 8] Mask : 00000000000000FF [0F0h 0240 1] Action : 05 [Execute Operation] [0F1h 0241 1] Instruction : 03 [Write Register Value] [0F2h 0242 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [0F3h 0243 1] Reserved : 00 [0F4h 0244 12] Register Region : [Generic Address Structure] [0F4h 0244 1] Space ID : 00 [SystemMemory] [0F5h 0245 1] Bit Width : 20 [0F6h 0246 1] Bit Offset : 00 [0F7h 0247 1] Encoded Access Width : 03 [DWord Access:32] [0F8h 0248 8] Address : 00000000FEBF3008 [100h 0256 8] Value : 000000000000009C [108h 0264 8] Mask : 00000000000000FF [110h 0272 1] Action : 05 [Execute Operation] [111h 0273 1] Instruction : 03 [Write Register Value] [112h 0274 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [113h 0275 1] Reserved : 00 [114h 0276 12] Register Region : [Generic Address Structure] [114h 0276 1] Space ID : 00 [SystemMemory] [115h 0277 1] Bit Width : 20 [116h 0278 1] Bit Offset : 00 [117h 0279 1] Encoded Access Width : 03 [DWord Access:32] [118h 0280 8] Address : 00000000FEBF3000 [120h 0288 8] Value : 0000000000000005 [128h 0296 8] Mask : 00000000000000FF [130h 0304 1] Action : 06 [Check Busy Status] [131h 0305 1] Instruction : 03 [Write Register Value] [132h 0306 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [133h 0307 1] Reserved : 00 [134h 0308 12] Register Region : [Generic Address Structure] [134h 0308 1] Space ID : 00 [SystemMemory] [135h 0309 1] Bit Width : 20 [136h 0310 1] Bit Offset : 00 [137h 0311 1] Encoded Access Width : 03 [DWord Access:32] [138h 0312 8] Address : 00000000FEBF3000 [140h 0320 8] Value : 0000000000000006 [148h 0328 8] Mask : 00000000000000FF [150h 0336 1] Action : 06 [Check Busy Status] [151h 0337 1] Instruction : 01 [Read Register Value] [152h 0338 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [153h 0339 1] Reserved : 00 [154h 0340 12] Register Region : [Generic Address Structure] [154h 0340 1] Space ID : 00 [SystemMemory] [155h 0341 1] Bit Width : 20 [156h 0342 1] Bit Offset : 00 [157h 0343 1] Encoded Access Width : 03 [DWord Access:32] [158h 0344 8] Address : 00000000FEBF3008 [160h 0352 8] Value : 0000000000000001 [168h 0360 8] Mask : 00000000000000FF [170h 0368 1] Action : 07 [Get Command Status] [171h 0369 1] Instruction : 03 [Write Register Value] [172h 0370 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [173h 0371 1] Reserved : 00 [174h 0372 12] Register Region : [Generic Address Structure] [174h 0372 1] Space ID : 00 [SystemMemory] [175h 0373 1] Bit Width : 20 [176h 0374 1] Bit Offset : 00 [177h 0375 1] Encoded Access Width : 03 [DWord Access:32] [178h 0376 8] Address : 00000000FEBF3000 [180h 0384 8] Value : 0000000000000007 [188h 0392 8] Mask : 00000000000000FF [190h 0400 1] Action : 07 [Get Command Status] [191h 0401 1] Instruction : 00 [Read Register] [192h 0402 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [193h 0403 1] Reserved : 00 [194h 0404 12] Register Region : [Generic Address Structure] [194h 0404 1] Space ID : 00 [SystemMemory] [195h 0405 1] Bit Width : 20 [196h 0406 1] Bit Offset : 00 [197h 0407 1] Encoded Access Width : 03 [DWord Access:32] [198h 0408 8] Address : 00000000FEBF3008 [1A0h 0416 8] Value : 0000000000000000 [1A8h 0424 8] Mask : 00000000000000FF [1B0h 0432 1] Action : 08 [Get Record Identifier] [1B1h 0433 1] Instruction : 03 [Write Register Value] [1B2h 0434 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [1B3h 0435 1] Reserved : 00 [1B4h 0436 12] Register Region : [Generic Address Structure] [1B4h 0436 1] Space ID : 00 [SystemMemory] [1B5h 0437 1] Bit Width : 20 [1B6h 0438 1] Bit Offset : 00 [1B7h 0439 1] Encoded Access Width : 03 [DWord Access:32] [1B8h 0440 8] Address : 00000000FEBF3000 [1C0h 0448 8] Value : 0000000000000008 [1C8h 0456 8] Mask : 00000000000000FF [1D0h 0464 1] Action : 08 [Get Record Identifier] [1D1h 0465 1] Instruction : 00 [Read Register] [1D2h 0466 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [1D3h 0467 1] Reserved : 00 [1D4h 0468 12] Register Region : [Generic Address Structure] [1D4h 0468 1] Space ID : 00 [SystemMemory] [1D5h 0469 1] Bit Width : 40 [1D6h 0470 1] Bit Offset : 00 [1D7h 0471 1] Encoded Access Width : 04 [QWord Access:64] [1D8h 0472 8] Address : 00000000FEBF3008 [1E0h 0480 8] Value : 0000000000000000 [1E8h 0488 8] Mask : FFFFFFFFFFFFFFFF [1F0h 0496 1] Action : 09 [Set Record Identifier] [1F1h 0497 1] Instruction : 02 [Write Register] [1F2h 0498 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [1F3h 0499 1] Reserved : 00 [1F4h 0500 12] Register Region : [Generic Address Structure] [1F4h 0500 1] Space ID : 00 [SystemMemory] [1F5h 0501 1] Bit Width : 40 [1F6h 0502 1] Bit Offset : 00 [1F7h 0503 1] Encoded Access Width : 04 [QWord Access:64] [1F8h 0504 8] Address : 00000000FEBF3008 [200h 0512 8] Value : 0000000000000000 [208h 0520 8] Mask : FFFFFFFFFFFFFFFF [210h 0528 1] Action : 09 [Set Record Identifier] [211h 0529 1] Instruction : 03 [Write Register Value] [212h 0530 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [213h 0531 1] Reserved : 00 [214h 0532 12] Register Region : [Generic Address Structure] [214h 0532 1] Space ID : 00 [SystemMemory] [215h 0533 1] Bit Width : 20 [216h 0534 1] Bit Offset : 00 [217h 0535 1] Encoded Access Width : 03 [DWord Access:32] [218h 0536 8] Address : 00000000FEBF3000 [220h 0544 8] Value : 0000000000000009 [228h 0552 8] Mask : 00000000000000FF [230h 0560 1] Action : 0A [Get Record Count] [231h 0561 1] Instruction : 03 [Write Register Value] [232h 0562 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [233h 0563 1] Reserved : 00 [234h 0564 12] Register Region : [Generic Address Structure] [234h 0564 1] Space ID : 00 [SystemMemory] [235h 0565 1] Bit Width : 20 [236h 0566 1] Bit Offset : 00 [237h 0567 1] Encoded Access Width : 03 [DWord Access:32] [238h 0568 8] Address : 00000000FEBF3000 [240h 0576 8] Value : 000000000000000A [248h 0584 8] Mask : 00000000000000FF [250h 0592 1] Action : 0A [Get Record Count] [251h 0593 1] Instruction : 00 [Read Register] [252h 0594 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [253h 0595 1] Reserved : 00 [254h 0596 12] Register Region : [Generic Address Structure] [254h 0596 1] Space ID : 00 [SystemMemory] [255h 0597 1] Bit Width : 20 [256h 0598 1] Bit Offset : 00 [257h 0599 1] Encoded Access Width : 03 [DWord Access:32] [258h 0600 8] Address : 00000000FEBF3008 [260h 0608 8] Value : 0000000000000000 [268h 0616 8] Mask : 00000000FFFFFFFF [270h 0624 1] Action : 0B [Begin Dummy Write] [271h 0625 1] Instruction : 03 [Write Register Value] [272h 0626 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [273h 0627 1] Reserved : 00 [274h 0628 12] Register Region : [Generic Address Structure] [274h 0628 1] Space ID : 00 [SystemMemory] [275h 0629 1] Bit Width : 20 [276h 0630 1] Bit Offset : 00 [277h 0631 1] Encoded Access Width : 03 [DWord Access:32] [278h 0632 8] Address : 00000000FEBF3000 [280h 0640 8] Value : 000000000000000B [288h 0648 8] Mask : 00000000000000FF [290h 0656 1] Action : 0D [Get Error Address Range] [291h 0657 1] Instruction : 03 [Write Register Value] [292h 0658 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [293h 0659 1] Reserved : 00 [294h 0660 12] Register Region : [Generic Address Structure] [294h 0660 1] Space ID : 00 [SystemMemory] [295h 0661 1] Bit Width : 20 [296h 0662 1] Bit Offset : 00 [297h 0663 1] Encoded Access Width : 03 [DWord Access:32] [298h 0664 8] Address : 00000000FEBF3000 [2A0h 0672 8] Value : 000000000000000D [2A8h 0680 8] Mask : 00000000000000FF [2B0h 0688 1] Action : 0D [Get Error Address Range] [2B1h 0689 1] Instruction : 00 [Read Register] [2B2h 0690 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [2B3h 0691 1] Reserved : 00 [2B4h 0692 12] Register Region : [Generic Address Structure] [2B4h 0692 1] Space ID : 00 [SystemMemory] [2B5h 0693 1] Bit Width : 40 [2B6h 0694 1] Bit Offset : 00 [2B7h 0695 1] Encoded Access Width : 04 [QWord Access:64] [2B8h 0696 8] Address : 00000000FEBF3008 [2C0h 0704 8] Value : 0000000000000000 [2C8h 0712 8] Mask : FFFFFFFFFFFFFFFF [2D0h 0720 1] Action : 0E [Get Error Address Length] [2D1h 0721 1] Instruction : 03 [Write Register Value] [2D2h 0722 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [2D3h 0723 1] Reserved : 00 [2D4h 0724 12] Register Region : [Generic Address Structure] [2D4h 0724 1] Space ID : 00 [SystemMemory] [2D5h 0725 1] Bit Width : 20 [2D6h 0726 1] Bit Offset : 00 [2D7h 0727 1] Encoded Access Width : 03 [DWord Access:32] [2D8h 0728 8] Address : 00000000FEBF3000 [2E0h 0736 8] Value : 000000000000000E [2E8h 0744 8] Mask : 00000000000000FF [2F0h 0752 1] Action : 0E [Get Error Address Length] [2F1h 0753 1] Instruction : 00 [Read Register] [2F2h 0754 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [2F3h 0755 1] Reserved : 00 [2F4h 0756 12] Register Region : [Generic Address Structure] [2F4h 0756 1] Space ID : 00 [SystemMemory] [2F5h 0757 1] Bit Width : 40 [2F6h 0758 1] Bit Offset : 00 [2F7h 0759 1] Encoded Access Width : 04 [QWord Access:64] [2F8h 0760 8] Address : 00000000FEBF3008 [300h 0768 8] Value : 0000000000000000 [308h 0776 8] Mask : 00000000FFFFFFFF [310h 0784 1] Action : 0F [Get Error Attributes] [311h 0785 1] Instruction : 03 [Write Register Value] [312h 0786 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [313h 0787 1] Reserved : 00 [314h 0788 12] Register Region : [Generic Address Structure] [314h 0788 1] Space ID : 00 [SystemMemory] [315h 0789 1] Bit Width : 20 [316h 0790 1] Bit Offset : 00 [317h 0791 1] Encoded Access Width : 03 [DWord Access:32] [318h 0792 8] Address : 00000000FEBF3000 [320h 0800 8] Value : 000000000000000F [328h 0808 8] Mask : 00000000000000FF [330h 0816 1] Action : 0F [Get Error Attributes] [331h 0817 1] Instruction : 00 [Read Register] [332h 0818 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [333h 0819 1] Reserved : 00 [334h 0820 12] Register Region : [Generic Address Structure] [334h 0820 1] Space ID : 00 [SystemMemory] [335h 0821 1] Bit Width : 20 [336h 0822 1] Bit Offset : 00 [337h 0823 1] Encoded Access Width : 03 [DWord Access:32] [338h 0824 8] Address : 00000000FEBF3008 [340h 0832 8] Value : 0000000000000000 [348h 0840 8] Mask : 00000000FFFFFFFF [350h 0848 1] Action : 10 [Execute Timings] [351h 0849 1] Instruction : 03 [Write Register Value] [352h 0850 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [353h 0851 1] Reserved : 00 [354h 0852 12] Register Region : [Generic Address Structure] [354h 0852 1] Space ID : 00 [SystemMemory] [355h 0853 1] Bit Width : 20 [356h 0854 1] Bit Offset : 00 [357h 0855 1] Encoded Access Width : 03 [DWord Access:32] [358h 0856 8] Address : 00000000FEBF3000 [360h 0864 8] Value : 0000000000000010 [368h 0872 8] Mask : 00000000000000FF [370h 0880 1] Action : 10 [Execute Timings] [371h 0881 1] Instruction : 00 [Read Register] [372h 0882 1] Flags (decoded below) : 00 Preserve Register Bits : 0 [373h 0883 1] Reserved : 00 [374h 0884 12] Register Region : [Generic Address Structure] [374h 0884 1] Space ID : 00 [SystemMemory] [375h 0885 1] Bit Width : 40 [376h 0886 1] Bit Offset : 00 [377h 0887 1] Encoded Access Width : 04 [QWord Access:64] [378h 0888 8] Address : 00000000FEBF3008 [380h 0896 8] Value : 0000000000000000 [388h 0904 8] Mask : FFFFFFFFFFFFFFFF Raw Table Data: Length 912 (0x390) 0000: 45 52 53 54 90 03 00 00 01 D6 42 4F 43 48 53 20 // ERST......BOCHS 0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC 0020: 01 00 00 00 30 00 00 00 00 00 00 00 1B 00 00 00 // ....0........... 0030: 00 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0040: 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0050: 01 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0060: 01 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0070: 02 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0080: 02 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0090: 03 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 00A0: 03 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 00B0: 04 02 00 00 00 20 00 03 08 30 BF FE 00 00 00 00 // ..... ...0...... 00C0: 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 // ................ 00D0: 04 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 00E0: 04 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 00F0: 05 03 00 00 00 20 00 03 08 30 BF FE 00 00 00 00 // ..... ...0...... 0100: 9C 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0110: 05 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0120: 05 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0130: 06 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0140: 06 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0150: 06 01 00 00 00 20 00 03 08 30 BF FE 00 00 00 00 // ..... ...0...... 0160: 01 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0170: 07 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0180: 07 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0190: 07 00 00 00 00 20 00 03 08 30 BF FE 00 00 00 00 // ..... ...0...... 01A0: 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 01B0: 08 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 01C0: 08 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 01D0: 08 00 00 00 00 40 00 04 08 30 BF FE 00 00 00 00 // .....@...0...... 01E0: 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF // ................ 01F0: 09 02 00 00 00 40 00 04 08 30 BF FE 00 00 00 00 // .....@...0...... 0200: 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF // ................ 0210: 09 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0220: 09 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0230: 0A 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0240: 0A 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0250: 0A 00 00 00 00 20 00 03 08 30 BF FE 00 00 00 00 // ..... ...0...... 0260: 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 // ................ 0270: 0B 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0280: 0B 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0290: 0D 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 02A0: 0D 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 02B0: 0D 00 00 00 00 40 00 04 08 30 BF FE 00 00 00 00 // .....@...0...... 02C0: 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF // ................ 02D0: 0E 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 02E0: 0E 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 02F0: 0E 00 00 00 00 40 00 04 08 30 BF FE 00 00 00 00 // .....@...0...... 0300: 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 // ................ 0310: 0F 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0320: 0F 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0330: 0F 00 00 00 00 20 00 03 08 30 BF FE 00 00 00 00 // ..... ...0...... 0340: 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 // ................ 0350: 10 03 00 00 00 20 00 03 00 30 BF FE 00 00 00 00 // ..... ...0...... 0360: 10 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // ................ 0370: 10 00 00 00 00 40 00 04 08 30 BF FE 00 00 00 00 // .....@...0...... 0380: 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF // ................ Signed-off-by: Eric DeVolder --- tests/data/acpi/microvm/ERST.pcie | Bin 0 -> 912 bytes tests/data/acpi/pc/APIC.acpierst | Bin 0 -> 120 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 0 -> 5969 bytes tests/data/acpi/pc/ERST.acpierst | Bin 0 -> 912 bytes tests/data/acpi/pc/FACP.acpierst | Bin 0 -> 116 bytes tests/data/acpi/pc/FACS.acpierst | Bin 0 -> 64 bytes tests/data/acpi/pc/HPET.acpierst | Bin 0 -> 56 bytes tests/data/acpi/pc/WAET.acpierst | Bin 0 -> 40 bytes tests/data/acpi/q35/APIC.acpierst | Bin 0 -> 120 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 0 -> 8306 bytes tests/data/acpi/q35/ERST.acpierst | Bin 0 -> 912 bytes tests/data/acpi/q35/FACP.acpierst | Bin 0 -> 244 bytes tests/data/acpi/q35/FACS.acpierst | Bin 0 -> 64 bytes tests/data/acpi/q35/HPET.acpierst | Bin 0 -> 56 bytes tests/data/acpi/q35/MCFG.acpierst | Bin 0 -> 60 bytes tests/data/acpi/q35/WAET.acpierst | Bin 0 -> 40 bytes tests/qtest/bios-tables-test-allowed-diff.h | 5 ----- 17 files changed, 5 deletions(-) create mode 100644 tests/data/acpi/pc/APIC.acpierst create mode 100644 tests/data/acpi/pc/ERST.acpierst create mode 100644 tests/data/acpi/pc/FACP.acpierst create mode 100644 tests/data/acpi/pc/FACS.acpierst create mode 100644 tests/data/acpi/pc/HPET.acpierst create mode 100644 tests/data/acpi/pc/WAET.acpierst create mode 100644 tests/data/acpi/q35/APIC.acpierst create mode 100644 tests/data/acpi/q35/ERST.acpierst create mode 100644 tests/data/acpi/q35/FACP.acpierst create mode 100644 tests/data/acpi/q35/FACS.acpierst create mode 100644 tests/data/acpi/q35/HPET.acpierst create mode 100644 tests/data/acpi/q35/MCFG.acpierst create mode 100644 tests/data/acpi/q35/WAET.acpierst diff --git a/tests/data/acpi/microvm/ERST.pcie b/tests/data/acpi/microvm/ERST.pcie index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d9a2b3211ab5893a50751ad52be3782579e367f2 100644 GIT binary patch literal 912 zcmaKpO%8%E5QPUQ|KVrvh9h_c12J)@5f?5!k_Ygv*jGA8UW7?#`}+D#XXyDpKHiZ? z@anI_W$gOrZRl(SB7!yMqx}#E4EC&a5=}m^g_!0^0`kEl)DOuIXM6D@@*xq*8vyqH z)b0KTlmlgmH~xt7vG|r~o3y%?)O;u>A)b0RYv*3;_TD literal 0 HcmV?d00001 diff --git a/tests/data/acpi/pc/DSDT.acpierst b/tests/data/acpi/pc/DSDT.acpierst index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bb0593eeb8730d51a6f0fe51a00a00df9c83c419 100644 GIT binary patch literal 5969 zcmb7I-EZ606+c&`Z0bs~DVd3rxNQU{+17PvBspKjfFTko+lnoj5#_W44T!Q_OwKZt zNNb>p5lnFb*Ui&1&BGpsO$pT3_)pk?J?$-jLiezjJ$6`=r)uYry0Rn7KuJIp&j)|! zckaizM=~sYzU*-I~PkUtAn>Dr`~u=;o(_O$t$PK8~R}U#&P6`{0u*{ zz`m8fl|Wu#ucTKJu-TjNQ`rN~%rBccG0yWwF_}_zQl+X71|-_g)Pr`x1*Xgb!&xdP4yUPQ>QealcAR5Lj8F@vR~&d_hFrfVBOumUtb3< zL8GI#8|W0leXv|!GGL=~vE5*uM7z%Af!czNXYqlQL#IT$!9xR0zORu68XY#=M-SGy z3b+$tZv(*Hu4BBt4F>MUo>Padde^ZZU%V_4TiQ&t&6ruaomTLcp<9-2bBZ=qyp40+ ziEQ&$6L)c>%cI)0;%&VWL5E5@F~Or>jX}g)!VlmH>3A6L#ZGj;i8(jvxl3w$XL%gc z#4Y0Q*ces>sy7Obm6bTnr@oqih!n=P&+!w*&jZjVy;9R95=2i+)QqA9kLa1VJk2ES zOh6C4;>puBt75SyO`ippr%I9Z{pk6j=(st4aP-WP=ov412KgP0p3z1}&)7R9%3U9d z&O-shXOD!>df~G};j<@%&-TL`!{M=J{^0EAj)b4{!p{wbpF1J^oV~LmWA@f?c-apx zmJl5aIOP$4%5j~Id6TV0{V^u0sG`|bSAOB2V2gb1@Ki7>g+T~D<}I$cZmy;lKl#kP zxAm*k{f|HWWb1z8<4?h6y1Bg6FLiOw7Z@DC0gGYf$3^AUwgVosAOD1e9Hex!P-c3u zY%#r3y2G$SrRg@$K+^S+fmJX`o|0}AmQ(0%hN|GcJ*{Ry{RpZVR_9(>4G!#sMm9K*-Kb2oqvI?7dL24<1WVww+F6k zrAwi@3blP`ov2|RQA!4yn|HMt+&l|rp;ky|p}*s4Bhi{tS7b7IwWYtO z($_%y0DUt+12O0t{g&d0!qm$i(>FX+UGsM;osE9mca!r!@5Ld6Jt2$-nabyyC?4*zT@l2 z4LgzF3U^-%E&8T*RhMxH{B|{Nmd$hyhrlm@q(4&m{QfcO=jBztZw|gWU^0Q+lFdc4 z;t%ATAUG5ws_1bncmXfi8SEC{UBmF!TrD{!GvtiVS87Q`#ts;JTa>Png~+QvKOAg( z=l%H)^?9Gb?Lui47fY7Bv8_MKSPiRTs@3YkU)Q{@YvnKAT;;J8U>fgQ>9qeF0+gJ! zS_V9pumOy9sSU)%^lS1X17&Pw`o1`MA>W^ePI^H@E*S%`|HOx^c$lLHVkhwcpCba771jDZ#SdZmhM`3K=q{% zNdudV5*`|Tn?lmSM!~R<_iYsI+Q3HPu(0YhlR~GImZVAKI~h z+O@D02|KpVC?DEYlCeYxd&-j!?Kerrtt;#;Pd>DJ8RM1`cI=OKE&Yg{vc{!8uv6Z~ u5j$m$OK@OMk$l8{6J=Z)1AB{Pv}@<7F~|QN>AydkHSF$IS^vS{(*FTuhT2R3 literal 0 HcmV?d00001 diff --git a/tests/data/acpi/pc/ERST.acpierst b/tests/data/acpi/pc/ERST.acpierst new file mode 100644 index 0000000000000000000000000000000000000000..f24fadd345c798ee5c17cdb66e0e1703bd1b2f26 GIT binary patch literal 912 zcmaKpOAdlC6h#XZC=fn#CoF*_7>J28jW}>wF2KFG3zs9lTPTnl;U#=7r>E_sr(1u2 z21BbPgzCU|?XhcJg=j2v%^42yj*a0!E-1hz+7)fRTZdVH1$^@dJ=xgNU*~X%LSC f$bPUMD$c~f!UAOe=l{BbPjf4ARhn#RKNjV literal 0 HcmV?d00001 diff --git a/tests/data/acpi/pc/HPET.acpierst b/tests/data/acpi/pc/HPET.acpierst new file mode 100644 index 0000000000000000000000000000000000000000..19f704abdd3909a0983232ee7b93318811f71b19 GIT binary patch literal 56 xcmeYWa1F6wU|?X};^gn_5v<@85#X!<1dKp25F11@E^2E4Qb2IwAB1LL002JR3IPBB literal 0 HcmV?d00001 diff --git a/tests/data/acpi/pc/WAET.acpierst b/tests/data/acpi/pc/WAET.acpierst new file mode 100644 index 0000000000000000000000000000000000000000..ac0db59183096ea1d93832a421015385ba93aba0 GIT binary patch literal 40 mcmWG{bPds9U|?Xhbn|r~o3y%?)O;u>A)b0RYv*3;_TD literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/DSDT.acpierst b/tests/data/acpi/q35/DSDT.acpierst index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..950c286b4c751f3c116a11d8892779942375e16b 100644 GIT binary patch literal 8306 zcmb7JOKcm*8J^`sS}m8-lAZ!|r-e8)1)zAMg>X20xpnAzWIdaSTM+usP>)Xi6z>s?qKw$p>%+@j_5TK_ut z&C2Ote1750@>f6q=Pz%*Vx<5$i@zrRo{Q)Zz8hLA;n4YHaK(6!==|F1aPgA?zbx7u zx)O!da?2J?lxp?hmEQhyUZ?ExK4$&4Uvf*U=$G3Gax2#950@FUX>jQGr_pHi7jep* zx0%y2h03bg@T*;^(ttKn)!S?M-4?SMyYp>^rFz#LiWgs~w!Na?@%qKWGyR}jW)Zc7 z5jAbU6IxC#a_3u?Vhp|c z-V@Xt8t>lz$!1XQ^C3q06?DaKb~Y1MXxYx%!jnk}BvfzzskMp+u((G_^d7yEWsX}* zbt7aUGmN@%nO(-;GYM4d?LXSu*g9k_ENU#%N}r(->g}Ih_q(eycS_uEL&G{≀$Y zd@E_1XZCpJv+hRgkdp=)qdA3hFL^J?%rg$>Jl5&DhrP+f_m8KJSi}tT3^Oo9?cDt_ z+VkC@Yh-TQmWf+Kfs3)*D&pW3dwW6kJZ8b)Z3{OpLxEcrQPZnnSTfx1#YFi z)hhZ;@5N%zsI0qdtnircR?jDTk5DukMZ1KE-Zri<%F+8iH6O6T<7IHBp(s~GhcL#5 z1#iapg4X%?E(Rz$g8{dG8eWN?)YPYkYD3Cw`^_;Y0A zu^q94T++Bs2X|opUn{JI2>^}Y)(Jn>KZ(lO#VR78A z`9$_RT|d9}#$G;?!qdst+iO)O&JCQ`Sl*^~D}kUcgCv3m%V$&Q2WFDM#SyUpoEO(P z4^SBr6Zttd!I{9u5iun+!8j98&O}H|^oC=ToGE*dWWfn$C=-Go$N7sOrSKP`RJBrqkAS zB2;x|HJw>aXI9sVP}MoF>73Ve&g(i6syY`moeP@I1zjgXRi~rrbTplgt`niEGpFgy zX*zSdPK2t?yrwg+>CEdo5vn>DHJyu^&P81(LRDu$(^=4T7Id8mRh>(k&LvIflCBe> zs`Hqp^O&adn649{suN!lc>3gfXj#*_tm{Om>O8LLJg(_HuIogo>O8@j<@il_f-@`e z%kG3=y7xn3dNKB-#yqJpPwGsBD)W@aJf$&D=}d$w^R&i1tuasQOoS@)A&vQv#(YR; zB2<|VbEb5ehdEQe;~y4G`Qk=MOnC=aw3;hg%@w^SLQ&I%ftD2mtp`n%=4NW(9ED>8 zMS!v*NFtC$VW0xXEy-ZSlKnGKR6q|66rq#`0~J_lpbC@>R6q|66d`&e4OC#`h-#_^ zDxil3iV!{GSQx0l#!;-1L&-n|REDZf7^q0gnJ`cVN(PEhx*{1ULa7r5DzKah16818 zpaRNkl7S+WI$@v!%b74x1xf}gpqxnticso=feI{V!ax-$8K{7ACK)I~c|T#G0?U~& zPz6c`DxjQ628vMXgnf}LawZulLa7r5DzKah16818paRO7WS|J8P8g`b zawZH^fs%m=C})y^B9uB|paRR8Fi-_b1}dPONd}5g>V$y`EN8+%6(|{~fN~}oC_Az;Y%GRDqI#3Mglifg+STVW0xbnJ`cVN(L&RoJj_X zQ0jz%3M^;BKouw%sDN@N87M-j69y`` z0?L_Wpa`W-7^uK$*}gaS*7zD9qM#wn1#jWCRPK6bMIPv zyI5qIJFqf^r<$8?XAXc)DK~FrKAK^3d?n~@c9YtyG>*;a-Cb*e(HT0?!P3k6EWQ!S za>>KSat$p8ndo+qJ7z6@G|%Rea5skcH^ZA4s~3d@z7BLiT|jTjgH!kmuiMOzz^_|swN_mf$_r}V5N0j&C^40P3sRt-u zRmxX+`RZ8t>JjCuarxSK`Sb&nuPNngynJn}eC>$xwYYqJy!^}ql&>r0>%4q@tbF~5 z^7XiUW4!$A1C(zlBgtAmDAJVTVo=fXq%dDVqWI;boc<7NGIB+rkj{&SOTVbCWYavWFnnto0@K7-W2q7 z_*9ulC)%c_o0tbndOCc+Or#TSQ`1d6*T?j9_^6pkC)%c_n|Mx_^>p~snMfzv^mNXt z`|H{J3qh-btrl#n*h#GUI~&i7-HC>E@&1ax->C-jDYY;;;Z0fB-zqj8)*IwUw`3=@HTz`Enep<7ZRX6V1cWuMQsy;l4md@|mmfgGl0}9Hl==#;R;WpcW z;dWXt7+3%=(V=Frr0cdkEVAbbnRJ8ddJ%B1+%00Qx!G=-5u-*t_2({fJ?N0=WVY=3 z%~EN#MBNY@N9jV&?bcpO46VT~`@k)gN>>Vv8LZxy=X#G^d@?1sHb^K5pyl`RW)zE9 zI6OHRzd#ZqYXQsd6Ia&P4#Gk!O|l-WkTISL8K&kh)Q-7<+cuAoVY=<=g?wTZv7N}c z{DqevTs9(hIWoeCZGW+D|85W(pY5P2jCRILa>3(`xGBTs&&FGETXw!2&JDJ$5z2fS zO}jpPbYkS_zDGMZsE^z1+BSN1>)GMc6EOZ{;P&lU$!KC=a1p#~JG8M_O^KaFN_dIw z&@G3yo!;tnaTB@FpKF(<4|8kI-3Yq&5yL$FX_?56!Hcd;8JoyTjJFc>>UblDd1~)^ z?>|S+H0D2km>zhp%>#P6F#}rVZZ2b)4660wxn~!75HqIv6XtZb#3Q74ZkCXn6{DcC&3_1dB0BPx^3UKjpNv+{NY8E z56<=TGbsao$N5wJyqU5R78dakJxy0giSx7jx1qQHMD2nrd@s9MZEfK(I!kD5=Bhn* z(oUM*;?73;BH!Apr|B;C_A^1LB=(FkBtHsD&xrtc%wRC%VAW&Tw8Y6-d2)_UdN7{V OmJ28jW}>wF2KFG3zs9lTPTnl;U#=7r>E_sr(1u2 z21BbPo8!z`($~)5+i2BUr&HBEVSz2pEB4AU24G0Y(N+hD|^Y6El!tgNU*~X%LSC z$X0-fGcm9T0LA|E|L2FOWMD7?GM2V5Ffej3F#P0!h{7ddihwku0+2v57svwxMxcSn X_QAxFX+{NzJ3wNL4G8yu_%Hwf>-7!+ literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/FACS.acpierst b/tests/data/acpi/q35/FACS.acpierst new file mode 100644 index 0000000000000000000000000000000000000000..fc67ecc40782bd7fe8921e430d7de67f0bfaad93 GIT binary patch literal 64 PcmZ>BbPjf4ARhn#RKNjV literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/HPET.acpierst b/tests/data/acpi/q35/HPET.acpierst new file mode 100644 index 0000000000000000000000000000000000000000..19f704abdd3909a0983232ee7b93318811f71b19 GIT binary patch literal 56 xcmeYWa1F6wU|?X};^gn_5v<@85#X!<1dKp25F11@E^2E4Qb2IwAB1LL002JR3IPBB literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/MCFG.acpierst b/tests/data/acpi/q35/MCFG.acpierst new file mode 100644 index 0000000000000000000000000000000000000000..696bc969f2cd51f2e243090c9aff8619651b2dc1 GIT binary patch literal 60 rcmeZuc5}C3U|?YEaq@Te2v%^42yj*a0!E-1hz+8Vzy>J$KZphZEJX+b literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/WAET.acpierst b/tests/data/acpi/q35/WAET.acpierst new file mode 100644 index 0000000000000000000000000000000000000000..ac0db59183096ea1d93832a421015385ba93aba0 GIT binary patch literal 40 mcmWG{bPds9U|?Xhbn