From patchwork Mon Jun 21 16:27:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 464534 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2751867jao; Mon, 21 Jun 2021 09:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSNVQvpgJPH7WxrR9ueElpah3z1TB4sfH0vG4vCl0z567+gvSKzJl+ojJpy+u8oa1bHLoZ X-Received: by 2002:a17:906:190c:: with SMTP id a12mr16680988eje.491.1624293174854; Mon, 21 Jun 2021 09:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293174; cv=none; d=google.com; s=arc-20160816; b=WpD77bxNFy9Nq0byqC1cUq7nc25yWC8nt9s+bAh6HuF3j2k0humngyh3EjzZ0UaFQt wKZRYiF2ifksUPViudniMc1b3MZbVMs213tvmmF7niU0MXHcyS31ip1ZT0dFGl3K0KGm qyKs7+qEVYbXBiJ2cqkqKWF6xqh7ri43zZGz/Ir2pKo9kFYBzhTty8cH2tIV3SKxOwxR tcpQ/o1QUBb0vy47BPCkJ3tcVlZbtNTLMTGmndjZI4Ki72rM4a4HCN3/OuOJxpzM79Wl z2u8dd4DVVezll5937FRTXUWSTtmvyDWJQR7cw1q4/XQ9np+iqnsWP/8D1eVUYPbvHg3 4sOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=SM3QkhRywuOpgQl00XhRFMmxWkvrw2KqqZIARSUsh7Q=; b=Ou865hUqNJK33dKA/uxPYk5XZRcA0a8NsWm9rJIIFyXpSNWw0m8+f5g8+b/cb6Zya0 DwV8Ibo9s5S0wTCvxiZ/p1Oq/qZwjOEEYug43dV+0AHFlmlitqNO/GBOh0Mfdrx09Zbt tRyn+1EQPwnEU+WiQjcb8yeITZq1NxOpwnbf4x6AFsbK9EXSEl9Y4gSMbr5Yv3ix022m cido7FbtBHkQacou0LJoH3rvp4wKXAYeuHFyrSVqkP8WgC8Zudew04IWbljR2muoLYuS LMtmw1VUDgsdD5WXrD19E8xzafvQetl+Fy2cS5GPBCCidHb8DIsdxO4wQuWNN6a2vwSM 44eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lr3kXvpA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n15si1124291ejl.339.2021.06.21.09.32.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jun 2021 09:32:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lr3kXvpA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvMqz-0004So-RG for patch@linaro.org; Mon, 21 Jun 2021 12:32:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvMmv-0006z4-8X for qemu-devel@nongnu.org; Mon, 21 Jun 2021 12:28:41 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:33743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvMmr-0007RN-FF for qemu-devel@nongnu.org; Mon, 21 Jun 2021 12:28:41 -0400 Received: by mail-wr1-x42a.google.com with SMTP id d11so17999704wrm.0 for ; Mon, 21 Jun 2021 09:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=SM3QkhRywuOpgQl00XhRFMmxWkvrw2KqqZIARSUsh7Q=; b=lr3kXvpAjMHRSnGrzDJVNyYbx+Ord6Vu6mp+B01Or+bcPvPUKuDggQHEDxmla2hlOX GCvXz6TYKBzyeB1HmqMZCbqBs9qAhKpUS9uxFWhC92ZkvQX6XC5C5doTbwXvcWoyhQjz sQnoiFl1kV8Q/Vczo+jilJZzWiUABSDVxtjpemek5M9RCcvG17MVku9ENqfWeFgMCcTd O4REfGk36mHaJ60ZgQ5M9/eAa5CMWsk2H/yF/69Cn5zm/SA5s8CBFVCgCoaFagviYCe+ Otmy9UxUrzP1UyU8ex63UGxzUI1LeTsz9A2XyzBMCjuHG81SWDnZlWh1Le+RLCAd6uyU snHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SM3QkhRywuOpgQl00XhRFMmxWkvrw2KqqZIARSUsh7Q=; b=Eo94FsZDzy75DS2MUmXE1hn26EzwWU2IlNs4TJtXRzlGCXZiC0F+uhBb5Asc9GhBIZ y4IU2XOzTK5E0eSQU04VJxCc6/zDt4ec/6bxA5Whcyc55JuFwBgKVWh5exIn84sCZtAU +ixdCjSBrq1j0JPRmZkZTZzf+0eMkD6MiaIbbVgcdZJ9wQamMjKIYmUtQWYyU121moxu zbMTuxPGQUolPFq99p1UseP0Ct59GxhScywoYOSCJE1APBD04xnGGzEOSubq8mdU/ks1 dz8J1XsVNH/qE/RPLTofo8g2CEu7S5DYxG7MHusuOkscq01W0ZsQ/7poa0XGoH6lag+W qulg== X-Gm-Message-State: AOAM532dpi6sH3Sgf0awRMfUEHsvlrnhhGFToz6K9GBjM8NTRkNAdqes 3Mi6fGz1xLDlQRgO8nN8g9B296pDxQy1QgSB X-Received: by 2002:a5d:4445:: with SMTP id x5mr20012088wrr.356.1624292915810; Mon, 21 Jun 2021 09:28:35 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n65sm11615496wme.21.2021.06.21.09.28.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 09:28:35 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/57] hw/acpi: Provide stub version of acpi_ghes_record_errors() Date: Mon, 21 Jun 2021 17:27:37 +0100 Message-Id: <20210621162833.32535-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210621162833.32535-1-peter.maydell@linaro.org> References: <20210621162833.32535-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Generic code in target/arm wants to call acpi_ghes_record_errors(); provide a stub version so that we don't fail to link when CONFIG_ACPI_APEI is not set. This requires us to add a new ghes-stub.c file to contain it and the meson.build mechanics to use it when appropriate. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Dongjiu Geng Message-id: 20210603171259.27962-2-peter.maydell@linaro.org --- hw/acpi/ghes-stub.c | 17 +++++++++++++++++ hw/acpi/meson.build | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 hw/acpi/ghes-stub.c -- 2.20.1 diff --git a/hw/acpi/ghes-stub.c b/hw/acpi/ghes-stub.c new file mode 100644 index 00000000000..9faba043b85 --- /dev/null +++ b/hw/acpi/ghes-stub.c @@ -0,0 +1,17 @@ +/* + * Support for generating APEI tables and recording CPER for Guests: + * stub functions. + * + * Copyright (c) 2021 Linaro, Ltd + * + * 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 "hw/acpi/ghes.h" + +int acpi_ghes_record_errors(uint8_t source_id, uint64_t physical_address) +{ + return -1; +} diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index dd69577212a..9b7fa75719c 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -13,13 +13,13 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCI', if_true: files('pci.c')) acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.c')) acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device.c')) acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c')) -acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c')) +acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'), if_false: files('ghes-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_X86', if_true: files('core.c', 'piix4.c', 'pcihp.c'), if_false: files('acpi-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('ich9.c', 'tco.c')) acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c')) acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c')) acpi_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c')) -softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c')) +softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c')) softmmu_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss) softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-build-stub.c', - 'acpi-x86-stub.c', 'ipmi-stub.c')) + 'acpi-x86-stub.c', 'ipmi-stub.c', 'ghes-stub.c'))