From patchwork Mon Feb 7 07:54:06 2022 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: 12737020 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6712DC433EF for ; Mon, 7 Feb 2022 08:21:02 +0000 (UTC) Received: from localhost ([::1]:52430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzGf-0005hd-82 for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:21:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyrA-0005gk-VY for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:54:41 -0500 Received: from [2a00:1450:4864:20::42e] (port=39550 helo=mail-wr1-x42e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyr9-0001rK-D8 for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:54:40 -0500 Received: by mail-wr1-x42e.google.com with SMTP id v19so8221651wrv.6 for ; Sun, 06 Feb 2022 23:54:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PVkRMBzSnCzUb/1YoxCR3lmLhVkUK13v7U39yfAjD14=; b=CrSn28STizFxqI9i4EF98kh4gj6bZ63KlRJzs7LNEEsBNR7IHedgWvKaNPFn5SVDen esT5Sk9DwxKeBDJZh5wlkwvR91gPX9zh7aM84Vhlxgfz1o5QMJeniypGv37qtsGvcYdg AIEUeAQYuV8WEnOeqM8gnJxC73rBYfG4lwalcIJxeYDUZkC2zdd4oEOuaHjU/CiE1coK gyexdiGt5C7cioQok44vfp6nxqfCa4lYY/jVdFTJz/WhWIR5+7s2wst7w9eUTZ/JF8Et H9aR5krJHju/ZtcYr7C6L2WSemcWuBNLVEbMPxxr0Q2a/HibsYF9t4FiZSf8pBXw+mCU wUBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PVkRMBzSnCzUb/1YoxCR3lmLhVkUK13v7U39yfAjD14=; b=rW4hZ7mtkcWriWXjWa2J9p5vY3lu/oZGXFwRBf7JjIRh9YY8/ppAWNM7l9KtMp+xgk haVpjcAZTwkaRYMdeSrGHXYcb98m5+uj3c4UW1R0elq3nazowAW2oR554PPhjiOMRSpq UzX3ukqxjeFtDwaKrbWOze63RduIGNazw3YF29mC1ovAAZEgj5/ZMAVCJbRW7QTbdoOM Kn3q0/J9mggSKCJKiJGJcy9kUxqZISaARB0BHyeF4J4x24aj52HQ/jsvCzlSN1D8gVdL WObsuhL3qd7cJt0TRdAWAlRzH/8KlJ4X9Nwv+MR3UNVpmiq1Oh8Szpzv3uu6AXdCLffV Im7g== X-Gm-Message-State: AOAM530Msgprm4jAoamYGPiutuYV9FHPslt9p5NwYgnA0149qa44zYIR pJ/GRd0PP+MIAdMsJ7iuJ+cQShzxO9s= X-Google-Smtp-Source: ABdhPJxf+ABYj7/dhYku0RV0BVZcpcem7czn7cuIn7AwLesiG2/Xp+XSoy0KsLiZSrbXXV8KKnxZxw== X-Received: by 2002:a5d:480c:: with SMTP id l12mr6813768wrq.540.1644220472825; Sun, 06 Feb 2022 23:54:32 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id i3sm6351986wrq.72.2022.02.06.23.54.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:54:32 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH v3 01/21] accel: Restrict sysemu stubs to system emulation Date: Mon, 7 Feb 2022 08:54:06 +0100 Message-Id: <20220207075426.81934-2-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Reviewed-by: Thomas Huth Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/meson.build | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/accel/stubs/meson.build b/accel/stubs/meson.build index 12dd1539af..0249b9258f 100644 --- a/accel/stubs/meson.build +++ b/accel/stubs/meson.build @@ -1,4 +1,7 @@ -specific_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c')) -specific_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c')) -specific_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) -specific_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c')) +sysemu_stubs_ss = ss.source_set() +sysemu_stubs_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c')) +sysemu_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c')) +sysemu_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) +sysemu_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c')) + +specific_ss.add_all(when: ['CONFIG_SOFTMMU'], if_true: sysemu_stubs_ss) From patchwork Mon Feb 7 07:54:07 2022 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: 12737019 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2F330C433F5 for ; Mon, 7 Feb 2022 08:16:51 +0000 (UTC) Received: from localhost ([::1]:51258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzCb-0004o5-SJ for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:16:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyrT-0005oT-7p for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:00 -0500 Received: from [2a00:1450:4864:20::42a] (port=47060 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrD-0001rl-Ty for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:54:57 -0500 Received: by mail-wr1-x42a.google.com with SMTP id r29so5169089wrr.13 for ; Sun, 06 Feb 2022 23:54:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HlFCuXpNKMgKtSobhP2+/ylmEOSJUiLMiQZ2aHtDlr4=; b=qlF4nelG8NzZW+DiOh2XDcUqD9Q2GWrr14PSweOmTIcjhkRtarNbGCqCWVDPzHNFyq MUxM8RPHvFsSnkxJ9NUTIc52gVpUR9aTqkRA6gbdfwXxUv25I1wZmLEuOKlyEJ+AYsWb M74nledhuySLOTqkXbSj7mxpmTVYAhOkTMayYDSHPU3uw5XDXKNxwVK5PlH6r5sy0izG +GbZRPxHCH4w6IErTM4AosLy2wrKtpQA2FFJoA0YM+jH/mFyAYzfTU9STSmegEQ9L+yo KiC0giKzGG2Dwrh8EeYCs5ahv4CfqhRll33si52/5CxpHlofubhPBbDeEZFA8Gf8LDnU CigQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=HlFCuXpNKMgKtSobhP2+/ylmEOSJUiLMiQZ2aHtDlr4=; b=Jd/HyK+0Y8nWMkxDXhTYsEQpsIL/JDecNrN9DsHIoMCjGJYTPmFlD7EAJZugaUbJOt xEe6q6hQTrSJ04bRGHxt4qX3yFeCU2Ex3ZRUciuNxcw4T2g5daF5qBn9qGFU3c5pDxiS E0iipdCY74gOiL1FOjxFbnOZsEyAEFoPWRDaoi91gZVTj4PQZsKQHu6uumlgiGeP98o/ aKTaBdlc+4p8zTvH83xlPNhjG8Bp2BuA0e206eIp6QfflnxYHnKBSaWxmXy9EyokgWmR pF71ifsod5acZ+0fqSUQXKAzUz90F8/qBiRfwUgsIfy5emrRyg/SIGB7WzwjNqgMDJ9I F96Q== X-Gm-Message-State: AOAM532Gn1sGPVvVmTK7xre83UXIMbnPCH1/EmQeoZLvVrflNpo3jdCy y0xBntUZfVDgQF3GiA8y4mRATY3p5DY= X-Google-Smtp-Source: ABdhPJwisWKcewenze1KpIEDhuOLPYBLdxe/kBjPGR1f3ppM0CrVQ0y0VcBR8PqV+PHojE6cf0JP/A== X-Received: by 2002:a5d:68cd:: with SMTP id p13mr5474400wrw.537.1644220477286; Sun, 06 Feb 2022 23:54:37 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id i13sm10677302wrf.3.2022.02.06.23.54.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:54:36 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 02/21] accel/meson: Only build hw virtualization with system emulation Date: Mon, 7 Feb 2022 08:54:07 +0100 Message-Id: <20220207075426.81934-3-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- accel/meson.build | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/accel/meson.build b/accel/meson.build index dfd808d2c8..b9a963cf80 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -2,12 +2,14 @@ specific_ss.add(files('accel-common.c')) softmmu_ss.add(files('accel-softmmu.c')) user_ss.add(files('accel-user.c')) -subdir('hvf') -subdir('qtest') -subdir('kvm') subdir('tcg') -subdir('xen') -subdir('stubs') +if have_system + subdir('hvf') + subdir('qtest') + subdir('kvm') + subdir('xen') + subdir('stubs') +endif dummy_ss = ss.source_set() dummy_ss.add(files( From patchwork Mon Feb 7 07:54:08 2022 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: 12737015 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E80A8C433EF for ; Mon, 7 Feb 2022 08:08:13 +0000 (UTC) Received: from localhost ([::1]:46128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGz3q-0000mm-IC for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:07:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyrK-0005lH-OK for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:54:51 -0500 Received: from [2a00:1450:4864:20::436] (port=41980 helo=mail-wr1-x436.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrI-0001sE-EX for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:54:50 -0500 Received: by mail-wr1-x436.google.com with SMTP id k1so6597055wrd.8 for ; Sun, 06 Feb 2022 23:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AcmG4IJ1yLpI5b/+S7s8QOjnnOsTRxndw2MozSO6LEU=; b=Ql6OiBq4eP17Zg1ewj9LIPLhAEPNyTpglQQuQYdEJEK4N5cFAHVSopLErepeZtVELP d374bfI7flFzhre61vaa7iZFTJBIA7jyTPhPtvJAiGTloeUIZkogasO8BHrYCkbK6w+N gurXbm8ArTceZ8TLvmCUA1lkeSQuTZ4AH8fsT56mJ4YapO/aYz9fRrhdpgbkEG+HM0L1 X/032Ra0pmjNTC2XBBNHvH8p0z9QKwe72pg5plJ5w0uPrwX8lBrxRqBblbtCR/Hk0QTs WdAJU+MzGXKM22bLYTO5cpzQh71gJj+pgTh2CWp2U4hZo5YRvVuOIrXTYxLgquIO3MA1 hn+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=AcmG4IJ1yLpI5b/+S7s8QOjnnOsTRxndw2MozSO6LEU=; b=qANiFFYE93M+iMCNlpS2Jbljn9YbgIAhhjnXmmzcfsIYLblHB4dH2/34s2QKijFakf cnrga+CNMfh1BiduPOV18yYH7MtmUjhHossAgP3ZufUhQeSG8ICRNDrPS3ERy+CTpIM1 HaCIMfC5dkoaWuaXTNWk2VAsFlyLqs51c5CeeQtBCXp6Vn/VaDgLkRIAqrK7t9j1dWZ/ 0zE5L+F7bMqCzoEwH/NGvuyE8WV5wr7NA+jn8dq4jq0KZjstR67wAylFpH1aAvSPX2kv OXLVlSZICKDkoeujQrBXA1sXdTWOWR4dx93b5mJ4Ztzm91lO48vxAemUCTDRVh8nUAYO eNVw== X-Gm-Message-State: AOAM530kB1QKkAU4K5LLzifzFqyQR7LMk6TLVsTHzcWA5KizIAtZ1+Oi VevRHn00690mUUbSX1UjwRjLPvqfdaI= X-Google-Smtp-Source: ABdhPJx8/dqishgkIhvpUBMgJxru7Pwu8Inh7U0Td64m5hLSRH2LejLh0OTotVvmYFmDkJ0vBt8P/A== X-Received: by 2002:a5d:4888:: with SMTP id g8mr8850175wrq.65.1644220481965; Sun, 06 Feb 2022 23:54:41 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id y14sm9888636wrd.91.2022.02.06.23.54.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:54:41 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 03/21] exec: Declare vaddr as a generic target-agnostic type Date: Mon, 7 Feb 2022 08:54:08 +0100 Message-Id: <20220207075426.81934-4-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::436 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Move vaddr type declaration to the generic "exec/cpu-common.h" header. Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 12 ++++++++++++ include/hw/core/cpu.h | 13 +------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index de5f444b19..cd1d7328a1 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -7,6 +7,18 @@ #include "exec/hwaddr.h" #endif +/** + * vaddr: + * Type wide enough to contain any #target_ulong virtual address. + */ +typedef uint64_t vaddr; +#define VADDR_PRId PRId64 +#define VADDR_PRIu PRIu64 +#define VADDR_PRIo PRIo64 +#define VADDR_PRIx PRIx64 +#define VADDR_PRIX PRIX64 +#define VADDR_MAX UINT64_MAX + /* Using intptr_t ensures that qemu_*_page_mask is sign-extended even * when intptr_t is 32-bit and we are aligning a long long. */ diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 76ab3b851c..3f2b681281 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -22,6 +22,7 @@ #include "hw/qdev-core.h" #include "disas/dis-asm.h" +#include "exec/cpu-common.h" #include "exec/hwaddr.h" #include "exec/memattrs.h" #include "qapi/qapi-types-run-state.h" @@ -35,18 +36,6 @@ typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size, void *opaque); -/** - * vaddr: - * Type wide enough to contain any #target_ulong virtual address. - */ -typedef uint64_t vaddr; -#define VADDR_PRId PRId64 -#define VADDR_PRIu PRIu64 -#define VADDR_PRIo PRIo64 -#define VADDR_PRIx PRIx64 -#define VADDR_PRIX PRIX64 -#define VADDR_MAX UINT64_MAX - /** * SECTION:cpu * @section_id: QEMU-cpu From patchwork Mon Feb 7 07:54:09 2022 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: 12737022 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 75B73C433F5 for ; Mon, 7 Feb 2022 08:23:29 +0000 (UTC) Received: from localhost ([::1]:54898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzJ2-0007v7-46 for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:23:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyrT-0005oK-2V for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:54:59 -0500 Received: from [2a00:1450:4864:20::329] (port=53787 helo=mail-wm1-x329.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrN-0001sp-5q for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:54:56 -0500 Received: by mail-wm1-x329.google.com with SMTP id n8so9210141wmk.3 for ; Sun, 06 Feb 2022 23:54:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jEqv+UBOrkMdjzyf1FqnnCO4wjX7wiLSDLm24owZNXg=; b=RSxEy5ld4Gn0mL76cGHPnGI/KAmdbiuoFRSqy0XADud6sC+gIekUTTz3JmDRONRPAY STxgTKJqJxbVcfqIR/mCSF9okogGt6JutM3XwXnWL5aH230/fZsHuo8z1pTFyWehYH9I Ns+XCj7OHL9gwKv222wYhtqbIK+4IFgOOUEOdGjpF0T903NYRxEoFw1FxIe29qvNeAKa k3m7vTARt8WTJ6ELA42RAEgb7SipyX3N4W5m5nHaDMeBGxLvJ3h2B3noar7N1WsjmBGl qCEFkwWcIJquRjvGLQqevBbZYfYyCnINBZbbnh7LFXJxW+9Hs8bzvXhPJTCYZk+kQUhc hSGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jEqv+UBOrkMdjzyf1FqnnCO4wjX7wiLSDLm24owZNXg=; b=gBgmTiRUoR4tUEHtg2ffAx2PpXlOFgOEjijZSDNUG4MamFfwAp7TOkKw2VcmuLWP68 nXe6U6jJMRzBng4Htk3UWh3NIpYe4onrYemVGLdl1SLd3SDE4tbMfHr2VbALyZXjkp3g ZBIbH2jPd8aRlHC9In7AO/6+WoG7vXsQBQ4Z32RwSWfRU5mlwgtPZJr0j5sIAX3z1TYT SKm3FL0yOrR9dFVQM8yYuA93f91nOYNF1sqgtYrOK78TdVGCuaKWbp5+aHRmywEuMNEV nNj8PjZXZe/Tu0XsKhmmON7d9/LSqJ5/Z2AeeFvtWdxa2GLX2TfvcWTvGOCCINqDRq1W sHxA== X-Gm-Message-State: AOAM532n7cO0NOetORRE3lplQkL856DqOWSDBmtB/aNAL8qojnjxvWtx dsuJ9gyxTfg8s5FX4gkJOsGQaAwIuZ8= X-Google-Smtp-Source: ABdhPJwM2MVt3OjOhM+9cdlRx++/MhgBFaJIzGx2BxmzXaHXUNGAxvwH5DRmVB+OeV04+dKhNK8C9Q== X-Received: by 2002:a05:600c:410b:: with SMTP id j11mr107771wmi.110.1644220486674; Sun, 06 Feb 2022 23:54:46 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id d7sm11605161wri.117.2022.02.06.23.54.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:54:46 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 04/21] exec: Make cpu_memory_rw_debug() target agnostic Date: Mon, 7 Feb 2022 08:54:09 +0100 Message-Id: <20220207075426.81934-5-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::329 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= cpu_memory_rw_debug() is declared in "exec/cpu-all.h" which contains target-specific declarations. To be able to use it from target agnostic source, move the declaration to the generic "exec/cpu-common.h" header. Replace the target-specific 'target_ulong' type by 'vaddr' which better reflects the argument type, and is target agnostic. Suggested-by: Richard Henderson Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 6 +++--- include/exec/cpu-all.h | 4 ---- include/exec/cpu-common.h | 4 ++++ softmmu/cpus.c | 2 +- softmmu/physmem.c | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cpu.c b/cpu.c index 016bf06a1a..97d42b6b2a 100644 --- a/cpu.c +++ b/cpu.c @@ -395,11 +395,11 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...) /* physical memory access (slow version, mainly for debug) */ #if defined(CONFIG_USER_ONLY) -int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, - void *ptr, target_ulong len, bool is_write) +int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, + void *ptr, size_t len, bool is_write) { int flags; - target_ulong l, page; + vaddr l, page; void * p; uint8_t *buf = ptr; diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 84caf5c3d9..c0f0fab28a 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -433,10 +433,6 @@ int cpu_exec(CPUState *cpu); void tcg_exec_realizefn(CPUState *cpu, Error **errp); void tcg_exec_unrealizefn(CPUState *cpu); -/* Returns: 0 on success, -1 on error */ -int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, - void *ptr, target_ulong len, bool is_write); - /** * cpu_set_cpustate_pointers(cpu) * @cpu: The cpu object diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index cd1d7328a1..8031ebc680 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -128,6 +128,10 @@ int ram_block_discard_range(RAMBlock *rb, uint64_t start, size_t length); #endif +/* Returns: 0 on success, -1 on error */ +int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, + void *ptr, size_t len, bool is_write); + /* vl.c */ extern int singlestep; diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 23bca46b07..7f15106dd9 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -32,7 +32,7 @@ #include "qapi/qmp/qerror.h" #include "exec/gdbstub.h" #include "sysemu/hw_accel.h" -#include "exec/exec-all.h" +#include "exec/cpu-common.h" #include "qemu/thread.h" #include "qemu/plugin.h" #include "sysemu/cpus.h" diff --git a/softmmu/physmem.c b/softmmu/physmem.c index dddf70edf5..eb4b3bcae7 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -3435,11 +3435,11 @@ address_space_write_cached_slow(MemoryRegionCache *cache, hwaddr addr, #include "memory_ldst.c.inc" /* virtual memory access for debug (includes writing to ROM) */ -int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, - void *ptr, target_ulong len, bool is_write) +int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, + void *ptr, size_t len, bool is_write) { hwaddr phys_addr; - target_ulong l, page; + vaddr l, page; uint8_t *buf = ptr; cpu_synchronize_state(cpu); From patchwork Mon Feb 7 07:54:10 2022 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: 12737031 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9D335C433EF for ; Mon, 7 Feb 2022 08:29:49 +0000 (UTC) Received: from localhost ([::1]:35256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzPA-0005hM-I4 for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:29:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyrU-0005pL-Vv for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:02 -0500 Received: from [2a00:1450:4864:20::42c] (port=40842 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrR-0001tU-Gq for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:54:59 -0500 Received: by mail-wr1-x42c.google.com with SMTP id s18so23108983wrv.7 for ; Sun, 06 Feb 2022 23:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FYjwyfitziA4anQcTsi+t6OEWder0Bqu4Wc+T6xItkY=; b=pwbsIvtxdJqlz8VeLntJlLJmOwuzRGfXnLyGL47iOL61zAkFmzvHru8HSpxZY5Semg AH1Ep6yOoWocD7UtNZcKG/d7FdlAZItnDIkJchLH7yZ4Xada997LnLogO9OH7ou7rYTx UuXQVT4MIx1ikAtuEhXta2KzS5m4EbPvY8Zf6gwFDYLXZ/P3nV4qW+gh7VYF06heG+CC hOdvIWvyFITaueis57joOm0VTkR7OP9/Q7mAoMSJUxu2qqF8V4UGkMh6XejYUyV4Sx3u ct4UWlQN2dxLGRox3E0CxEHABpIH+7akToPtlh61Qfhl1CnTW/j4/MTKF/RzJtYRNKVz bQgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FYjwyfitziA4anQcTsi+t6OEWder0Bqu4Wc+T6xItkY=; b=DoqAhfBmzLQVND6vb4ay/+ICWeGdnx7Mq9cJJcWzdYoC8F4ntVHkjQTdqrvcHZxAVs tXf4TEDrsaPnYIElzHE3XJBngc+2Cjw7aBcNf3XJqduaP9zwmDTs3Zrz0onzsh+TXQwP m/wpdl4UdvPu0sKSTirrFj3/3ySVWHUeTT/qBZPvF9TFv/Do1pHHdMrGDTyMBlTdO7gW pN/ZzEVVZPYttU22Bi0ixVYaNm77I1m8MYx8xP+ce/a7wFB4bmlXS3cS3SdboVHcM0TY Zh35IUcAJsN623TPpkCDoxpJKyBkw+j7cS3YyOHng1ftpEVPmy4gnZYVIIU97dAawM0F dIiA== X-Gm-Message-State: AOAM533K6p+GpKBJndXD33i4VCFB7yL3NbV1Mpyg8IjN5thQsl+xtKTx Ytimp3G0T6B1Mu4g14NX7rLc2QRpSdc= X-Google-Smtp-Source: ABdhPJwqfGATsOFe5M57foDf4uCUaBiPMSpW+MEtakDgyVtMRV+n+JkJceRR7hVH8SPlBYnQq4ZBfA== X-Received: by 2002:adf:802a:: with SMTP id 39mr8632955wrk.533.1644220491037; Sun, 06 Feb 2022 23:54:51 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id r2sm12331310wrz.99.2022.02.06.23.54.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:54:50 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 05/21] sysemu/memory_mapping: Become target-agnostic Date: Mon, 7 Feb 2022 08:54:10 +0100 Message-Id: <20220207075426.81934-6-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= target_ulong is target-specific, while vaddr isn't. Remove the unnecessary "exec/cpu-defs.h" target-speficic header from "memory_mapping.h" and use the target-agnostic "hw/core/cpu.h" locally in memory_mapping.c. Remove "exec/memory.h" since MemoryRegion is forward-declared in "qemu/typedefs.h". Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/memory_mapping.h | 5 ++--- softmmu/memory_mapping.c | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h index 4b20f1a639..3bbeb1bcb4 100644 --- a/include/sysemu/memory_mapping.h +++ b/include/sysemu/memory_mapping.h @@ -15,8 +15,7 @@ #define MEMORY_MAPPING_H #include "qemu/queue.h" -#include "exec/cpu-defs.h" -#include "exec/memory.h" +#include "exec/cpu-common.h" typedef struct GuestPhysBlock { /* visible to guest, reflects PCI hole, etc */ @@ -43,7 +42,7 @@ typedef struct GuestPhysBlockList { /* The physical and virtual address in the memory mapping are contiguous. */ typedef struct MemoryMapping { hwaddr phys_addr; - target_ulong virt_addr; + vaddr virt_addr; ram_addr_t length; QTAILQ_ENTRY(MemoryMapping) next; } MemoryMapping; diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c index a62eaa49cc..8320165ea2 100644 --- a/softmmu/memory_mapping.c +++ b/softmmu/memory_mapping.c @@ -17,6 +17,7 @@ #include "sysemu/memory_mapping.h" #include "exec/memory.h" #include "exec/address-spaces.h" +#include "hw/core/cpu.h" //#define DEBUG_GUEST_PHYS_REGION_ADD From patchwork Mon Feb 7 07:54:11 2022 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: 12737026 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DC8CFC433F5 for ; Mon, 7 Feb 2022 08:27:01 +0000 (UTC) Received: from localhost ([::1]:32794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzMS-0003wX-SX for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:27:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyrb-0005px-3Y for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:13 -0500 Received: from [2a00:1450:4864:20::335] (port=43762 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrW-0001ts-ME for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:04 -0500 Received: by mail-wm1-x335.google.com with SMTP id k6-20020a05600c1c8600b003524656034cso7967427wms.2 for ; Sun, 06 Feb 2022 23:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7MoSojEUgabMe70P0YfFDC0TBg79+bokVHqZka7FxI8=; b=FwmDpjzVhuaeimES/TC7VbCOfENZ7A2FDPjw/utyeX3OLN6kixOYzuyX0oTK+NXN8/ Pdn6dUdWHFvIp48RL5eH8Fhlo21v/8bzaT5zJ+RBnt9efoSNIPs8fI8nUfA0aasH7RQE NAT23bBeUN5I4Nl1dDP8hraUox63I6SidkDHcOuybmn5XobcRyfCPC70fi3JQ0wnwWR7 DQN6QUtuTgtq7DwMOzAaMlmICox2g/WFQmSFrjtnh6TkPBInqVDDq67xDUeJzcc7GyST wKFWYMutBcPitDAPyYx3fA11jU60yOMFDlRC1MBRNJgkJN7VYi77iuURAvDlRCwD7Ihs eQtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7MoSojEUgabMe70P0YfFDC0TBg79+bokVHqZka7FxI8=; b=xvG1xXiYKNKtD68EYKJ0pYuC5HI9J1BAiqKDe+zLEhKLIfQbw+MoaM+h9PSv48KC1p QzTe4sKidsm993xlbJscJwoSMC6UoIG0N8dEwtEE1f0AfFEAAp0pWwqKoy4MaoXFIuc5 XdVzYp2btZFbB4NxBsI2cvSwIMixcunHfrZigIOH5Z8iIzPbT9OSOWHwr7+g5N7vdGIl elWeKt8Z74n8SMjpGwtM6VDg4+fcZEZQA2YV8VlTc+ekJolZGLkNiSWSRaJhoxFwSoOB +T3D191ldC5CAVyyGUkoDwV0cX4WOwqnNoQ+UyGhqdDYvInv5FHilfSS2gZ01UT2CoAn AoiA== X-Gm-Message-State: AOAM530eshcSVBGi4qzAHNIyvuPNu8zb/hMZI68K5XzGjNvaVX2t89c8 Iebd1hYve6MFleJcgPOU8c6x9+XHjDE= X-Google-Smtp-Source: ABdhPJyfTptYRu8QqE7mAgQFJqbaQSAiN5rLGPrh8cDdeSrYQMXnzhQWJO+u60uhMPFWkTh4FiALbg== X-Received: by 2002:a05:600c:1e84:: with SMTP id be4mr9749560wmb.147.1644220495570; Sun, 06 Feb 2022 23:54:55 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id w8sm9322981wre.83.2022.02.06.23.54.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:54:55 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 06/21] sysemu/kvm: Make kvm_on_sigbus() / kvm_on_sigbus_vcpu() target agnostic Date: Mon, 7 Feb 2022 08:54:11 +0100 Message-Id: <20220207075426.81934-7-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= kvm_on_sigbus() and kvm_on_sigbus_vcpu() prototypes don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c once for all targets. Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 6eb39a088b..a5bec96fb0 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -249,6 +249,9 @@ int kvm_has_intx_set_mask(void); bool kvm_arm_supports_user_irq(void); +int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr); +int kvm_on_sigbus(int code, void *addr); + #ifdef NEED_CPU_H #include "cpu.h" @@ -261,9 +264,6 @@ int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr, void kvm_remove_all_breakpoints(CPUState *cpu); int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap); -int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr); -int kvm_on_sigbus(int code, void *addr); - /* internal API */ int kvm_ioctl(KVMState *s, int type, ...); From patchwork Mon Feb 7 07:54:12 2022 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: 12737021 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0FC85C433F5 for ; Mon, 7 Feb 2022 08:23:26 +0000 (UTC) Received: from localhost ([::1]:54824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzJ0-0007sE-1H for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:23:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyrj-0005qX-GU for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:16 -0500 Received: from [2a00:1450:4864:20::429] (port=40841 helo=mail-wr1-x429.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrb-0001vs-MO for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:15 -0500 Received: by mail-wr1-x429.google.com with SMTP id s18so23109616wrv.7 for ; Sun, 06 Feb 2022 23:55:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2OU8P6R8cOV/pc2aoajDgbitoHFkQ19LKVNZC3+dKrk=; b=Sa2OPLhTja5GQrY8XgkMuBhxRxLKiCeVPka4L4GzrOMEXSiJH3qgbBg/ddBpW94lDl sOTBxtHichL1JYUxushUMvme4QN+2hnOOR7V28F9V7NqlZWDYkDR4Lt5M3mCVByTp1Eh MLUQS0C92aYF/Ciig5/HoLrZhbv4Rd2Vgn8VRvT/BSVjumNc08uNzcW5ow6wWXb+Vj9y j5IJbJEKpliRsIZtfoGXsFNjIC9Nkf9+oxLMtq8Ax7H95+SiN9bw0i015wgbEDT35bcr pjNNyPZxTdSh6Q9OfWiX9WrhUxnkg6mdYiw7c0IiFuK6f2HylmuyDwe5dzrPj8tnqXWU X2ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2OU8P6R8cOV/pc2aoajDgbitoHFkQ19LKVNZC3+dKrk=; b=kzM9/YffpK2KIgiwABWXXZNwSX/VbUf9O+dxFdPF6UbJOw4fDwnvw4qe4lcY8G1iJ9 ujjJjGL6tuYmLgeMZEg6bQxCiEhpI9QkqyTo1Sy+d1frkcJ5t5wj84cqTKg7OeOl2lR/ NkNXD/2jD5BUlLTOCAxTwrHFs4q1/orCCx4zNoS0YmjUVDfdK7IoMbCG/JcbUNM9ceTK ZvLgmoGf6hgHHCdTaL/88/kIfld0CU0JNT/nb9rL41e7apoN7ITF3NOdDt7Y0nSXtPMw sz+29DXDiY4n6/VGDD8baliOTzoUTOZ3oecOD4IZQEKxo+sCrii9kKmaI7DEFqCl7ypY ofGQ== X-Gm-Message-State: AOAM5325z3gfbJ3PDxEl+ot5BDXonFRYdlR27fK/BU4pj9fBmI0r/a1j vqlF5OMI2Lk75bqyQkevhhsIZ3zSpl8= X-Google-Smtp-Source: ABdhPJxhz4m2c9bi/1zImbRegi2R1JTS1IQUBE1xt/JcL8meYZsx4cqWx6NjKNQ9OoJwDOybLHMm7A== X-Received: by 2002:a05:6000:2a2:: with SMTP id l2mr8812364wry.306.1644220500150; Sun, 06 Feb 2022 23:55:00 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id i13sm10678548wrf.3.2022.02.06.23.54.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:54:59 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 07/21] accel/kvm: Simplify user-mode #ifdef'ry Date: Mon, 7 Feb 2022 08:54:12 +0100 Message-Id: <20220207075426.81934-8-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::429 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Now than we only build this stub with system emulation, remove the user-mode #ifdef'ry. Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/kvm-stub.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index 5319573e00..7e0fb884b9 100644 --- a/accel/stubs/kvm-stub.c +++ b/accel/stubs/kvm-stub.c @@ -12,10 +12,7 @@ #include "qemu/osdep.h" #include "sysemu/kvm.h" - -#ifndef CONFIG_USER_ONLY #include "hw/pci/msi.h" -#endif KVMState *kvm_state; bool kvm_kernel_irqchip; @@ -80,7 +77,6 @@ int kvm_on_sigbus(int code, void *addr) return 1; } -#ifndef CONFIG_USER_ONLY int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev) { return -ENOSYS; @@ -152,4 +148,3 @@ bool kvm_dirty_ring_enabled(void) { return false; } -#endif From patchwork Mon Feb 7 07:54:13 2022 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: 12737044 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D7B70C433EF for ; Mon, 7 Feb 2022 08:53:57 +0000 (UTC) Received: from localhost ([::1]:44302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzmW-0004pl-QD for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:53:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyro-0005qv-5J for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:32 -0500 Received: from [2a00:1450:4864:20::32c] (port=34321 helo=mail-wm1-x32c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrh-0001zC-V8 for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:16 -0500 Received: by mail-wm1-x32c.google.com with SMTP id bg19-20020a05600c3c9300b0034565e837b6so6873347wmb.1 for ; Sun, 06 Feb 2022 23:55:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZQmsKcV4lDdhNynrPCvLrhHei6N11E8fzUtaypd1FmY=; b=Nb9ilO3HChfAPk20eSSSkMmxNXKFItJCwMeqRrf6Rlduf/mDpQLlzW4XizjxXmTI6P F1MhOFJPECjOd3ucfv90/lnhXHJes65EHa3imr6AQHiwU8mguzssn8gULLlFcYVOBZeY nipwN4QYz3rrwgjq++xfoqkqJWhmYlT0N/1u8Jtc3891wzE4GLrqsoXKgEJaE2vhtiXa ZWk4+aOfKhDXzdxovckRAcaSHXSfoAdzxjeIExy3manGmSCsnURNSYLWqOt8EAI6Um/T 5iLcz+0UmqEsAnQmKjfr0DhKF7Sac6iU9f7HF5TA0JdoziEZIqUqB4WhL08Z+A0Ns5oj dntQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZQmsKcV4lDdhNynrPCvLrhHei6N11E8fzUtaypd1FmY=; b=rAfkbFhAFsNqggKUxv8lYikRizzDCDcFXUAPfmxhEfUi2yzm0Rw3A+ZEz+kFBQpRPO h+a1ReJ2zRCNsTzeu1KFCcf7W8g2f5x7yruDxveyUsuarfZ9pkB+RQ4x1pU/zZWPl8/g NUVH+VJIp5H5jfCfvjSsCDNNTUF7TGmx89Zx/kUuXl4OfDp8joJdaQJGwQtNMU+ZjmuZ So2N3VDtYGHiAWogo1TnwOZNRvuzACyLEmZG+F9XzWhVYmR56dEKXVY96QihoYCL5ouS Rrltbrbiari8p588TRAAbkhDskRVvq35BozOaaIdcKzTT2Zf8vUKl5mc3OJcNSfvIw2A rthw== X-Gm-Message-State: AOAM532gqRGpMGmJKFjGc2VAwuhUrZSRrvfLDhTvqMk1KSDXj12uQ3Md uzDM3h/pvpwlqFbZ/3OqmLidRIvvdWg= X-Google-Smtp-Source: ABdhPJwJnazx6SDyGNjuQ2Tt2GJo2a9sYuCY8wDIiPs18T7OERJ/MZARQj0IY+3iUqg5JB3QtkoDZQ== X-Received: by 2002:a7b:ce9a:: with SMTP id q26mr2766413wmj.141.1644220504587; Sun, 06 Feb 2022 23:55:04 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id b15sm1421622wri.96.2022.02.06.23.55.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:04 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 08/21] accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE Date: Mon, 7 Feb 2022 08:54:13 +0100 Message-Id: <20220207075426.81934-9-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Mirror "sysemu/kvm.h" #ifdef'ry to define CONFIG_HAX_IS_POSSIBLE, expose hax_allowed to hax_enabled() macro. Suggested-by: Richard Henderson Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/hax-stub.c | 2 ++ include/sysemu/hax.h | 18 ++++++++++++------ target/i386/hax/hax-all.c | 7 +------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/accel/stubs/hax-stub.c b/accel/stubs/hax-stub.c index 49077f88e3..2fe31aaa9a 100644 --- a/accel/stubs/hax-stub.c +++ b/accel/stubs/hax-stub.c @@ -16,6 +16,8 @@ #include "qemu/osdep.h" #include "sysemu/hax.h" +bool hax_allowed; + int hax_sync_vcpus(void) { return 0; diff --git a/include/sysemu/hax.h b/include/sysemu/hax.h index 247f0661d1..bf8f99a824 100644 --- a/include/sysemu/hax.h +++ b/include/sysemu/hax.h @@ -25,17 +25,23 @@ int hax_sync_vcpus(void); #ifdef NEED_CPU_H +# ifdef CONFIG_HAX +# define CONFIG_HAX_IS_POSSIBLE +# endif +#else /* !NEED_CPU_H */ +# define CONFIG_HAX_IS_POSSIBLE +#endif -#ifdef CONFIG_HAX +#ifdef CONFIG_HAX_IS_POSSIBLE -int hax_enabled(void); +extern bool hax_allowed; -#else /* CONFIG_HAX */ +#define hax_enabled() (hax_allowed) -#define hax_enabled() (0) +#else /* !CONFIG_HAX_IS_POSSIBLE */ -#endif /* CONFIG_HAX */ +#define hax_enabled() (0) -#endif /* NEED_CPU_H */ +#endif /* CONFIG_HAX_IS_POSSIBLE */ #endif /* QEMU_HAX_H */ diff --git a/target/i386/hax/hax-all.c b/target/i386/hax/hax-all.c index bf65ed6fa9..ccdcb6afab 100644 --- a/target/i386/hax/hax-all.c +++ b/target/i386/hax/hax-all.c @@ -49,18 +49,13 @@ const uint32_t hax_cur_version = 0x4; /* API v4: unmapping and MMIO moves */ /* Minimum HAX kernel version */ const uint32_t hax_min_version = 0x4; /* API v4: supports unmapping */ -static bool hax_allowed; +bool hax_allowed; struct hax_state hax_global; static void hax_vcpu_sync_state(CPUArchState *env, int modified); static int hax_arch_get_registers(CPUArchState *env); -int hax_enabled(void) -{ - return hax_allowed; -} - int valid_hax_tunnel_size(uint16_t size) { return size >= sizeof(struct hax_tunnel); From patchwork Mon Feb 7 07:54:14 2022 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: 12737043 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E534AC433F5 for ; Mon, 7 Feb 2022 08:53:55 +0000 (UTC) Received: from localhost ([::1]:44030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzmU-0004fN-HE for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:53:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyrw-0005r8-7F for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:40 -0500 Received: from [2a00:1450:4864:20::433] (port=40852 helo=mail-wr1-x433.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrn-00027Z-Ua for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:23 -0500 Received: by mail-wr1-x433.google.com with SMTP id s18so23110215wrv.7 for ; Sun, 06 Feb 2022 23:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bpFa/IKKJWfbzZvTx8XgPB/hvj/ELIT1rILBVFupVCQ=; b=IAnMj00eftzbxPS6u12zY/8lJxq7+eEu/RWJ89P81ls8XR7iPML4GcqV9bWL1k+JfH A9uWRGKyNQDXI+xlqedFAPLzkibqLb0Mu4xD1R8eiSTFdMxdUsi0wSo8JC0p38UYU6kY VgD1OIsG7hkHCz94GFPwRDBF/IMDdQj+hU9wqDH+GMyhadUsgwX4Z688guDIm7lkMrEr qukdF5rOe17l+VINQFuNA7KimR+jz70dRSqQGG99wWvcuTRpXKU4O4hg5Lc8pMxclcyZ ek6ue+MwP/k3Vjx3IWwTb/qEtnx2abLdzmpSrd/wczVe6I3VzeTaC9srzoeHzicWWuJW Xnyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=bpFa/IKKJWfbzZvTx8XgPB/hvj/ELIT1rILBVFupVCQ=; b=GfQELIHhbzSZ+wpkKvWJBaYcs3HJiYhXn4DbUen/jA8S7f2fn1A3H7rbt42jISR9JP 83fuszUR6iJzxOYtabR3/d7pWmknibtVtM07zvAkRZeHW9Tw5MFVyPmoxbobU9mM8x3B w7RuvKccyDkyfu+2rJbjpFnKYyGU4sM9NGBnWzvB7yu+mJonNzWGfPbnw2RBIBvXJ5BQ 6zM2x2ZL/uUOQH4aLL3qvHc3HCNUnsSkKaYtl6r6YfvgOMbfPyGhtMuW9RCs79QRGJsT lLPHU9RtGmEBLI/KDahvwl10ZvCecOv4QdcgzoxjVbqU6jRWVO1j4msXmfMWoL+jUNrH fheQ== X-Gm-Message-State: AOAM5329cuzwfxd0Vg9rsw+GO+/kgocIUm9IM/614Ttm5Fjk46wsz3GN kCulnMnYPxEJD9NyK8TyH7FDfOWF9/g= X-Google-Smtp-Source: ABdhPJyQPVSmQDOt9pUfmRImp80daCqHjZWefUfYfnXeTrdJOTbwpyBdRH7b2AXPexUELCf5GAW5ng== X-Received: by 2002:a5d:6041:: with SMTP id j1mr4348555wrt.47.1644220509066; Sun, 06 Feb 2022 23:55:09 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id 5sm10036032wrb.113.2022.02.06.23.55.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:08 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 09/21] softmmu/cpus: Code movement Date: Mon, 7 Feb 2022 08:54:14 +0100 Message-Id: <20220207075426.81934-10-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::433 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= We want cpu_thread_is_idle() to use cpus_accel, so declare this variable earlier. Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- softmmu/cpus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 7f15106dd9..538e1714af 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -66,6 +66,11 @@ static QemuMutex qemu_global_mutex; +/* + * The chosen accelerator is supposed to register this. + */ +static const AccelOpsClass *cpus_accel; + bool cpu_is_stopped(CPUState *cpu) { return cpu->stopped || !runstate_is_running(); @@ -126,11 +131,6 @@ void hw_error(const char *fmt, ...) abort(); } -/* - * The chosen accelerator is supposed to register this. - */ -static const AccelOpsClass *cpus_accel; - void cpu_synchronize_all_states(void) { CPUState *cpu; From patchwork Mon Feb 7 07:54:15 2022 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: 12737025 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8BB02C433F5 for ; Mon, 7 Feb 2022 08:26:07 +0000 (UTC) Received: from localhost ([::1]:59796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzLa-00035k-F7 for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:26:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGys8-0005tO-Up for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:51 -0500 Received: from [2a00:1450:4864:20::42c] (port=42539 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyro-00028B-7w for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:24 -0500 Received: by mail-wr1-x42c.google.com with SMTP id h6so4408607wrb.9 for ; Sun, 06 Feb 2022 23:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NMo03if3Twagvwv1rQ7h3DuZ2u3b3vFvmRw/GAhR6B0=; b=eb12Z/ZLUbuvDZcokQa3yHgDVEdvu0CMmion0DONsYcClCzlFebZxPeEbCDmUtj2rb rONWJJe79uH4yOsjtLFsRC9z1NssRdyTWgclnoZHXjbto761saDh0cDLAmU9B9vHu2ww MZBItgLTQKb7pkZpHbkvcKjLnYzMJF/Q1q/dsAuOAoA82S9zBK93ogcx+IQKUOKnu1hi qrqs4V+MSXzR+fPLU5rxS+Op6BPaDyn5Ek0ruNaxrLwfhbp5d5eK4Vwv7E/Iz1cWKcY0 y73cBGLD5EqE+WMADc/B7gQHSu3Jo0yF8aQyMc2N+I3UtWyOrQJjSinZuS+55PSGkVl0 RmyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NMo03if3Twagvwv1rQ7h3DuZ2u3b3vFvmRw/GAhR6B0=; b=vaYPoGXWPZtrz2qvRQtYi4Yatcp5PMvtIHc591MUzb10bVoIdYCPzpBt6VJmSegSqZ /SVolgK/o0FLR7+LJoL5RRvRQm73bTFoPpWlNQRAvFgxobh/Jbd6jOHiL7nD4RARL8S6 neNXaknpk4zxKU5EqwZ2iUOCKrCUxdCQ53PTHWpumSKw92+uhPbLkYoRp3bAeDxas5mz eL/cBPwkMr8APabxhqZnBCMIy/LcZ/Wm+b9VN3ZKVtLC5K96749gMPQpWNLAkBMiDevF 32hGbXvGd3aGSOlWRFkF/Dn34XrPqiVvgc71KWJ4m/KGlre6N25embjQfbS+heVjnyN8 GJ/g== X-Gm-Message-State: AOAM532vXx74Z9VIrhixybaG3SdMhjVsZohDTI5SDJ6HLy8LPW7a7wat ltsAuw6k/gZA6cPB2eIWfTkL9kriJqM= X-Google-Smtp-Source: ABdhPJyMkEYfmpIUF3jXBfO5vrLnebgN/0aAXfbIHAR0UauxG466ppsaoI9mAXbST1RmMUlrnJY2aw== X-Received: by 2002:a05:6000:144f:: with SMTP id v15mr9109033wrx.407.1644220513783; Sun, 06 Feb 2022 23:55:13 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id c8sm16597411wmq.39.2022.02.06.23.55.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:13 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 10/21] accel: Introduce AccelOpsClass::cpu_thread_is_idle() Date: Mon, 7 Feb 2022 08:54:15 +0100 Message-Id: <20220207075426.81934-11-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Add cpu_thread_is_idle() to AccelOps, and implement it for the KVM / WHPX accelerators. Suggested-by: Richard Henderson Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-accel-ops.c | 6 ++++++ include/sysemu/accel-ops.h | 1 + softmmu/cpus.c | 6 ++++-- target/i386/whpx/whpx-accel-ops.c | 6 ++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index 7516c67a3f..95b7b08020 100644 --- a/accel/kvm/kvm-accel-ops.c +++ b/accel/kvm/kvm-accel-ops.c @@ -74,11 +74,17 @@ static void kvm_start_vcpu_thread(CPUState *cpu) cpu, QEMU_THREAD_JOINABLE); } +static bool kvm_vcpu_thread_is_idle(CPUState *cpu) +{ + return !kvm_halt_in_kernel(); +} + static void kvm_accel_ops_class_init(ObjectClass *oc, void *data) { AccelOpsClass *ops = ACCEL_OPS_CLASS(oc); ops->create_vcpu_thread = kvm_start_vcpu_thread; + ops->cpu_thread_is_idle = kvm_vcpu_thread_is_idle; ops->synchronize_post_reset = kvm_cpu_synchronize_post_reset; ops->synchronize_post_init = kvm_cpu_synchronize_post_init; ops->synchronize_state = kvm_cpu_synchronize_state; diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h index 032f6979d7..50c72540c7 100644 --- a/include/sysemu/accel-ops.h +++ b/include/sysemu/accel-ops.h @@ -30,6 +30,7 @@ struct AccelOpsClass { void (*create_vcpu_thread)(CPUState *cpu); /* MANDATORY NON-NULL */ void (*kick_vcpu_thread)(CPUState *cpu); + bool (*cpu_thread_is_idle)(CPUState *cpu); void (*synchronize_post_reset)(CPUState *cpu); void (*synchronize_post_init)(CPUState *cpu); diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 538e1714af..5b0bcb8c65 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -94,10 +94,12 @@ bool cpu_thread_is_idle(CPUState *cpu) if (cpu_is_stopped(cpu)) { return true; } - if (!cpu->halted || cpu_has_work(cpu) || - kvm_halt_in_kernel() || whpx_apic_in_platform()) { + if (!cpu->halted || cpu_has_work(cpu)) { return false; } + if (cpus_accel->cpu_thread_is_idle) { + return cpus_accel->cpu_thread_is_idle(cpu); + } return true; } diff --git a/target/i386/whpx/whpx-accel-ops.c b/target/i386/whpx/whpx-accel-ops.c index 6bc47c5309..1d30e4e2ed 100644 --- a/target/i386/whpx/whpx-accel-ops.c +++ b/target/i386/whpx/whpx-accel-ops.c @@ -83,12 +83,18 @@ static void whpx_kick_vcpu_thread(CPUState *cpu) } } +static bool whpx_vcpu_thread_is_idle(CPUState *cpu) +{ + return !whpx_apic_in_platform(); +} + static void whpx_accel_ops_class_init(ObjectClass *oc, void *data) { AccelOpsClass *ops = ACCEL_OPS_CLASS(oc); ops->create_vcpu_thread = whpx_start_vcpu_thread; ops->kick_vcpu_thread = whpx_kick_vcpu_thread; + ops->cpu_thread_is_idle = whpx_vcpu_thread_is_idle; ops->synchronize_post_reset = whpx_cpu_synchronize_post_reset; ops->synchronize_post_init = whpx_cpu_synchronize_post_init; From patchwork Mon Feb 7 07:54:16 2022 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: 12737047 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 00451C433EF for ; Mon, 7 Feb 2022 09:04:33 +0000 (UTC) Received: from localhost ([::1]:52758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzwm-0002s6-Qb for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 04:04:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGysP-0005wt-1Y for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:58 -0500 Received: from [2a00:1450:4864:20::32f] (port=43758 helo=mail-wm1-x32f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyrv-00028p-4M for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:29 -0500 Received: by mail-wm1-x32f.google.com with SMTP id k6-20020a05600c1c8600b003524656034cso7968045wms.2 for ; Sun, 06 Feb 2022 23:55:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G2lKCVTl1oac2ID1Q04D+ryfEO1CXYWXcWqr7jR7pwE=; b=bPdW+sZpJUn3Mnm83OjKF5jJ/YiPWotNN4/6r6104Vdi5CwKpw132JXdg4xWdbpcUu XKsfCYYYWfW6vC3sJwtqVNhIYx9kIVLe/cBAF/NWA/q3TrdcAVZKhh9JwfijVMbwtGa4 LCoKkqKdRabVQsRpBkjEIZh3NaHFSqX+JS0+j2EVzqlx6ujWOnVNCF3VSC7EcUQXBkmy TxUBpDDNJ6yCY9ULcc92mgMBhHpMCyhbSLjqiNtHohwyk9hUgQSq9w7tycCOBDRSEIHE 5WuCTNlC1NUwU3vN30tjHV+hC3oDwYqBl+rFS3CLPYG7BU0HQvqP8AqSXgtQHRcVeYbg v64w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=G2lKCVTl1oac2ID1Q04D+ryfEO1CXYWXcWqr7jR7pwE=; b=s4rdliWGrM9E5Bw6YfJXMkK3/B46CERzkUw6t2bYFH8d3gO17xSImIkaMGjhXzA/hd cVaM7MhLef4Stcl6GKnaJ9VAPE9+OwOKWq3EDLYoSAp4sFvFCImXaX19HWCZ4X6vN2sL jZeWMvCpU8+ea753/Sg0y5FD0Crb/hSbUCl0Hz+x3ngk2C12C6kE9/AAFIzQCrGWr/oQ tyEPu3fICxXAF23xDGLspLKq0PTFHq9MWhI0BOua6dPEG3gDUP++QPmAkSuj8GEsR31r 4b6DM2E64GfbhZjtF/p/GzNkwVxHerynGk4RAqCwAL3dZwSxuScUkqi1uazK3VkNWI77 CLig== X-Gm-Message-State: AOAM530ZskC+mfCX1c+dn1ONIWt4Op2kPvYS7RoKnsU9vWGTBEggUz6F 8p8NtkKXQXj/GmBUUMG6VHb83mTN3xs= X-Google-Smtp-Source: ABdhPJyGo1HIr2IsE9Guiim2CovjsB8k95QIZoO6loPQKi0gjDqcGbVVZOjKLz7z//H6fsaqPc38hA== X-Received: by 2002:a05:600c:4e05:: with SMTP id b5mr9875859wmq.44.1644220518604; Sun, 06 Feb 2022 23:55:18 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id d12sm1747655wrx.47.2022.02.06.23.55.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:18 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 11/21] accel: Introduce AccelOpsClass::cpus_are_resettable() Date: Mon, 7 Feb 2022 08:54:16 +0100 Message-Id: <20220207075426.81934-12-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Add cpus_are_resettable() to AccelOps, and implement it for the KVM accelerator. Suggested-by: Richard Henderson Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-accel-ops.c | 6 ++++++ include/sysemu/accel-ops.h | 2 ++ include/sysemu/hw_accel.h | 5 ----- softmmu/cpus.c | 5 ++++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index 95b7b08020..c4244a23c6 100644 --- a/accel/kvm/kvm-accel-ops.c +++ b/accel/kvm/kvm-accel-ops.c @@ -79,12 +79,18 @@ static bool kvm_vcpu_thread_is_idle(CPUState *cpu) return !kvm_halt_in_kernel(); } +static bool kvm_cpus_are_resettable(void) +{ + return !kvm_enabled() || kvm_cpu_check_are_resettable(); +} + static void kvm_accel_ops_class_init(ObjectClass *oc, void *data) { AccelOpsClass *ops = ACCEL_OPS_CLASS(oc); ops->create_vcpu_thread = kvm_start_vcpu_thread; ops->cpu_thread_is_idle = kvm_vcpu_thread_is_idle; + ops->cpus_are_resettable = kvm_cpus_are_resettable; ops->synchronize_post_reset = kvm_cpu_synchronize_post_reset; ops->synchronize_post_init = kvm_cpu_synchronize_post_init; ops->synchronize_state = kvm_cpu_synchronize_state; diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h index 50c72540c7..6013c9444c 100644 --- a/include/sysemu/accel-ops.h +++ b/include/sysemu/accel-ops.h @@ -28,6 +28,8 @@ struct AccelOpsClass { /* initialization function called when accel is chosen */ void (*ops_init)(AccelOpsClass *ops); + bool (*cpus_are_resettable)(void); + void (*create_vcpu_thread)(CPUState *cpu); /* MANDATORY NON-NULL */ void (*kick_vcpu_thread)(CPUState *cpu); bool (*cpu_thread_is_idle)(CPUState *cpu); diff --git a/include/sysemu/hw_accel.h b/include/sysemu/hw_accel.h index 01b5ebf442..22903a55f7 100644 --- a/include/sysemu/hw_accel.h +++ b/include/sysemu/hw_accel.h @@ -23,9 +23,4 @@ void cpu_synchronize_post_reset(CPUState *cpu); void cpu_synchronize_post_init(CPUState *cpu); void cpu_synchronize_pre_loadvm(CPUState *cpu); -static inline bool cpu_check_are_resettable(void) -{ - return kvm_enabled() ? kvm_cpu_check_are_resettable() : true; -} - #endif /* QEMU_HW_ACCEL_H */ diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 5b0bcb8c65..79e7d7a608 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -199,7 +199,10 @@ void cpu_synchronize_pre_loadvm(CPUState *cpu) bool cpus_are_resettable(void) { - return cpu_check_are_resettable(); + if (cpus_accel->cpus_are_resettable) { + return cpus_accel->cpus_are_resettable(); + } + return true; } int64_t cpus_get_virtual_clock(void) From patchwork Mon Feb 7 07:54:17 2022 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: 12737048 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5AEA6C433F5 for ; Mon, 7 Feb 2022 09:04:47 +0000 (UTC) Received: from localhost ([::1]:53124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzx0-00037p-8h for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 04:04:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGysn-00061t-NY for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:27 -0500 Received: from [2a00:1450:4864:20::430] (port=33425 helo=mail-wr1-x430.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysO-00029O-N1 for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:58 -0500 Received: by mail-wr1-x430.google.com with SMTP id e3so9163156wra.0 for ; Sun, 06 Feb 2022 23:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ujyuH+N9mmX9/M5Z6SxWCVQUgtTmKnPQTs4qSWEUAB8=; b=LzAhYV1D5Dk7nHWnjcV9aJg7o59dtKFWWT+U/A8n2c2r0Q7VhQfhnwbLg/jUiUCCxq 0qp9szGNyInoGXVkfoUyX6tGwWgm1h2ypxnH7iMl0R3gE6YLjQxyF+3TrbcsBxEqrPbx KP4ist3mMbLeKltci5NSmwUxFnhIAwl4VZVdoQSkJofETNbYjq6ARqR90yQxtk/9bP2V 9QD1S/Ap307fTL4PLaFbWVkE8LF7g5Dtj7p25RDxCy0z5nzU/s0zrAp2M/IYS1r6Ihuq BaeHmBF2dhAJbo2ELSmVhR9WFkN57HFFWaaHWJRwPfecD5fpRCshPueipMl/a76xaWHV ZqGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ujyuH+N9mmX9/M5Z6SxWCVQUgtTmKnPQTs4qSWEUAB8=; b=4C5IHPpghosgXYXHVT6IN0Pe0H16ATmYzcD2Ics+odFsxLvw1LganbmTqXEzBk5Ygy zfSG5GMVaOHzRh8tX0AlcKgKGmTbvZG5QMjR02qxaRsWpDvZNidIDxEhzIsmp3tPTZVo QfI16qVMkyxQqsqL5lbBSmMcITGIqd0Di+o4i48zV7pHWWM8pLhSVjg9Ht8HNAVeyDHI 2sixAFRC44ZLXECqXsFZ559esBw/b/3XIe8XZzwjTg2EseCi8cJjzwe/W4GyND7V1bjZ yj9mZVQ/eEeiMZHP6UCFeMcgLNRQ/11+BMQj8j8It3Ap3gfJHt3x/uu8RPucwFAu+hYb tb9A== X-Gm-Message-State: AOAM531FWosTxO3GbQ0b8G8T+CIUhZPpYTK9HLcgQC1dk0yyNhSameGX rW7r6AkN6tL3/JKorEtBIpY7GGtdMRE= X-Google-Smtp-Source: ABdhPJxlfPr2sVAG9hWfbh38SZvKFEAlWUeklzRadVfN97Nt/0vVf9Wipywl7fgOqB38xDa3cOiY6w== X-Received: by 2002:a05:6000:1b85:: with SMTP id r5mr5679848wru.453.1644220523138; Sun, 06 Feb 2022 23:55:23 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id o22sm4597237wmh.13.2022.02.06.23.55.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:22 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 12/21] softmmu/globals: Remove unused 'hw/i386/*' headers Date: Mon, 7 Feb 2022 08:54:17 +0100 Message-Id: <20220207075426.81934-13-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::430 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- softmmu/globals.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/softmmu/globals.c b/softmmu/globals.c index 7d0fc81183..3ebd718e35 100644 --- a/softmmu/globals.c +++ b/softmmu/globals.c @@ -25,8 +25,6 @@ #include "qemu/osdep.h" #include "exec/cpu-common.h" #include "hw/display/vga.h" -#include "hw/i386/pc.h" -#include "hw/i386/x86.h" #include "hw/loader.h" #include "hw/xen/xen.h" #include "net/net.h" From patchwork Mon Feb 7 07:54:18 2022 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: 12737030 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7A24EC433F5 for ; Mon, 7 Feb 2022 08:29:48 +0000 (UTC) Received: from localhost ([::1]:35116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzP9-0005ak-AD for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:29:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGysn-00061s-Nl for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:27 -0500 Received: from [2a00:1450:4864:20::436] (port=41476 helo=mail-wr1-x436.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysO-0002B3-W6 for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:55:59 -0500 Received: by mail-wr1-x436.google.com with SMTP id k1so6599978wrd.8 for ; Sun, 06 Feb 2022 23:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lAqkFjMH6Uy5U+4qThYsEs/+qMc6h2XmQGwMlhvm3jU=; b=ZNPzz/dof2ZyxmUZg2kduFJRrEbEMM8e30jdkwHslph3T4arC9ATBbFTcWw3Z7aJLo 6yv3ZZhKImZAG7Gqdt8RCQG/ZBgTyAOz0UT0J7Q6jt0KwsRTweCCtYlGGQe0zS0fnVy7 WxJwoSxICaSd+scLOYMGCA4jekLZRKu6fyQqUj/FX9qqGqO7GEq4lfOuwFDSzx4LiyBb vyIglxHjaMAVfCUPdhGW83tvOWU05RlqAVyoEdr7jQD13q19hUljVUgxDDjm2RWOipR7 eyrhPN1XOP0w8rj/h2B7czjjnAshn1etHruPs0AEIUmmqSa68TL2r5E4S3jWJb+LO680 LrvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=lAqkFjMH6Uy5U+4qThYsEs/+qMc6h2XmQGwMlhvm3jU=; b=ur0fVRZeaQChSY1vHKp+eQz6VEeAfOFyAfbnp+tjuKBsxxfuR4WWRl6R+Wuz68Usgh /dJgkweNCJmj7kcM6tkWjAPj1zMDtwpb4PixHVXpynhbsZtBlM+z6JSzWol5VXiq8dD4 XGg8jL+QUChSx0zc7qLVLYWKJ8dfPVFlugELGigkW7TL4q9xmBCKuPIbiwpdeDv6aiiG EQAvug8c8fOMVqQn8yioUiMalrR8e8oQRmz2QvH43syU19Z4hN4tiBqD4ESDZlgjXimP PF0260g4ov8pUktbJpavw86ynexJOE8XEefMuUkqz9jlNSIPhZtC/6E2RWE1sE71UPOz whIg== X-Gm-Message-State: AOAM533NWLl1CUKvyJWLtMyrtpjTH5MDBzQxOgHgJVxCrzvMtIqXQuXH b3bv49XGGTNgbhZ67zb9x8bUK/NmlJw= X-Google-Smtp-Source: ABdhPJyuyORsPr82gjgVvxWP8o0YyoyDMLWywgargdVNusMFOxWQR5o7cjiIIl3dz6jpZamJ/0D/sg== X-Received: by 2002:a5d:6d09:: with SMTP id e9mr9330746wrq.253.1644220527665; Sun, 06 Feb 2022 23:55:27 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id p8sm10073220wrr.16.2022.02.06.23.55.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:27 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 13/21] softmmu/runstate: Clean headers Date: Mon, 7 Feb 2022 08:54:18 +0100 Message-Id: <20220207075426.81934-14-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::436 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Add the missing 'qemu/log.h' header and remove the unused 'exec/exec-all.h' one. Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- softmmu/runstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 10d9b7365a..3cb2758b33 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -30,7 +30,6 @@ #include "crypto/cipher.h" #include "crypto/init.h" #include "exec/cpu-common.h" -#include "exec/exec-all.h" #include "exec/gdbstub.h" #include "hw/boards.h" #include "migration/misc.h" @@ -44,6 +43,7 @@ #include "qemu-common.h" #include "qemu/error-report.h" #include "qemu/job.h" +#include "qemu/log.h" #include "qemu/module.h" #include "qemu/plugin.h" #include "qemu/sockets.h" From patchwork Mon Feb 7 07:54:19 2022 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: 12737052 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CD239C433FE for ; Mon, 7 Feb 2022 09:09:40 +0000 (UTC) Received: from localhost ([::1]:33072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH01j-0000Qo-QQ for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 04:09:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGysn-00061u-Uj for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:27 -0500 Received: from [2a00:1450:4864:20::42c] (port=34752 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysS-0002Eq-N8 for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:17 -0500 Received: by mail-wr1-x42c.google.com with SMTP id f17so23172448wrx.1 for ; Sun, 06 Feb 2022 23:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zez4ISi9HLTg8wm1+LaHxiwt7rkz8IPb2uqsVohVlvY=; b=Sdxs7a/A6eKt1yvHPkFWYQQwfkIxnGff6TsTco0J5Ytf2fNGirNfQdog66+Q99H+PZ UZ4ffGDiaCh1pTcm9614hZ18AcKIp5qpkF+1h4uGBDt3uDyGiWX4ZqHeWRwQNjPIOfFN 3cz972QdVLt26LRT7scNKkcVXhuJzyI1jlK99OG1Afk/0fqxIVXbpWQNMG3zQ7qaTrNQ wXut/KJxX+xwcwI+nQyCxhpHWdBSvO+JiVORvtKTrGNQHHQOcOei6kyW4so1cwKwne90 3OuxLVjNweW61uPHJgtqXw+9NQoqmBt+Z22JG0jkypzxcdHrPISVl/HTepHxVPlzBvPe V9mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zez4ISi9HLTg8wm1+LaHxiwt7rkz8IPb2uqsVohVlvY=; b=PPpEqbKNpPlmCWlJfbAhBQoZjQ95jdTEUbGaUs0tVWy8Q2qKhUA94jLxAGpe166O4u 6NW7r5jCSfbJV8shTw9nmAX+Kqk2Ti8jk1lNVVckSQZYNKHWbgRTULo1+DPrnr194Mcc me/95w00dLNcZmQvjsIcyCjSFkzNKPyIkj3D4wOZUfai2y82ewuZsNIOT0omgdHcKs9h anW5Nib0duUhG5VI4YaWXoe0wJlZVTFrWw22xus/mh0+iEaaI+fIJgMGbesAK3ovYzKX nkLaYM2FW4ncDZT5VqWoZE6LPN2DFoflR1nrxoQvasUrx43d9JvWElQrCcfWU0VHaQET VtwQ== X-Gm-Message-State: AOAM533OEzEpSp/77toWe4IUi7k/YbV1JO0AYcFLSR7xiDQ3699hN4ON /BN7lJmPXiq8cw5OgN7Voa470813FCs= X-Google-Smtp-Source: ABdhPJwd3zE4MZIBTr4XCfqDzTIUJyFkAJI7xqRJh/y6/Z+d4iO1zgNNxCAOjfbin6K7KQ26pSrO4w== X-Received: by 2002:adf:e18e:: with SMTP id az14mr9118922wrb.610.1644220532097; Sun, 06 Feb 2022 23:55:32 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id o21sm8215577wmh.36.2022.02.06.23.55.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:31 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 14/21] softmmu/physmem: Remove unnecessary include Date: Mon, 7 Feb 2022 08:54:19 +0100 Message-Id: <20220207075426.81934-15-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- softmmu/physmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index eb4b3bcae7..09951c0996 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -60,7 +60,6 @@ #include "exec/memory-internal.h" #include "exec/ram_addr.h" -#include "exec/log.h" #include "qemu/pmem.h" From patchwork Mon Feb 7 07:54:20 2022 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: 12737053 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 607E3C433F5 for ; Mon, 7 Feb 2022 09:09:47 +0000 (UTC) Received: from localhost ([::1]:33492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH01q-0000hr-F2 for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 04:09:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyst-00062F-MF for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:29 -0500 Received: from [2a00:1450:4864:20::42a] (port=43788 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysb-0002FP-FX for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:23 -0500 Received: by mail-wr1-x42a.google.com with SMTP id c19so8380696wrb.10 for ; Sun, 06 Feb 2022 23:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b07+/0El+xESjB/OqqwkRUSwpK76kJG4x+JjfzXwDzk=; b=mVB2yohJTSNE4LWVYQrhuL5y8rsmciTTSMFgTD6J37QLNfQK79lihQcptS6xR1s1tJ HqmjmNCnRqK9wb9yKjGZR5+qXPOa1SGWNgf227AEuaOYbiAFeFwoHRb8ANC17eGRqYNL /DDdSud4nyB4QxvYwcLh/GMSOF2vEOfouu7R5zCpKCZEfWUlmiq5Z6XOg7QAt1B6JJ39 70pdvkmJervlp0worwsjvHhwHZoltLj96ZDh3eOg9mSmiqC/DZlTAiMZUbuQ8sak8hE7 HtnzTt+C/il7Nd/DVjRPb4SRt62htNYcX/RgixCHJ6X8TzMDS9wjcAB/8ZvSPewRInVy TAsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=b07+/0El+xESjB/OqqwkRUSwpK76kJG4x+JjfzXwDzk=; b=8A3m4mzyYtNGgkoX1xyM2PY+tR9h9/89VwKxCU4iR2CTHlPCNVDcHJNsSn4EqL3A/s qhwJv9dt7nvvz55ZxXBvMRDDTaSsHhd85jdUFDEVsA57p2XN7FEjzVhpFNI10Cps/Z1S uARSQwOKH9aQro0VDRS+b3A/RQKkJGVxBtnAPlPQoM1MLy1za00Ega91Sqba+l4THWOm 0X/MQdObwv2SrtxTrkPDOJfaWJu4EN3RhIBHEUsCmnstEYt4DvARl5CjRf5Rz+eKpksK tJzUmGUBpc+bNJ7GM1Y3BF4ys6fjfZConw0+9lJC8BWKu1ixWqvlGHg3tVb0qPJZt3n2 E3Ww== X-Gm-Message-State: AOAM530e4g85VtmCAylGI+JHnzr8S+qLzudkvjSFSCKMyUSnTZSJf+fR CAJcetNsHTiawIqCJfARYswuCgrzNYk= X-Google-Smtp-Source: ABdhPJxhyZ3DXV7Aq1Wq3HNvjVxoNkCHDM66nAzJnncH1UBNE+pkq6nQ7skcEXIyb0VxgiasP+a35w== X-Received: by 2002:a5d:4fc4:: with SMTP id h4mr2529295wrw.481.1644220536574; Sun, 06 Feb 2022 23:55:36 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id n14sm9351469wri.75.2022.02.06.23.55.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:36 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 15/21] softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header Date: Mon, 7 Feb 2022 08:54:20 +0100 Message-Id: <20220207075426.81934-16-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- softmmu/cpu-timers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/cpu-timers.c b/softmmu/cpu-timers.c index 34ddfa02f1..204d946a17 100644 --- a/softmmu/cpu-timers.c +++ b/softmmu/cpu-timers.c @@ -28,7 +28,6 @@ #include "migration/vmstate.h" #include "qapi/error.h" #include "qemu/error-report.h" -#include "exec/exec-all.h" #include "sysemu/cpus.h" #include "qemu/main-loop.h" #include "qemu/option.h" From patchwork Mon Feb 7 07:54:21 2022 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: 12737046 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 18929C433F5 for ; Mon, 7 Feb 2022 08:59:32 +0000 (UTC) Received: from localhost ([::1]:48920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzrv-00008V-NB for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:59:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyst-00062E-Lo for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:29 -0500 Received: from [2a00:1450:4864:20::336] (port=35555 helo=mail-wm1-x336.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysb-0002Fj-FN for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:23 -0500 Received: by mail-wm1-x336.google.com with SMTP id l123-20020a1c2581000000b0037b9d960079so5049997wml.0 for ; Sun, 06 Feb 2022 23:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aCwLmCq0oGKqIgeR/e8+TlnXEc3ReLPyFBhnpQgaQpo=; b=oprtYykjJ+12s0VXHPKXoUEI2cTWIT3/xjaqay5NeqwuPGopbwHFg/TUxuAgunk1w2 NRV5AIn0KUmIcm9h9prP/Gh0P9kFBho8D4E8sdwJ3jJ97j8Qook1hiyy+QFNP0xPzZyo AAX+/kV4BVfr/yCOcGvwNHjYHA51R1pxC7dSqzEyloTkmRy4cfbfe7/1SyAosfo3G6K7 kzZVvQr4rxexHXEIKQPFcbTzIQVCmi3VUeVIgA+ICLlNEGLnWmhfF6XvSXExpGEsOhYR jbGnW3aKLNT9IzxXwvN+d8aNVxiXoFLuDQxGfULEyGOtRCFwibFdpbaxVeD2Q5w1PsZV UPrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=aCwLmCq0oGKqIgeR/e8+TlnXEc3ReLPyFBhnpQgaQpo=; b=ff2bGtLeWiNKLPX4Q4rr1ST0cbwmQLRyQbuhuk2Znqya3OKkMr4QLQIUzgUX5Wj49z ohPdQDLXa9gIs9U9zvLFXLQOsk8GE3hlvP8tci/4jz6srW5mDGA0cpkLzQiNgD00vqWH +Q+8YeU6lgR+8sUJQPBNoH4LbT39F6Oaf42mwNinR7jEibsYkdjcoz1TRhNyK7M2AVBf 6OVYHRxQE6RRsfw1h/FuAUOasSLrhXQgI6d/7b6QkrYsuj+vXtcYZTZBB4fr1rhWnS8b GKXAPsbqxacgp4Hh0L+olFBGIjevGlImZHiXRP3ZZNye8+jylInXB1kae8VpBIhSXUeM MB4g== X-Gm-Message-State: AOAM532yGybzgtX4O5gn/LjO4CGPzAwCyrWLQjgWw7pLiXFgns8GHiKa Ye9x54ejDubpPQjUKI2+9R4+b0F9hMI= X-Google-Smtp-Source: ABdhPJwNtqxd14RMmiUPyTq+cGK+cPuKd+Fzoo+T8PiJPdS9TfQV69xX6QRz7YOBQ8H9ma/+C5i7AA== X-Received: by 2002:a7b:c402:: with SMTP id k2mr13418027wmi.188.1644220541174; Sun, 06 Feb 2022 23:55:41 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id f8sm10750280wry.12.2022.02.06.23.55.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:40 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 16/21] misc: Remove unnecessary "sysemu/cpu-timers.h" include Date: Mon, 7 Feb 2022 08:54:21 +0100 Message-Id: <20220207075426.81934-17-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::336 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/qtest/qtest.c | 1 - target/alpha/translate.c | 1 - tests/unit/ptimer-test-stubs.c | 1 - 3 files changed, 3 deletions(-) diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c index 7e6b8110d5..f6056ac836 100644 --- a/accel/qtest/qtest.c +++ b/accel/qtest/qtest.c @@ -20,7 +20,6 @@ #include "qemu/accel.h" #include "sysemu/qtest.h" #include "sysemu/cpus.h" -#include "sysemu/cpu-timers.h" #include "qemu/guest-random.h" #include "qemu/main-loop.h" #include "hw/core/cpu.h" diff --git a/target/alpha/translate.c b/target/alpha/translate.c index ca78a0faed..66768ab47a 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -20,7 +20,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "sysemu/cpus.h" -#include "sysemu/cpu-timers.h" #include "disas/disas.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" diff --git a/tests/unit/ptimer-test-stubs.c b/tests/unit/ptimer-test-stubs.c index 2a3ef58799..f5e75a96b6 100644 --- a/tests/unit/ptimer-test-stubs.c +++ b/tests/unit/ptimer-test-stubs.c @@ -12,7 +12,6 @@ #include "qemu/main-loop.h" #include "sysemu/replay.h" #include "migration/vmstate.h" -#include "sysemu/cpu-timers.h" #include "ptimer-test.h" From patchwork Mon Feb 7 07:54:22 2022 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: 12737073 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 582F3C433EF for ; Mon, 7 Feb 2022 09:22:50 +0000 (UTC) Received: from localhost ([::1]:50728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH0ET-0004a8-5h for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 04:22:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGysy-00063n-2e for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:35 -0500 Received: from [2a00:1450:4864:20::32d] (port=41592 helo=mail-wm1-x32d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGyst-0002Fz-CF for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:30 -0500 Received: by mail-wm1-x32d.google.com with SMTP id bg21-20020a05600c3c9500b0035283e7a012so8006068wmb.0 for ; Sun, 06 Feb 2022 23:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SMo/CGxUgzIKbpkLKDtLmMsQNbN4r6vJbpso8Oc0Oi4=; b=TbTBfZS3YRC6K2en1Rz0iYhRQhvXcUW+qcTBz2LVkCaJV78VizUBUCRKnZ5VTLFxJ9 FY2kmYCNFwgxFOHSO+TAPSDO6anG3xhKUVxKcbjOtH8zFtWSyC+tbnq9mKdO9BvSMNzS KeUZCbRkYAhnl+sdfz95gjv8qEs31XLGUtO/Z9QBgwRwAq8Cf5cI/abGyu0P+79tT6rG /2ZsC6Qz6zkGwmc9Ip2M2X4cV454PzuUDK0BCd3KZCfzrVM9c6ZldOpY53FhU+wv7vFg mWpbPPLmdvEDGCaKYtkAwvvSK4PM4pF/wW9q2nZWBAb+ZjPFBFxE8t4KgMhryvcQ3jVD EXng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SMo/CGxUgzIKbpkLKDtLmMsQNbN4r6vJbpso8Oc0Oi4=; b=dWBEVYrWyA23LhRPrpTZa4JOJcWbTZPDJ5OM6mOzDfdXdmIdfIaUW3bqiHg98S9OgE u00FKkfgDRI1MarYlT8hZNJhxB1xKSzaaJkq2WrQVMc8/YUeAmahgicTMFrw/iFob3/v aPGWIBTD9oPsp0128mUqUf0UoFOXOEz336ZDSN+Ne6S8OLnZEQWp63IwF69sw3W4GnpG /7A1E9qqex4l+TVEbFxugkc24f5QkxZJzyIjFkze4cRQW6Wuh8XKWP/2o6TIkIs1N4XA HMbDLDQ+lQoRFimMtouEClnpAW/i45Mo5j7TazNMoeYFzxOJ1r0hg+qz+nooLMqQv8Vn DY0Q== X-Gm-Message-State: AOAM530jLu5e97qYrqJyvtQ/Hux6di9i6g49R/pNMg0dUfkUy8VYBRtX +URVlVZahEV+mUItBb4KjB+93bOsREM= X-Google-Smtp-Source: ABdhPJwnOExTY5T3fYJB/6lmtkBoQBiky048FmJzM1sUcveYa78HPiReDDaeaN5W2AwLIWc87uAYEg== X-Received: by 2002:a05:600c:4982:: with SMTP id h2mr3288655wmp.140.1644220545850; Sun, 06 Feb 2022 23:55:45 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id z3sm9279083wmp.42.2022.02.06.23.55.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:45 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 17/21] misc: Add missing "sysemu/cpu-timers.h" include Date: Mon, 7 Feb 2022 08:54:22 +0100 Message-Id: <20220207075426.81934-18-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32d (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-icount.c | 1 + accel/tcg/tcg-accel-ops-mttcg.c | 1 + accel/tcg/tcg-accel-ops-rr.c | 1 + accel/tcg/tcg-accel-ops.c | 1 + include/exec/exec-all.h | 1 - target/riscv/csr.c | 1 + 6 files changed, 5 insertions(+), 1 deletion(-) diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-icount.c index ea42d1d51b..bdaf2c943b 100644 --- a/accel/tcg/tcg-accel-ops-icount.c +++ b/accel/tcg/tcg-accel-ops-icount.c @@ -27,6 +27,7 @@ #include "qemu-common.h" #include "sysemu/tcg.h" #include "sysemu/replay.h" +#include "sysemu/cpu-timers.h" #include "qemu/main-loop.h" #include "qemu/guest-random.h" #include "exec/exec-all.h" diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/tcg-accel-ops-mttcg.c index 29632bd4c0..dc421c8fd7 100644 --- a/accel/tcg/tcg-accel-ops-mttcg.c +++ b/accel/tcg/tcg-accel-ops-mttcg.c @@ -27,6 +27,7 @@ #include "qemu-common.h" #include "sysemu/tcg.h" #include "sysemu/replay.h" +#include "sysemu/cpu-timers.h" #include "qemu/main-loop.h" #include "qemu/notify.h" #include "qemu/guest-random.h" diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index bf59f53dbc..a805fb6bdd 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -27,6 +27,7 @@ #include "qemu-common.h" #include "sysemu/tcg.h" #include "sysemu/replay.h" +#include "sysemu/cpu-timers.h" #include "qemu/main-loop.h" #include "qemu/notify.h" #include "qemu/guest-random.h" diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 1a8e8390bd..ea7dcad674 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -29,6 +29,7 @@ #include "qemu-common.h" #include "sysemu/tcg.h" #include "sysemu/replay.h" +#include "sysemu/cpu-timers.h" #include "qemu/main-loop.h" #include "qemu/guest-random.h" #include "exec/exec-all.h" diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 35d8e93976..87df70fa8f 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -24,7 +24,6 @@ #ifdef CONFIG_TCG #include "exec/cpu_ldst.h" #endif -#include "sysemu/cpu-timers.h" /* allow to see translation results - the slowdown should be negligible, so we leave it */ #define DEBUG_DISAS diff --git a/target/riscv/csr.c b/target/riscv/csr.c index e5f9d4ef93..a4db40769b 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "qemu/main-loop.h" #include "exec/exec-all.h" +#include "sysemu/cpu-timers.h" /* CSR function table public API */ void riscv_get_csr_ops(int csrno, riscv_csr_operations *ops) From patchwork Mon Feb 7 07:54:23 2022 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: 12737039 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 02EE6C433F5 for ; Mon, 7 Feb 2022 08:45:08 +0000 (UTC) Received: from localhost ([::1]:40192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGzdy-0001SN-VK for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 03:45:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGyst-00062D-Lf for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:29 -0500 Received: from [2a00:1450:4864:20::433] (port=34762 helo=mail-wr1-x433.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysb-0002GK-FV for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:22 -0500 Received: by mail-wr1-x433.google.com with SMTP id f17so23173507wrx.1 for ; Sun, 06 Feb 2022 23:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MPAmnOsRbcA4UD7ctUqowakXgtnJBAK19odJ2q4fziY=; b=Pbhz3QjiaGxQlV/pc+/UVoDHABY76qJuKsZiLQXABesOtdZ/oREIqPkvoZ0TT7dfZ9 1J1bQKokeIcTlllHHi7v6TyyETHarsJY204a4HnkPbasbwKCXeFPONE+QJt19Vg4OZk8 IUdNDo57ZwsVZdMtW6JX+H9aCBA8zIxBz8JfyIc20aAlPdSyaIatoG5vLurR1pMaf8b+ KhJRs513pQfFfRqdkH+2Gufo97Vw1J8s+Agn7kRuK15n0zQrUmK2jlwKqBmRjFJeBjV0 DfB2JcPSkMS2B/U9UCGr/GRmfG35ECvmpXzTrOJB9Xzx3EuZx/xaBE7GF+EOSPOZDF9u NgcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MPAmnOsRbcA4UD7ctUqowakXgtnJBAK19odJ2q4fziY=; b=um/vpAkvaT8UZYghSs9aFIkSoYKkEA25SUGCDt3xhcEYWw6BjhNWGsiM5/D+nAyb6m b/6KHq+AuItGKufF+4yapXlICLTYuSvKrx30lgD10W2nWeUJUTGmxBYOsVfHL12YIO6a xrC1pn7C6iCI/8+wTAocS2g4CjEK+ifGAERr138yeablurISOAm4Ddy803aCxJE7CiTd 6KqejcsJgrJPv++QQczMx3oaEahJ8AZmPQYP5NuEJi6Vp3UlJSc8+sCZRBgvDUoaTpoo CnkIasSxHovfDtbHiiMW6FXAU9FyUBAQZwAz4EFfr68hmwp3BICR0a/F4rAGgrhkbHrw HQHQ== X-Gm-Message-State: AOAM533Pu4ADRWin/Yzr/QrAskro9kwwaaj+vdULlA+yGck6wUvkvdgG ThcOzPERQutfR7lGsSA0YI8r1Nouhs8= X-Google-Smtp-Source: ABdhPJxhI374mKKu2e7TPIB0do2dU3fmkcGZRKZ5cEZQNnQbAWzs+3Hz6+WA6Kmrnv6a9q52QBmyMg== X-Received: by 2002:a5d:6082:: with SMTP id w2mr5410121wrt.70.1644220550601; Sun, 06 Feb 2022 23:55:50 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id r2sm882763wrt.65.2022.02.06.23.55.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:50 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 18/21] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic Date: Mon, 7 Feb 2022 08:54:23 +0100 Message-Id: <20220207075426.81934-19-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::433 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= gdb_exit() and gdb_set_stop_cpu() prototypes don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c and softmmu/runstate.c once for all targets. Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- include/exec/gdbstub.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index a024a0350d..89edf94d28 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -45,17 +45,6 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...); */ void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va); int use_gdb_syscalls(void); -void gdb_set_stop_cpu(CPUState *cpu); - -/** - * gdb_exit: exit gdb session, reporting inferior status - * @code: exit code reported - * - * This closes the session and sends a final packet to GDB reporting - * the exit status of the program. It also cleans up any connections - * detritus before returning. - */ -void gdb_exit(int code); #ifdef CONFIG_USER_ONLY /** @@ -165,7 +154,7 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf, int len) #define ldtul_p(addr) ldl_p(addr) #endif -#endif +#endif /* NEED_CPU_H */ /** * gdbserver_start: start the gdb server @@ -177,6 +166,18 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf, int len) */ int gdbserver_start(const char *port_or_device); +/** + * gdb_exit: exit gdb session, reporting inferior status + * @code: exit code reported + * + * This closes the session and sends a final packet to GDB reporting + * the exit status of the program. It also cleans up any connections + * detritus before returning. + */ +void gdb_exit(int code); + +void gdb_set_stop_cpu(CPUState *cpu); + /** * gdb_has_xml: * This is an ugly hack to cope with both new and old gdb. From patchwork Mon Feb 7 07:54:24 2022 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: 12737065 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2559EC433EF for ; Mon, 7 Feb 2022 09:14:40 +0000 (UTC) Received: from localhost ([::1]:41682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH06Y-0006Mf-VF for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 04:14:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGysv-00062H-BT for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:31 -0500 Received: from [2a00:1450:4864:20::32e] (port=41594 helo=mail-wm1-x32e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysb-0002Gh-FO for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:24 -0500 Received: by mail-wm1-x32e.google.com with SMTP id bg21-20020a05600c3c9500b0035283e7a012so8006331wmb.0 for ; Sun, 06 Feb 2022 23:55:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lf4FxZOloAXzX6NJpHqcFNBqRrxhogU7JEnj2p1b6Xw=; b=L+fEPNH8MaAXQvSbVPcc/JpWHjsS0J0FOgHCEmf2800ivUlo/T5t/MB91zSjjPKZPo XYfpdz700/PBhPFzvVJVtC9+Xh7V5brYGGBeJvlxc5LGNbgiSJaM7jZYW9erwO9CbG3r dhqWsHq0230+jbdKoDNbXGtfZ9f9yng7ciZz1nmw0oAImK0xsCqHADzxsTAAVyfNDRPW r4Noo5VajO3jeQYK6hT1gG9zuXyWbXnEM4a1qiqXRuYBZDYFjCf84hglGVvb9hQqtche Y7N1PW4ndgJngImbqYxYXYaPHM/LN6SuHdn1EKVksval8GkWoPL0F8nFEN6sRHOqLTaU ByJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=lf4FxZOloAXzX6NJpHqcFNBqRrxhogU7JEnj2p1b6Xw=; b=vAvdJKVF/Ey8TmeyRbmwq9kjOhdERzkiouYYDEQh4DOtzh77B2TGfbh+qJR3aQ6JLk zNzEoAi6tSBJ8S8+k8cp8Xn6hiONSTGoF1+N5j62ds+g2fYEB+xM5TrZB/ddNJ0RBF/C V5v/trAPqWxgrq23XDDpQBrT55F4WXuqGiYXZY616ClcW4hwzdkbe/1Zbv1IJzK41ywn +x5efgePauq29VATXbpxy1XYsTclYmH0Zi5r8iQHJTk+1PtJIT9wfC5wseW5yDvkt+XN mhhs171rINQEsp+/3xJ1bgcn6/9nxQCken6zrwF0faCOZQAiqZ90T0V33P89t/5HJrNd FnJw== X-Gm-Message-State: AOAM532E/KxDMwbkzntiJhjKvCEgz7rcf/svQURPnbakkYr+FFqiIiVR hHBIyst2VVR2yX9mk5V7H/IokQPxN44= X-Google-Smtp-Source: ABdhPJyMau+kRJF7aovuPlZBrftdjtdqeYbqzJAwQV8qfnBh/XX5MSiXSGB7AuByXNfDc0dcNVmZtQ== X-Received: by 2002:a05:600c:646:: with SMTP id p6mr9994031wmm.3.1644220556156; Sun, 06 Feb 2022 23:55:56 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id j15sm9402438wmq.19.2022.02.06.23.55.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:55:55 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 19/21] exec/cpu: Make address_space_init/reloading_memory_map target agnostic Date: Mon, 7 Feb 2022 08:54:24 +0100 Message-Id: <20220207075426.81934-20-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= cpu_address_space_init() and cpu_reloading_memory_map() are target-agnostic, but are declared in "exec/exec-all.h" which contains target-specific declarations. Any target-agnostic source including "exec/exec-all.h" becomes target-specific and we have to compile it N times for the N targets built. In order to avoid that, move the declarations to "exec/cpu-common.h" which only contains target-agnostic declarations. Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 23 +++++++++++++++++++++++ include/exec/exec-all.h | 25 ------------------------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 8031ebc680..7f7b5943c7 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -90,6 +90,28 @@ void qemu_ram_unset_migratable(RAMBlock *rb); size_t qemu_ram_pagesize(RAMBlock *block); size_t qemu_ram_pagesize_largest(void); +/** + * cpu_address_space_init: + * @cpu: CPU to add this address space to + * @asidx: integer index of this address space + * @prefix: prefix to be used as name of address space + * @mr: the root memory region of address space + * + * Add the specified address space to the CPU's cpu_ases list. + * The address space added with @asidx 0 is the one used for the + * convenience pointer cpu->as. + * The target-specific code which registers ASes is responsible + * for defining what semantics address space 0, 1, 2, etc have. + * + * Before the first call to this function, the caller must set + * cpu->num_ases to the total number of address spaces it needs + * to support. + * + * Note that with KVM only one address space is supported. + */ +void cpu_address_space_init(CPUState *cpu, int asidx, + const char *prefix, MemoryRegion *mr); + void cpu_physical_memory_rw(hwaddr addr, void *buf, hwaddr len, bool is_write); static inline void cpu_physical_memory_read(hwaddr addr, @@ -102,6 +124,7 @@ static inline void cpu_physical_memory_write(hwaddr addr, { cpu_physical_memory_rw(addr, (void *)buf, len, true); } +void cpu_reloading_memory_map(void); void *cpu_physical_memory_map(hwaddr addr, hwaddr *plen, bool is_write); diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 87df70fa8f..199fd49e5d 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -82,31 +82,6 @@ static inline bool cpu_loop_exit_requested(CPUState *cpu) return (int32_t)qatomic_read(&cpu_neg(cpu)->icount_decr.u32) < 0; } -#if !defined(CONFIG_USER_ONLY) -void cpu_reloading_memory_map(void); -/** - * cpu_address_space_init: - * @cpu: CPU to add this address space to - * @asidx: integer index of this address space - * @prefix: prefix to be used as name of address space - * @mr: the root memory region of address space - * - * Add the specified address space to the CPU's cpu_ases list. - * The address space added with @asidx 0 is the one used for the - * convenience pointer cpu->as. - * The target-specific code which registers ASes is responsible - * for defining what semantics address space 0, 1, 2, etc have. - * - * Before the first call to this function, the caller must set - * cpu->num_ases to the total number of address spaces it needs - * to support. - * - * Note that with KVM only one address space is supported. - */ -void cpu_address_space_init(CPUState *cpu, int asidx, - const char *prefix, MemoryRegion *mr); -#endif - #if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG) /* cputlb.c */ /** From patchwork Mon Feb 7 07:54:25 2022 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: 12737081 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8019EC433F5 for ; Mon, 7 Feb 2022 09:33:06 +0000 (UTC) Received: from localhost ([::1]:59470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH0OP-0002ff-C2 for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 04:33:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGysz-00063t-FV for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:35 -0500 Received: from [2a00:1450:4864:20::329] (port=53793 helo=mail-wm1-x329.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysv-0002Ir-84 for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:31 -0500 Received: by mail-wm1-x329.google.com with SMTP id n8so9212155wmk.3 for ; Sun, 06 Feb 2022 23:56:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jA/zGq0i7Q1AJkyr3sqI0LygQvi9DNMNVaVAvFtIKuY=; b=QLVEflRFJmDny8NAD6eca/CLGfpqmSlf0selnUFNV6IhmvmLi1rY8p7xrb5lUFx2qJ V87ElRakfTCzPcFmi8tVP2uh5EGK6RkkBJxnEG66dI6D5VvEpvcXe2m5KCRJchQWqnlP 6Q+1wzlo9+MQqcxYQd9IEW5lIdTSvxGkp/6EUdgGrn/HZdBCVRvIZ439Ddox6TxSTg7w NZDV5kMA0p2jEtiP/0ASFu6idrHX/+Fom64ly6MrVZ4exQfVWbOGF+HjK6T8awsoUsJt 70Jjqt/JNbRezGpGT3CnkeAbofpjXGpCUG+4MAL/C4DKrJ6ORz/nyGB4k8HTsIAazpZo 0XrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jA/zGq0i7Q1AJkyr3sqI0LygQvi9DNMNVaVAvFtIKuY=; b=AFAIbRuUwJt9pGGr5LFdWVN7AqZCtFJ0xbJKimbFERO5GywZx/oK1Yv9bv8B1hgLZt m92hCYoHGvjlYHD7peexgTdb6CPIrpFnOPpF7DNblUjFKR7MhWx21verYpX6DPAyxZoa n8P4r+ihMRkDVRDCNP2i7A/QYvJImDs7jWtVg5G54K3aS8l3EHzjQy48URTOtccx2jHu IFfWatX8olBXmbj+Ywrdl7hYLYt+xzUd4kF/DRpvddaux13f3JGWfbhZ+qwggCddzN/8 Q4BmsQ84je9VxiDBXUWHF0Pej3qsmThZA8ci3XsLhQ5JDLVGpxz5A4jhsF7QwGXkx/jn UrWw== X-Gm-Message-State: AOAM530jAPPpjpVwzIMMpuZr3+sCsNQH5Tsri3/4do9VufN7sD9zSfsf 8ZUvd2LCaEG4rJdvaKtUb9E4Ci6OIA4= X-Google-Smtp-Source: ABdhPJyWIPdh0ZYJKEQ1lCJQVBCuCEKTe+/nuRtPehiIYFMWvEwzLys5o5wcdmvumZmJC9PJuC3klA== X-Received: by 2002:a7b:c1cb:: with SMTP id a11mr2982182wmj.111.1644220560842; Sun, 06 Feb 2022 23:56:00 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id l12sm3807977wrs.11.2022.02.06.23.56.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:56:00 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 20/21] softmmu: Add qemu_init_arch_modules() Date: Mon, 7 Feb 2022 08:54:25 +0100 Message-Id: <20220207075426.81934-21-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::329 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= module_allow_arch() is the single target-specific call in the whole vl.c file. Move the module initialization out to arch_init.c, that way we'll be able to build vl.o once for all targets (the next commit). Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/arch_init.h | 2 ++ softmmu/arch_init.c | 9 +++++++++ softmmu/vl.c | 5 +---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index 70c579560a..79c2591425 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -28,4 +28,6 @@ enum { extern const uint32_t arch_type; +void qemu_init_arch_modules(void); + #endif diff --git a/softmmu/arch_init.c b/softmmu/arch_init.c index 8919405c7b..79716f959b 100644 --- a/softmmu/arch_init.c +++ b/softmmu/arch_init.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" +#include "qemu/module.h" #include "sysemu/arch_init.h" #ifdef TARGET_SPARC @@ -39,3 +40,11 @@ int graphic_depth = 32; #endif const uint32_t arch_type = QEMU_ARCH; + +void qemu_init_arch_modules(void) +{ +#ifdef CONFIG_MODULES + module_init_info(qemu_modinfo); + module_allow_arch(TARGET_NAME); +#endif +} diff --git a/softmmu/vl.c b/softmmu/vl.c index 5e1b35ba48..08ff97f4e0 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2814,10 +2814,7 @@ void qemu_init(int argc, char **argv, char **envp) error_init(argv[0]); qemu_init_exec_dir(argv[0]); -#ifdef CONFIG_MODULES - module_init_info(qemu_modinfo); - module_allow_arch(TARGET_NAME); -#endif + qemu_init_arch_modules(); qemu_init_subsystems(); From patchwork Mon Feb 7 07:54:26 2022 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: 12737050 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 466AFC43217 for ; Mon, 7 Feb 2022 09:08:30 +0000 (UTC) Received: from localhost ([::1]:57464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH00b-0006Hm-2E for qemu-devel@archiver.kernel.org; Mon, 07 Feb 2022 04:08:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGysz-00063u-Fj for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:35 -0500 Received: from [2a00:1450:4864:20::42a] (port=36529 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGysu-0002JC-Q0 for qemu-devel@nongnu.org; Mon, 07 Feb 2022 02:56:31 -0500 Received: by mail-wr1-x42a.google.com with SMTP id i15so732960wrb.3 for ; Sun, 06 Feb 2022 23:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AyD35wj+M9wCKuPYo/oN1VkE+12kmsRLo0hvXa1frww=; b=YiuEmoT4ZPZ4rrRIyE/zZpCyVPiTdQUKjqz0bue3MMIEyW4GhKRjA68butSXTSL9ys X4lcMqc5urCEVVrZCUDiUi7atFBFamY8qlqbVKxrbuAJKsNWbmeNGbQoxYXeG4efk81q T1ZTpcK9sBo/COnBj6yJ2MMpQ8bMXrt3h/TUpxRG1GTMjVKJi2k7ohXVI5TuKYJ//u4r 5ULFknX3eGa9EFngaG6vJYTwKHYdqy72hu4Z9brU16Fh+/FdlcivVbEb2zAQRAQHL0W+ 02wprnGf0HNIGGNKHcYZ5VEvbnzbLxBbsWloa/RH4FQ2tAEKtHHGn94WE7dlYc0yXf/n uFeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=AyD35wj+M9wCKuPYo/oN1VkE+12kmsRLo0hvXa1frww=; b=FL9RscV2Le4UIElLId2E98bdMP93dKGml58agObG83HGKfG3QphFDHHpqOsSPof5DA msSZxAuK1irXV6xO1IuhKzQy3ZC09JYhKGm6ZcC6hGqshJWetv2D22I7s6j1c7YqaWw3 ryrtnSy0UoFLMLiARJWlWduA1UQ92+L8AN5u0qxGuDcNNRcH/4RNn0mY1p5gYCELDtA2 ScJyPeBWNgTL1nz5gj4p1TctjhZPzEMaFZNhlDGAMshYhA/N2tyQClFrh5OVi1pLJ2Vr xtH8g9usWkNYvCEIJ9XnBex4OdxjZYwdRIM3GHXwF0PK21MkVIF7+ZWV+pU5GES6vfCt NgEg== X-Gm-Message-State: AOAM531tyAoZMOlB4q9WPyPpbM+qhsjBWbZIYlXj/VkjImKQdxZ+LvmK Hz+mijlgl0UHezDhO8hvemhKZjQFj+A= X-Google-Smtp-Source: ABdhPJwM5RQ+6LQ4sHBcvEPQ3BIC+mPaevT80YLZJDBfvuCL9UF/S1dQBzuDUI+Ns9SfpjsSf2xUSw== X-Received: by 2002:a5d:6d03:: with SMTP id e3mr8744567wrq.41.1644220565244; Sun, 06 Feb 2022 23:56:05 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id f8sm10751548wry.12.2022.02.06.23.56.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Feb 2022 23:56:04 -0800 (PST) To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 21/21] softmmu: Build target-agnostic objects once Date: Mon, 7 Feb 2022 08:54:26 +0100 Message-Id: <20220207075426.81934-22-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207075426.81934-1-f4bug@amsat.org> References: <20220207075426.81934-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Various softmmu objects aren't target specific. Move them to the generic softmmu source set. For our 31 softmmu targets, this is in total 330 objects less to build! Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- softmmu/meson.build | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/softmmu/meson.build b/softmmu/meson.build index d8e03018ab..d2badf203b 100644 --- a/softmmu/meson.build +++ b/softmmu/meson.build @@ -1,20 +1,9 @@ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files( 'arch_init.c', - 'balloon.c', - 'cpus.c', - 'cpu-throttle.c', - 'datadir.c', - 'globals.c', - 'physmem.c', 'ioport.c', - 'rtc.c', - 'runstate.c', 'memory.c', - 'memory_mapping.c', + 'physmem.c', 'qtest.c', - 'vl.c', - 'cpu-timers.c', - 'runstate-action.c', )]) specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: [files( @@ -22,9 +11,20 @@ specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: [files( )]) softmmu_ss.add(files( + 'balloon.c', 'bootdevice.c', + 'cpus.c', + 'cpu-throttle.c', + 'cpu-timers.c', + 'datadir.c', 'dma-helpers.c', + 'globals.c', + 'memory_mapping.c', 'qdev-monitor.c', + 'rtc.c', + 'runstate-action.c', + 'runstate.c', + 'vl.c', ), sdl, libpmem, libdaxctl) softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))