From nobody Wed May 1 11:33:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1667828412; cv=none; d=zohomail.com; s=zohoarc; b=H9BvdGn7uJMcyydTWJGSPGkA8cd00AdCmJxO+1obrh2RWuatsyp2sy4iZb/lTxSLeVATRxpg1gxCOK4/aDBa2h/CU73q1UGuXDVB1cTIoZQ+R4Ca5udhH4P6CSjO6sS4qoXLSn74m0sCtRY3iRUMpN9xzJwLp3sCpjzb5e1PTjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667828412; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=ZUQwD6j+JGi6SjXn5T8pFaR+MHmOjc+TeICPHERrQMM=; b=X5Uxd0vrriD8QUtVW+5i7Ud8Zn2TAxptfjUpxPk8tXjlef7hO6fMqijsIbn+nlWBKXYYeog55xpJLKRWbYYJyHiNuApuq+7LtR7i5ouLH+gAKucIlYinpSfYvhGqnIGJy4ed3MizmIJWTon1sk0dEXOG6hGgKO69oUsFXrK1dzQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667828412890695.9577623380803; Mon, 7 Nov 2022 05:40:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1os2Lo-0004oE-1y; Mon, 07 Nov 2022 08:39:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os2Lm-0004nw-2A for qemu-devel@nongnu.org; Mon, 07 Nov 2022 08:39:42 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1os2Lk-00068K-D2 for qemu-devel@nongnu.org; Mon, 07 Nov 2022 08:39:41 -0500 Received: by mail-pl1-x631.google.com with SMTP id d20so10017826plr.10 for ; Mon, 07 Nov 2022 05:39:40 -0800 (PST) Received: from anisinha-lenovo.ba.nuagenetworks.net ([116.73.133.26]) by smtp.googlemail.com with ESMTPSA id w68-20020a626247000000b0056c063dd4cfsm4512542pfb.66.2022.11.07.05.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 05:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZUQwD6j+JGi6SjXn5T8pFaR+MHmOjc+TeICPHERrQMM=; b=rxmUEJ6ygnPUVw4IcD3ZfkBwGlWpOJWXMpjdT9dgbO59eBLAskb2GdV03308FXSceb uJLHcbEQVZn9NKnpOb5zsC4oLEsZEouXSYKWiTKEgjYb/EdWnHHMIXiNBbReKqtTsjqV Y8SWk3/juOMlaXcZsgCN7wRj/6lff3lHCKdCXjpD/351hWr7iI8XFpCyCHRVU8eYtkw2 CjNV5SuwLwCB4uxCiM8RWHQoRD4bqIYTEbfcFDssBNk9YWc75NoDN1kTVEbtGTMBg5Bv KQhsL4igmBdkctI5+BtmOiYbDfk+E+zoaMr/AZKgePTHljVpWEW/kbcLbXRvqZX0kphu Ettg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZUQwD6j+JGi6SjXn5T8pFaR+MHmOjc+TeICPHERrQMM=; b=4J1nMNXGr6O0YTPUrFiENYAqmFmovtC6AREDWf3gJ66C7jvA6YNnFnFNOeeQkZjeXO Bgts61CVfCrpLGkcn8/ulJCaHV0Gt5z3lrYE7EXW0NNNh7ORGJqchMqWw0fPPD23qwju M2gcC/GFoCSbe+H3DaTeLFM9h8bVne/rx1aRafiv182ChxO2dFDMM6vm+7+4dr73t0RY uG1zcT6Av7XuJMupG0bpyHIKT7uWwylzZumjFaOx/QGri7Afw1G24uvsDRXM5wCFJk3T XrwPber6ohjcr3tu9zTOyvWJ2ewrQA737KX6GJkcKEO0UiHGtcp/sgsDfoqVy3hRcnUL mAIg== X-Gm-Message-State: ACrzQf0QEEBOSkfw0bjyg3IbQqW9+sIagZQqoAmhahSrzjHJ8ETQZkhx Ipx7iC8gi74SzZ+Lob28g3NYZA== X-Google-Smtp-Source: AMsMyM4p2eD/x9sYeCg/GnC7ptAtlkByDv2blh44Zf870LmBbGPNQ/tvrctHk4XsIbvP8xwlMVMcLA== X-Received: by 2002:a17:90a:db82:b0:212:d76f:b9e6 with SMTP id h2-20020a17090adb8200b00212d76fb9e6mr775920pjv.224.1667828378874; Mon, 07 Nov 2022 05:39:38 -0800 (PST) From: Ani Sinha To: "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Cc: qemu-devel@nongnu.org Subject: [PATCH] hw/acpi: fix breakage due to missing aml stub definitions when acpi is off Date: Mon, 7 Nov 2022 19:09:20 +0530 Message-Id: <20221107133920.865060-1-ani@anisinha.ca> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::631; envelope-from=ani@anisinha.ca; helo=mail-pl1-x631.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @anisinha-ca.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1667828414121100001 Content-Type: text/plain; charset="utf-8" Some HW architectures do not support acpi and CONFIG_ACPI is off for them. = For those architectures, dummy stub function definitions help to resolve symbol= s. This change adds couple of dummy stub definitions so that symbols for those= can be resolved and failures such as the following can be fixed for or1k target= s. Configuration: qemu/build $ ../configure --enable-werror --disable-docs --disable-nettle --enable-gcrypt --enable-fdt=3Dsystem --enable-modules --enable-trace-backends=3Ddtrace --enable-docs --enable-vfio-user-server --target-list=3D"ppc64-softmmu or1k-softmmu s390x-softmmu x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu" actual failure: qemu/build $ QTEST_QEMU_BINARY=3D./qemu-system-or1k ./tests/qtest/qos-test failed to open module: /build/qemu/qemu/build/qemu-bundle/usr/local/lib64/qemu/hw-display-virtio-v= ga.so: undefined symbol: aml_return qemu-system-or1k: ../util/error.c:59: error_setv: Assertion `*errp =3D=3D NULL' failed. Broken pipe ../tests/qtest/libqtest.c:188: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped) Aborted (core dumped) Signed-off-by: Ani Sinha --- hw/acpi/aml-build-stub.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/acpi/aml-build-stub.c b/hw/acpi/aml-build-stub.c index 8d8ad1a314..89a8fec4af 100644 --- a/hw/acpi/aml-build-stub.c +++ b/hw/acpi/aml-build-stub.c @@ -26,6 +26,16 @@ void aml_append(Aml *parent_ctx, Aml *child) { } =20 +Aml *aml_return(Aml *val) +{ + return NULL; +} + +Aml *aml_method(const char *name, int arg_count, AmlSerializeFlag sflag) +{ + return NULL; +} + Aml *aml_resource_template(void) { return NULL; --=20 2.34.1