From patchwork Thu Feb 23 23:17:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 656013 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp600790wrb; Thu, 23 Feb 2023 15:18:41 -0800 (PST) X-Google-Smtp-Source: AK7set8wMxplZ+pOk1wQ4KwwjxAfEInvOGLuVWBk9DhxR3NsihILHmIlGiOG5zZyiQaOXnThsOfS X-Received: by 2002:a05:622a:15d0:b0:3b8:2e92:94e7 with SMTP id d16-20020a05622a15d000b003b82e9294e7mr21589912qty.44.1677194321719; Thu, 23 Feb 2023 15:18:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677194321; cv=none; d=google.com; s=arc-20160816; b=QnWVV5ekD7CBUpOdBstMisY9NlFBfduMhvehBYlkGYUSrUqQbNaP88yDtX1C16fje1 9O+tANRbtSZYHFxIsR6Q+xRqTCn6wBscm7yUy0xRL9fl5s+gGCVN7K/NvP/NtvyQpnKO cEpmyb5OPRC5946SmG/0ANuZpMkVWwa+vN5bI8nloq9HI+n2G/75PYWmKZfYXSUQBdzW 2z+YM3sgdwCM2HXSgrI7OQbgvt7OK32HUq+tfU0EofyJUsldGQAB9SNi1wME3VCL2Bkr rbeTQeipnGQPqQkVgTIsDzUK05hQSMRgPvnpsizSPbF8CJqxTW1a7otbFu5U78L21fQP sMig== 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:cc:to :from:dkim-signature; bh=pc+uWjRhNl81loTW604SLsJvgt5iDIM0pzxWzAFHTyw=; b=Zu6oNt6WlBVHJhw0ieVMvZgbuvGzUVIuwDEsSI6yLyNwGrJhT2SKUQCHrCx9/cHDVP Ps3M604HQIB61KZH/rWTZSH7JbhAqVJnQWtYrpWtURqoPjdhQGcVLmJlNZFH2h+xdPlO h39fRYkfcEk7yAtMYLDa1I3CSfwrkSNybkfGdFQ+8bxphc4IDNuAo8xD6efAE3SoFRpu eklHSt+FwRaMcjcNA+0SkWrM7meDvRQn6t6FX27XZQ6n3oUVV/lR9GWGI0PHKqHYgW3y O+mM+pRSd6JeJr7AxHbFr6ubD7WkaRzbBoS+q8AwD/O5aYiU7gcTBKZEpL2auDSk4pcO RdgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="VwF7F5J/"; 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 x2-20020a05620a448200b00733d4b9532csi9469687qkp.471.2023.02.23.15.18.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Feb 2023 15:18:41 -0800 (PST) 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="VwF7F5J/"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVKrD-00007s-BS; Thu, 23 Feb 2023 18:18:35 -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 1pVKrC-00007k-2i for qemu-devel@nongnu.org; Thu, 23 Feb 2023 18:18:34 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVKrA-0000Vt-5J for qemu-devel@nongnu.org; Thu, 23 Feb 2023 18:18:33 -0500 Received: by mail-wr1-x42a.google.com with SMTP id t15so12351254wrz.7 for ; Thu, 23 Feb 2023 15:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pc+uWjRhNl81loTW604SLsJvgt5iDIM0pzxWzAFHTyw=; b=VwF7F5J/WHO8Q6TQav31X0j0wxgfd5PbHwMQGiA8AzDKhhQS0MD6q2py3+7ORPaRR8 8phHUh7mTi3k4qhnOj5Z4cUKIuhyOFBSBCRJlXETmKZsyr1mUPDur9KB6TYGMYCKwpJP DVUD4wa0dr8fwEhJWZjGvVpJzarJu4SZxWLdY77F86lwnBoKrGXcjPNAsPoFtXiaMhAK 4d66TUopJOWBa96fzCNFJik1ti4Kj8FwOFvFAxSzrkLDG6vMyiAHkQNcxwjhMkSQFBb6 RrzZ9KbQvPhatVttYA891GGbwG/A2kbPn+tHgYfuqD2aJ+d65DjL+H2ryDFYwj+1e+Ax oLbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pc+uWjRhNl81loTW604SLsJvgt5iDIM0pzxWzAFHTyw=; b=qm8Yu6yPW0yihcaI6OZHkP+F97m2SiiYpuOG+7uKXJpNhP+hH8eiAFacdu41rZ6re5 9hz41+RmaLmk4zg4Wy7gApjpsENmrpZK8wFYSaGoW1FtnzXnpEyCNuLnO5FSb5T6fWA0 DYtHx3pTo7PcALLMmuzAvbL34YwwgRUTVgKMjNv942HRQvhBONfnNTdVGs0b+zZ0L09F H4oUGHzZxY3jUdNDNqaxrfEU/ojIoXeygeMVYOgrk3fYQqdA+gW6Zgegg9r6niB+LvvR GMBFRyWbtuSftmuAkfQt4iSMHoklKPHygRBSKyeznc5Rt4xXHnNBn6W0SgnDNAPfG126 +XCg== X-Gm-Message-State: AO0yUKXNjCs2CJwNjlRXnwQcYYeua7e3r12Hk4XnZ3M/CCNaAgXk25jN YjqKlev567SYcupig/9w2kjFSecOomK046OZ X-Received: by 2002:adf:dcc5:0:b0:2c7:ce2:6479 with SMTP id x5-20020adfdcc5000000b002c70ce26479mr6427257wrm.40.1677194310431; Thu, 23 Feb 2023 15:18:30 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id e16-20020adfe390000000b002c54c8e70b1sm11449411wrm.9.2023.02.23.15.18.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Feb 2023 15:18:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Janosch Frank , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 6/7] dump: Build once by adding stubs for non-x86 targets Date: Fri, 24 Feb 2023 00:17:54 +0100 Message-Id: <20230223231755.81633-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230223231755.81633-1-philmd@linaro.org> References: <20230223231755.81633-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@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.29 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-bounces+patch=linaro.org@nongnu.org Extract non-x86 stubs to win_dump-stub.c. We can now build dump.o once for system emulation. Update meson. Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 14 -------------- dump/meson.build | 6 ++++-- dump/win_dump-stub.c | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 dump/win_dump-stub.c diff --git a/dump/dump.c b/dump/dump.c index b33a613d45..7cde3e326e 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -32,20 +32,6 @@ #include "migration/blocker.h" #include "win_dump.h" -#ifndef TARGET_X86_64 -bool win_dump_available(Error **errp) -{ - error_setg(errp, "Windows dump is only available for x86-64"); - - return false; -} - -void create_win_dump(DumpState *s, Error **errp) -{ - win_dump_available(errp); -} -#endif - #include #ifdef CONFIG_LZO #include diff --git a/dump/meson.build b/dump/meson.build index 2eff29c3ea..6ae07e6fed 100644 --- a/dump/meson.build +++ b/dump/meson.build @@ -1,4 +1,6 @@ softmmu_ss.add(files('dump-hmp-cmds.c')) -specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo]) -specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], if_true: files('win_dump.c')) +softmmu_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo]) +specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], + if_true: files('win_dump.c'), + if_false: files('win_dump-stub.c')) diff --git a/dump/win_dump-stub.c b/dump/win_dump-stub.c new file mode 100644 index 0000000000..87cb699e3d --- /dev/null +++ b/dump/win_dump-stub.c @@ -0,0 +1,23 @@ +/* + * Windows crashdump stubs for non-x86 targets + * + * Copyright (c) 2023 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "win_dump.h" + +bool win_dump_available(Error **errp) +{ + error_setg(errp, "Windows dump is only available for x86-64"); + + return false; +} + +void create_win_dump(DumpState *s, Error **errp) +{ + win_dump_available(errp); +}