From nobody Sun Jan 25 10:15:20 2026 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769032641; cv=none; d=zohomail.com; s=zohoarc; b=Gt0UHndq0K8vO9+iAe5WxupiEv6oDxXCjzA9CFSO39LGsbplqFR1SvAL8ICJeAOXsJ53XDZI+5s6JkeJBUdwiZA67jniHi6KiJmN+y0AAAjohcws3CdyRFsfSRgsZz0rTzcettdRBH9ePfqBTxfG4qDNQC8HOG8Rqoo9aM9aiMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769032641; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OjUmEMjjoWbNCSiwKUvl5kVXL6ytJwqVR0CrllmLlis=; b=PkUzJKva8ADb8plrjIquYR/ehNH7f+2xOTJ5DH9JyCt0JXfnHmhTMFXRP2bvAMk/j46lKwkLLFFcibk1PSVJfJnGrSP146N+QT1fUIZs8gi1q+lFeAIVmXmuzY3D8JgNu8clkYGbPVKTjFmGnVmHhVzk8Ei1kbNUylN2kDrBazs= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769032641853767.2761674169683; Wed, 21 Jan 2026 13:57:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vigC7-0003pH-MV; Wed, 21 Jan 2026 16:56:55 -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 1vigBq-0003kj-F3 for qemu-devel@nongnu.org; Wed, 21 Jan 2026 16:56:42 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vigBo-0002jt-KJ for qemu-devel@nongnu.org; Wed, 21 Jan 2026 16:56:38 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-47ee974e230so2571495e9.2 for ; Wed, 21 Jan 2026 13:56:35 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-480470472f1sm18370325e9.7.2026.01.21.13.56.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 21 Jan 2026 13:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769032593; x=1769637393; darn=nongnu.org; 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=OjUmEMjjoWbNCSiwKUvl5kVXL6ytJwqVR0CrllmLlis=; b=x2jpgOBQWFAL42S/eKSoS+CuA2gsXDNrPNcVYXVTBVTzOAKTNPOtRXmk9fATFUFIbP MZmV6EhFpMmES8m6d13pPO/FtMXaedU3R+5kueDdYrcY6rtlpNMPf8DpAzHOzZp+vyCy 8lDMjCGFX7/3aj/PfvM802iTsmzpDsZTQELKXkggH0F5cqagMUBSr4c6LdO3w8kCm1/C CQOAjmGUTCbaYc1LN6m8OZrM464uC6rEq7YMhjTptAlsqE8BFCVt8ozt7zr31GIt5Vu3 dQXqIYOjQFw1k0a7UqXJQ8K8vM4kmhXKPDbzmggFbEuv83v1WgX4whW80WGssX91zMp1 JlQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769032593; x=1769637393; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OjUmEMjjoWbNCSiwKUvl5kVXL6ytJwqVR0CrllmLlis=; b=o5AK3YEZjbQbBoDaT6bpKQ9exdx+dWUHZ197YJFj4kGNdtEpk/E49G9GVcZ1dkpOxW fzTLGGaYuz1osym1W9vxLB8cV/fMGjrb5Os16K4tck9ekv+dPBzUyQ48b0eMVGQddX// V+S91uNuGJvuXTRLOo5magbMZctRk1Vvi+qR+CgwbH4TTlZa1m4y/or6qZp3bLsjTy+J cpq9YzeaANHkiOXaz0TJxMi6DEXwtre6VhxpVqvvLXfOLaOy4VM2N9NgIBKBot3Ow3xM tOVIB7sZ+fv55AdsTJDsnrg0R74eNRc48rQj/YxYCrogPLZGW0JZ98odK5AZMrH5ri9P Yg/Q== X-Gm-Message-State: AOJu0YyEiwuXIga8SQFzxyVfNs5qrx5uiSwUoJvbq2aGpmmmpFohf73t 8gtQBp+DrDkwygubP/4Ta9YLIdHjqkeAkO+v+320kQdLecI2SCQF3e/3JDyS5+G5Ka2q3QbRdha Jc14xPf0= X-Gm-Gg: AZuq6aJecAOw+Yhmf2p94MZzVJOatESZW2m9cSAqIZ9VSy9w/gC4MLEKTYdda9uded2 h0/Rf4bLm6ImS2oJ2KFedaVb1qgv62BfU8MhdsC6iXz6J39Y34aTF35YT7V5Mh7ig3anjCcHyiR FrDwkSDqMJRh+rT7rlg/RY8YhiMyEZ9XoZ6T2SLbbVgYSQGxHmLyugwjypRkxmYEWhCRcYcWKMg aP5EabwKDm1sGnwsid39nj8mWoO7WMVu9s/4pmtYh4Y6O6qyJZM/CjxEnHMHKFft4Cx6CpT8Ou8 UzlCoM9o8WrSexzvGSphH/0FxRQ3L4LrbSTedJulGcKTqsH/qVJPTQPoMEsrRZtNtuNcHfkSsRR 4XMlpxlfcEWrulPENX3WZ563Y4P1UEFQv07Vbwi8FRsfMxKFXLfLBWo/EsCs3MLN1Q7eNF1mUI1 Jzcwxk6XKcDEgi/KbJHMTShDf47/KVCot/NbJUEnsm3DtJ/V8RlfyQ75cxr+9K X-Received: by 2002:a05:600c:83c8:b0:47b:e2a9:2bd7 with SMTP id 5b1f17b1804b1-4803e7e8555mr99020665e9.19.1769032593204; Wed, 21 Jan 2026 13:56:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Ani Sinha , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 1/2] dump: Abort in create_win_dump() on non-x86 guests Date: Wed, 21 Jan 2026 22:56:21 +0100 Message-ID: <20260121215622.92966-2-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260121215622.92966-1-philmd@linaro.org> References: <20260121215622.92966-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769032644509154100 qmp_dump_guest_memory() checks win_dump_available() before calling create_win_dump(). On non-x86 targets calling it would be a programming error, so abort. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20260108161220.15146-4-philmd@linaro.org> Reviewed-by: Richard Henderson --- dump/win_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump/win_dump.c b/dump/win_dump.c index 3162e8bd487..6e07913dfb4 100644 --- a/dump/win_dump.c +++ b/dump/win_dump.c @@ -489,7 +489,7 @@ bool win_dump_available(Error **errp) =20 void create_win_dump(DumpState *s, Error **errp) { - win_dump_available(errp); + g_assert_not_reached(); } =20 #endif --=20 2.52.0 From nobody Sun Jan 25 10:15:20 2026 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769032648; cv=none; d=zohomail.com; s=zohoarc; b=dPHMuYEWvEByw0kXBdl3RYaRytydGXBTRcy68a3taoQuxBUWrBYuyjzFkzB/nAWuIcGnE5yzi83vK+p8TXuXlCde4+BGAOpiHFIPvFptv6XRZa3cF6J7h/uDhvA4EdQA9iFRs1bxqy04SWGyf+lzBCNxG8lxA8w5/WLRB5UBl10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769032648; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LX21BujlgqLNegaCHJq4WH7F5LCMmLxyoxIgzdMruqg=; b=mev3D/bfWMbnUvmR1dS716pQJacBSFnuRGw4M+og2niyZcOB1dJB9+51BWmKIT8mW0bKe90LIENZUxKeZRs9qxQ8B8UAqXJn8Z6SvSEb+Ng9aWfWnpF3YxJkZfZ+xIJSVPBfXekYmuZ4nlbUmqW9XdgdnK5wsJaeQVsY/KXB5tw= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769032648539640.0248208898754; Wed, 21 Jan 2026 13:57:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vigC9-0003rL-0M; Wed, 21 Jan 2026 16:56:57 -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 1vigBy-0003mq-9P for qemu-devel@nongnu.org; Wed, 21 Jan 2026 16:56:51 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vigBu-0002km-TS for qemu-devel@nongnu.org; Wed, 21 Jan 2026 16:56:44 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-47f3b7ef761so2407085e9.0 for ; Wed, 21 Jan 2026 13:56:41 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-480470cf1acsm16356705e9.14.2026.01.21.13.56.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 21 Jan 2026 13:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769032600; x=1769637400; darn=nongnu.org; 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=LX21BujlgqLNegaCHJq4WH7F5LCMmLxyoxIgzdMruqg=; b=LKQ8DsP70qBnkUUSELtl41pxTFdpdIMzIT2SIU94st7615Ig8VBLtFoLmlT+4iCqwP udrTfJWYpv3+sWcSPNhJnNm2RH0cO1OatH1zq2z8zXWk5S+Nub4c6Ke7g+QsSO+CtxKj pGkaQ+PDUFWa36DFYWgMRRHxHpVpfVvFDyGJ3y2+fZJmnRfisuvNjwFwUswERTGKoYxU cswPMFxzJoeH8YpkkmsfAEfuGiXQbgq130gE9vcN0ZC1eRkW7DfOOGPolCVy8qYbFBEo NL9T3CNaEOOJ+kISD3v0EASPq8ZVgPdLTgXU39480oQmbXQwEeDqdFLMWHrktmRGXi8R Zn5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769032600; x=1769637400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LX21BujlgqLNegaCHJq4WH7F5LCMmLxyoxIgzdMruqg=; b=d4612XA55CAEiFFjsnHj73KS6oMtbMeQpiKo1oQy3+oaB5B3WaVYyPTLtdGbYeBQiE FmLEQxwdpRoWPNIjxHfIJF6Rjxm17TjDeKv+VUjLNA8qxL9tlcx+JLv3xHja8AmXFUNS E6ozZ5DKj9BMdZ393TlfMulcFtEi4tMaKaVEu/s8/zpiHMBvUz+a1wjqN3rdIHv6E6T2 8YM7CKzw1qz93S/F209dP/W9R9CENIo6MurPrbkfppGXrfZMrnT4ujn5VxTbAT3Aqu32 D5CjNe6wB5ZlYjwm3QNc2LAFuupk12j4c9UfBJf+lxZZWySuUGgeWbaqhWzHW4FdzYGB xCIA== X-Gm-Message-State: AOJu0Yx/CGJSHf9cF6TDkgWlhavKCFSefHal7VbyjkGc617F7n/tU9r8 S/ZuzYxDktdlg7sE23eZQZigp2uCQ0jGOlBaZznjowMOe5I4ARhu6rxG3lZ+6cFMtP/1TlRKiGY LV+t0gYU= X-Gm-Gg: AZuq6aI0Io7YakmzSklSVXV432LEnQa5SMfcHk836YppKGlCmnDmhE5RbPSFBXeV2sm bCeGdxgLyjy/ln0JK4CFc8dnDCZ/QTnFX/e83t7vGgKl08bTHnLMg/zWnYr9LNuWa8YtTLxwVAa lgZS5O+vMHPwCaj9vF3+ojHFdL4d/JATAdND+9ud6gXzZScy0YCdFO4d2IgVBuvy7y2wJTcOV1x rFBO9Io1lrAYhSDbWNwHgWhowQ/U3OX4AxLTJahGueGdCiROVRU8Ykv4lWHg6M46GQa4idH3PG1 pJ+0c76Sq8+cOIi+y15J0Yw17EKTyzw6wq+CpYPlwjrr+CoCpGC/WZB6pCCEGejmOmGEsxI/lGB SoIhbr0hGA13MhYmIxHhQgK1VZy7L/T2U5tSzc0a18g8/DTeSLXA9Kurx4otb6EWcfGVO25nGoF 56iD7Qn1S/aK3O745GemhtxJtk42L+YYFjbOV3VK0dnryeasGUAtIlt6gDvshGeZ7D+J3LMac= X-Received: by 2002:a05:600c:34c8:b0:47d:8479:78d5 with SMTP id 5b1f17b1804b1-4803e79b7a0mr105454265e9.7.1769032599998; Wed, 21 Jan 2026 13:56:39 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Ani Sinha , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 2/2] dump: Build stubs once for non-x86 targets Date: Wed, 21 Jan 2026 22:56:22 +0100 Message-ID: <20260121215622.92966-3-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260121215622.92966-1-philmd@linaro.org> References: <20260121215622.92966-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769032650573154100 Rather than compiling the same content for all targets (unused most of the time, i.e. qemu-system-avr ...), extract the non x86 specific parts to a stub file and build it once for all non-x86 targets. Add a Kconfig symbol to only select the target-specific file with the x86 target (rename this file with '-x86' suffix). Since Kconfig symbols aren't evaluated for user emulation, the file unit is only built for system emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20260108161220.15146-5-philmd@linaro.org> Reviewed-by: Richard Henderson --- dump/win_dump-stubs.c | 21 +++++++++++++++++++++ dump/{win_dump.c =3D> win_dump-x86.c} | 20 +------------------- Kconfig | 1 + dump/Kconfig | 4 ++++ dump/meson.build | 3 ++- 5 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 dump/win_dump-stubs.c rename dump/{win_dump.c =3D> win_dump-x86.c} (97%) create mode 100644 dump/Kconfig diff --git a/dump/win_dump-stubs.c b/dump/win_dump-stubs.c new file mode 100644 index 00000000000..96c1095c4e1 --- /dev/null +++ b/dump/win_dump-stubs.c @@ -0,0 +1,21 @@ +/* + * Windows crashdump stubs + * + * 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, "x86-64 Windows guest dump not built-in"); + + return false; +} + +void create_win_dump(DumpState *s, Error **errp) +{ + g_assert_not_reached(); +} diff --git a/dump/win_dump.c b/dump/win_dump-x86.c similarity index 97% rename from dump/win_dump.c rename to dump/win_dump-x86.c index 6e07913dfb4..d893dea7f19 100644 --- a/dump/win_dump.c +++ b/dump/win_dump-x86.c @@ -1,5 +1,5 @@ /* - * Windows crashdump (target specific implementations) + * Windows crashdump (x86 specific implementations) * * Copyright (c) 2018 Virtuozzo International GmbH * @@ -18,8 +18,6 @@ #include "win_dump.h" #include "cpu.h" =20 -#if defined(TARGET_X86_64) - bool win_dump_available(Error **errp) { return true; @@ -477,19 +475,3 @@ out_free: out_cr3: first_x86_cpu->env.cr[3] =3D saved_cr3; } - -#else /* !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) -{ - g_assert_not_reached(); -} - -#endif diff --git a/Kconfig b/Kconfig index 63ca7f46df7..26388c12838 100644 --- a/Kconfig +++ b/Kconfig @@ -1,6 +1,7 @@ source Kconfig.host source backends/Kconfig source accel/Kconfig +source dump/Kconfig source target/Kconfig source hw/Kconfig source semihosting/Kconfig diff --git a/dump/Kconfig b/dump/Kconfig new file mode 100644 index 00000000000..cd6e8f2e137 --- /dev/null +++ b/dump/Kconfig @@ -0,0 +1,4 @@ +config WINDUMP + bool + default y if X86_64 + depends on X86_64 diff --git a/dump/meson.build b/dump/meson.build index 4277ce9328a..26e1561ed48 100644 --- a/dump/meson.build +++ b/dump/meson.build @@ -1,2 +1,3 @@ system_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo]) -specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: files('win_dump.c')) +specific_ss.add(when: 'CONFIG_WINDUMP', if_true: files('win_dump-x86.c')) +system_ss.add(when: 'CONFIG_WINDUMP', if_false: files('win_dump-stubs.c')) --=20 2.52.0