From patchwork Wed Feb 9 23:00: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: 12741047 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 7D080C433EF for ; Wed, 9 Feb 2022 23:06:45 +0000 (UTC) Received: from localhost ([::1]:58280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHw2u-0007BX-Co for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:06:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvx9-0004Cb-Sa for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:00:49 -0500 Received: from [2607:f8b0:4864:20::102e] (port=41651 helo=mail-pj1-x102e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHvx7-00031x-T3 for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:00:47 -0500 Received: by mail-pj1-x102e.google.com with SMTP id r64-20020a17090a43c600b001b8854e682eso3830280pjg.0 for ; Wed, 09 Feb 2022 15:00:45 -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=w0Zhn2tuP42TSxJAOSHDCIvihvH+W+m4usoAyV7FoUk=; b=O7na37r+NoWwcrm5InYjfkNO3iCeZvXxA72P8vQ59E575eIvl2w7AAi54okrhvm6yC hJW2hgdu5vwXAbi2h+W7jCtxF90fXShaJouVyvsKspaLoa0lBqFtF+/Z859Fqzr8QG42 hVillinbT1NVDp3Jr26FVvV1uA2Rg3a+Cs0uppvIzHlGvksrA2sp8ngJiPr+v+VASQEI U2tyF+f/qCYEM5lvofLyKtlq+PHRxrpaKgzUs0e776YwcCJgVGxXzay4M/y9R37xNgL9 GDH6bL71RyIjT+ZKEcliNFjkezTGOBDWqcnzCxHDlhnWk/g7JJYiJkI1+aM1K0yeVQmt +leQ== 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=w0Zhn2tuP42TSxJAOSHDCIvihvH+W+m4usoAyV7FoUk=; b=3gL155fMN21XvYslcjmc0LAo+c2VUUG19xOQSzTfgRFP0PhF1EK8iFrMhBw8WOsxJx a97vgqhCwbLfSrs0Q7oyoioJJngvd5L9Wa9e3XL2osqsSqJLZFm6wD1KtuEu0OydXtqn KSjif4nKYw6k3w8dNaPsQW7l33TX8iV05yU1f+eYpgXRNBm1mzAjOtbiOmkHSHTpZhR1 Ag9vfu3JZMTHO1YzsDgRTUALuil+v7yhhM9L2lWq7je8f4ivTe+8JqiCMh5E+3euDvTV R254bm4dwiusk7ATpE2UK75a+XpJAjzcwTkKHl+VFDSt5IzQ76IoTyGYLnQbuGxFhVAY gUUA== X-Gm-Message-State: AOAM530QFV1uX0lCR1HZMbu/8hUZVF4+3UTxIgP6hGNbSh0Havq/wp/T slvKFiEnGye2tiaFcBDqGwnlGr+6yTE= X-Google-Smtp-Source: ABdhPJx2Tw/r8LvGj5jSobpQMhcfhd4D3QWD1w9Hnaj/ECqdRA8z2+ALz/4HHiOe6RJF6TuONiTbEQ== X-Received: by 2002:a17:90a:c598:: with SMTP id l24mr5176132pjt.175.1644447644365; Wed, 09 Feb 2022 15:00:44 -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 s6sm14427554pgh.86.2022.02.09.15.00.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:00:44 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/9] accel/tcg: Add missing 'tcg/tcg.h' header Date: Thu, 10 Feb 2022 00:00:22 +0100 Message-Id: <20220209230030.93987-2-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pj1-x102e.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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?= 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 + 4 files changed, 4 insertions(+) diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-icount.c index bdaf2c943b..379a9d44f4 100644 --- a/accel/tcg/tcg-accel-ops-icount.c +++ b/accel/tcg/tcg-accel-ops-icount.c @@ -31,6 +31,7 @@ #include "qemu/main-loop.h" #include "qemu/guest-random.h" #include "exec/exec-all.h" +#include "tcg/tcg.h" #include "tcg-accel-ops.h" #include "tcg-accel-ops-icount.h" diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/tcg-accel-ops-mttcg.c index dc421c8fd7..de7dcb02e6 100644 --- a/accel/tcg/tcg-accel-ops-mttcg.c +++ b/accel/tcg/tcg-accel-ops-mttcg.c @@ -33,6 +33,7 @@ #include "qemu/guest-random.h" #include "exec/exec-all.h" #include "hw/boards.h" +#include "tcg/tcg.h" #include "tcg-accel-ops.h" #include "tcg-accel-ops-mttcg.h" diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index a805fb6bdd..889d0882a2 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -32,6 +32,7 @@ #include "qemu/notify.h" #include "qemu/guest-random.h" #include "exec/exec-all.h" +#include "tcg/tcg.h" #include "tcg-accel-ops.h" #include "tcg-accel-ops-rr.h" diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index ea7dcad674..58e4b09043 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -33,6 +33,7 @@ #include "qemu/main-loop.h" #include "qemu/guest-random.h" #include "exec/exec-all.h" +#include "tcg/tcg.h" #include "tcg-accel-ops.h" #include "tcg-accel-ops-mttcg.h" From patchwork Wed Feb 9 23:00: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: 12741050 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 7B4B0C433EF for ; Wed, 9 Feb 2022 23:10:12 +0000 (UTC) Received: from localhost ([::1]:38520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHw6F-0004Ls-Fh for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:10:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvxH-0004H9-Az for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:00:55 -0500 Received: from [2607:f8b0:4864:20::42d] (port=36396 helo=mail-pf1-x42d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHvxF-000334-T9 for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:00:55 -0500 Received: by mail-pf1-x42d.google.com with SMTP id u16so1295844pfg.3 for ; Wed, 09 Feb 2022 15:00:53 -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=2vlhP+I+qsoulaMdTGbCrXFc3DOLl+1M9mBK8FsFFtE=; b=U+TP3RXM7Dc0QrVIbeYiuN2q7j9p2snQRygVAAlRplz9hSYPN2eh+Lhuigdc3v4Aws ObemSf8GpcmRBJj0mGYIKvgtLgQBiuYagdKV9QNJesTc3E/uS7k3rJW7kH2Qdg8M+5EJ qfE35E6p4PMm7HtYNyO103KdNxT5ZwyVLvXczVDkmh7U5bqIhGRqp6tD6RUn6W6+jVUh Kox0VGSgDUTqFK4Oij1vFNusJJEx6lHAo/dmHZy+cEzH50WL9lc9p8vs+4xoDX/PdXok qWwa7wPkoPNin5q7tPYnHh1N96F73D/OMvAWgnhUXuvf9axaw9qGp869c52SKaZk6b5O ziJw== 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=2vlhP+I+qsoulaMdTGbCrXFc3DOLl+1M9mBK8FsFFtE=; b=dazEZE5rmkMaGVaENlSnnruACtYMIuuLXpBJx33Iuvh1rxCkLU7Eu/RdwrojFHrc5N LYymQuh7mzsTmQFoRmuEAZCiA7tPJ6GNL1MjPaDDbiyiKWA/R5hx4LqnUv2ajm6S9fqK 5w1tQgDjd6eVD5i7nkxgQ9tlapVCgJ5bfJ91gpuTThkw2OBY4pjTPXjIHB+3q7rAwaeo GIVy3AisfFC0J6YOL1W6HjUgw/lJHQRoCqX0nVRCvF4tfPph/Zm352hStB28C52AGwiS e06Yj0TdYNtIMN0c6mlVUul9JDlZMP2kY/mnEHxxMt8/a8xR5VTPkkeCmlGhc1QvIawV x4DA== X-Gm-Message-State: AOAM5338JSAf4D+XYyPFaJKL9GVHvrBEVkMPNZD0kH8/Au8dvDZ2hwz9 UTsph1rNFw/Z4GWgQInOY8I5uiOrgdQ= X-Google-Smtp-Source: ABdhPJz2rK3ypTqrPFOInwlOJsbKdAFPIHpL97M8AASu7Ddl2EuZIvMxJ6K9ZBYwE7R7PPNEGTquHA== X-Received: by 2002:a63:5fd1:: with SMTP id t200mr3767044pgb.37.1644447652393; Wed, 09 Feb 2022 15:00:52 -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 u17sm11952230pfi.163.2022.02.09.15.00.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:00:52 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/9] coverity-scan: Cover common-user/ Date: Thu, 10 Feb 2022 00:00:23 +0100 Message-Id: <20220209230030.93987-3-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::42d (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pf1-x42d.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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?= common-user/ has been added in commit bbf15aaf7c ("common-user: Move safe-syscall.* from linux-user"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- scripts/coverity-scan/COMPONENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/coverity-scan/COMPONENTS.md b/scripts/coverity-scan/COMPONENTS.md index 183f26a32c..cea6695ecd 100644 --- a/scripts/coverity-scan/COMPONENTS.md +++ b/scripts/coverity-scan/COMPONENTS.md @@ -127,7 +127,7 @@ usb ~ (/qemu)?(/hw/usb/.*|/include/hw/usb/.*) user - ~ (/qemu)?(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/exec/user/.*) + ~ (/qemu)?(/common-user/.*|/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/exec/user/.*) util ~ (/qemu)?(/util/.*|/include/qemu/.*) From patchwork Wed Feb 9 23:00: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: 12741048 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 919D8C433F5 for ; Wed, 9 Feb 2022 23:07:17 +0000 (UTC) Received: from localhost ([::1]:59936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHw3Q-0008HA-NJ for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:07:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvxR-0004MI-88 for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:09 -0500 Received: from [2607:f8b0:4864:20::102b] (port=54258 helo=mail-pj1-x102b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHvxN-000341-Tj for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:03 -0500 Received: by mail-pj1-x102b.google.com with SMTP id qe15so3539256pjb.3 for ; Wed, 09 Feb 2022 15:01: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=wVoz6YEbx/9/Yq7TfZCDi3JHFpcg93bStHzLwpIyIF4=; b=ELqQOGviw81bBseU5jTswyC99nlt8hKYjvxkD91SABkRQ1NW9VJ5aERgGxbvETnN1k MbrqoXuMLGLG3GTGV7QikrVR0gVpH617qE4/aLAiHbmqHtja0R9YOxU6fhizwZaqoRhr jwF/LJVpyy2/MstZ4wTOg4NwsflpsxOmyH0B6WRZHRkqoe8YApaWGzW0MIQl67DYNgKI 8p88xpWjIGu48lZZvs6DnLJSxL7Di5aBWtDBWSKafvtMUii8lNQZZuGhESMpMj7RhR+e bQ5Ijg3Y17XIjYqxtchwC+XFL39/6LcmyQnX/4pPlpSoXT2IproSULI+uYy0CJ3ggvDT BOog== 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=wVoz6YEbx/9/Yq7TfZCDi3JHFpcg93bStHzLwpIyIF4=; b=Tx3MTt/yUbR7BbzlA4rtsuyuSeIfPuTq91zsWs1uFVd1bk/5g6JQkbekRmAySsAAKO o+gNbYJsHbE3UCtERv2gh04X/HxmCR2oR10TUeckp/UzhrLQlIJ0yHts53kBL19NRdOU yVoS4RN+K4r4YXQH/dGcHo54OnRJWCbgyzq9FgzyxzUH1FP1pZ/Na6dJ1VMyxVK7m0yn nN91c9y0hKJ024uZt8LCzcYizL1QEfgWzEMsqC/gedJT2WBfP+qUz3J7vHy+lt6MDSFG AK5Dnc89CNvHbzxbXZ0MZYmeUAuH5F4ROC8hATHnz99+7HuePzOdkt65Fjk5aYWTJMVY WMIg== X-Gm-Message-State: AOAM533HvzDoQKNk805sLtyttTglLZh2MTuNZKHSZgiiSLo0G2Nf12cz INwdIPJRUjtL8T5s8AUXBK0UOtvazOg= X-Google-Smtp-Source: ABdhPJzhZ7Ee/eZtm2i6P9bpDpFBMqfgtIdhzt0fYfsBXiMVZDLcgqG4J18kjAAxEfyUZpPPCfsCpw== X-Received: by 2002:a17:90a:8409:: with SMTP id j9mr5195325pjn.101.1644447660508; Wed, 09 Feb 2022 15:01: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 o2sm8834715pga.57.2022.02.09.15.00.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:01:00 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 3/9] include: Move exec/user/ to user/ Date: Thu, 10 Feb 2022 00:00:24 +0100 Message-Id: <20220209230030.93987-4-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102b (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pj1-x102b.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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?= Avoid spreading the headers in multiple directories, unify exec/user/ and user/. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 4 ++-- include/exec/cpu-all.h | 2 +- include/{exec => }/user/abitypes.h | 0 include/user/safe-syscall.h | 6 +++--- include/{exec => }/user/thunk.h | 2 +- linux-user/qemu.h | 2 +- linux-user/thunk.c | 2 +- linux-user/user-internals.h | 2 +- scripts/coverity-scan/COMPONENTS.md | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) rename include/{exec => }/user/abitypes.h (100%) rename include/{exec => }/user/thunk.h (99%) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 02921ac8b3..2f67776b0b 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -25,7 +25,7 @@ #undef DEBUG_REMAP -#include "exec/user/abitypes.h" +#include "user/abitypes.h" extern char **environ; @@ -36,7 +36,7 @@ enum BSDType { }; extern enum BSDType bsd_type; -#include "exec/user/thunk.h" +#include "user/thunk.h" #include "target_arch.h" #include "syscall_defs.h" #include "target_syscall.h" diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index c0f0fab28a..08b2894274 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -145,7 +145,7 @@ static inline void tswap64s(uint64_t *s) /* MMU memory access macros */ #if defined(CONFIG_USER_ONLY) -#include "exec/user/abitypes.h" +#include "user/abitypes.h" /* On some host systems the guest address space is reserved on the host. * This allows the guest address space to be offset to a convenient location. diff --git a/include/exec/user/abitypes.h b/include/user/abitypes.h similarity index 100% rename from include/exec/user/abitypes.h rename to include/user/abitypes.h diff --git a/include/user/safe-syscall.h b/include/user/safe-syscall.h index 61a04e2b5a..b2cb76e05b 100644 --- a/include/user/safe-syscall.h +++ b/include/user/safe-syscall.h @@ -1,5 +1,5 @@ /* - * safe-syscall.h: prototypes for linux-user signal-race-safe syscalls + * safe-syscall.h: prototypes for user signal-race-safe syscalls * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,8 @@ * along with this program; if not, see . */ -#ifndef LINUX_USER_SAFE_SYSCALL_H -#define LINUX_USER_SAFE_SYSCALL_H +#ifndef USER_SAFE_SYSCALL_H +#define USER_SAFE_SYSCALL_H /** * safe_syscall: diff --git a/include/exec/user/thunk.h b/include/user/thunk.h similarity index 99% rename from include/exec/user/thunk.h rename to include/user/thunk.h index 300a840d58..b5796f4304 100644 --- a/include/exec/user/thunk.h +++ b/include/user/thunk.h @@ -21,7 +21,7 @@ #define THUNK_H #include "cpu.h" -#include "exec/user/abitypes.h" +#include "user/abitypes.h" /* types enums definitions */ diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 7910ce59cc..b6775f112b 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -6,7 +6,7 @@ #undef DEBUG_REMAP -#include "exec/user/abitypes.h" +#include "user/abitypes.h" #include "syscall_defs.h" #include "target_syscall.h" diff --git a/linux-user/thunk.c b/linux-user/thunk.c index dac4bf11c6..cd85bbc825 100644 --- a/linux-user/thunk.c +++ b/linux-user/thunk.c @@ -20,7 +20,7 @@ #include "qemu/log.h" #include "qemu.h" -#include "exec/user/thunk.h" +#include "user/thunk.h" //#define DEBUG diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h index a8fdd6933b..4d0f682aea 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h @@ -18,7 +18,7 @@ #ifndef LINUX_USER_USER_INTERNALS_H #define LINUX_USER_USER_INTERNALS_H -#include "exec/user/thunk.h" +#include "user/thunk.h" #include "exec/exec-all.h" #include "qemu/log.h" diff --git a/scripts/coverity-scan/COMPONENTS.md b/scripts/coverity-scan/COMPONENTS.md index cea6695ecd..0571362a45 100644 --- a/scripts/coverity-scan/COMPONENTS.md +++ b/scripts/coverity-scan/COMPONENTS.md @@ -127,7 +127,7 @@ usb ~ (/qemu)?(/hw/usb/.*|/include/hw/usb/.*) user - ~ (/qemu)?(/common-user/.*|/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/exec/user/.*) + ~ (/qemu)?(/common-user/.*|/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/user/.*) util ~ (/qemu)?(/util/.*|/include/qemu/.*) From patchwork Wed Feb 9 23:00: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: 12741049 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 018CBC433F5 for ; Wed, 9 Feb 2022 23:07:40 +0000 (UTC) Received: from localhost ([::1]:60826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHw3o-0000Qu-12 for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:07:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvxY-0004NA-6j for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:14 -0500 Received: from [2607:f8b0:4864:20::434] (port=45844 helo=mail-pf1-x434.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHvxW-00034u-8u for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:11 -0500 Received: by mail-pf1-x434.google.com with SMTP id 9so4101732pfx.12 for ; Wed, 09 Feb 2022 15:01:09 -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=H4Q0dpcIvNuFDkQMGtGR7mU1AT622fYAy+5CgAtgn2A=; b=cmdistdAqcaIUoMaBNlTH1EN7H+uQGJCeUGmf5ARbWYDMuluAd/WHSjAZLy+UV/Ulz ADH0WT9PypyCon161G1uYe+9QGL8CMHpg7bLoIXGVq/+ysOEsbG8t4ygqRe3Zx8FYyAf xdPnbqd2FjgqpihC8ZgTkIHFEDmuzB0ko/2VHTU5BtuIztX7pPp2F69/rIE8F+Ho2Yxd OOOLu4nhU02J3wCgM8+DGyzsgHDnrYfKzo1fx1Ek5Dkaq/kLexFYr7/EAfYg9gWkyvu+ zIVtYn9Fx4L64dfylsB4WsDsibRKTWMn5Gk1ghueODnFYVwQtj/yWHO4iwCWfr4aD0MH Oeug== 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=H4Q0dpcIvNuFDkQMGtGR7mU1AT622fYAy+5CgAtgn2A=; b=GznMTKVNmQKK3kTTou6HHCDKudkA/HtTK6rkeEJPucQS+OmigQp+LLjeGwUvnGuWfB H5VfGFSruxAG3V+rj95ri/mckyN+gW4JvySEzWHgol3kBqxbK/CjTtaP/tIpen0lOSJK PxcoDM0XAbNwpHLzmWvycDkMokXhaB7HYCqyAkJZaRhAxmymqFTWXNqD3vVbatyAdF6T Exn3eNxyD95NU3mzSAc1PpDzzQOHDILdwU2HnXpaSVfz3aOr47dRgn8qoRs3rsI8X87e KvnpzI6WE9Ssr9iyg1yYS86iauuuzyr2DIvwlTJ2W2SCsnX8g3t/VxDUkCVt+GBmXQ/H nppQ== X-Gm-Message-State: AOAM532zj3gQfn00w/fQ1waIq4wriyU5UsjBMAB9wdzOo12t2H+GtAsi p5g8sIq9cbt7dyAih9Hy7M1VSHRZzlM= X-Google-Smtp-Source: ABdhPJwkVU3f3UT/1VrCCDL5CGixRlr9ajJnGOVwcFVoNQJ+665Uv6WtOS6zH3K5+58MDXJlJWWcyg== X-Received: by 2002:a63:8ac8:: with SMTP id y191mr3678530pgd.29.1644447668917; Wed, 09 Feb 2022 15:01:08 -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 o7sm19487338pfk.184.2022.02.09.15.01.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:01:08 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 4/9] linux-user/exit: Add missing 'qemu/plugin.h' header Date: Thu, 10 Feb 2022 00:00:25 +0100 Message-Id: <20220209230030.93987-5-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::434 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pf1-x434.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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?= qemu_plugin_user_exit() is declared in "qemu/plugin.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/exit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/exit.c b/linux-user/exit.c index fa6ef0b9b4..10989f17f8 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -17,6 +17,7 @@ * along with this program; if not, see . */ #include "qemu/osdep.h" +#include "qemu/plugin.h" #include "exec/gdbstub.h" #include "qemu.h" #include "user-internals.h" From patchwork Wed Feb 9 23:00: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: 12741056 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 7A4C8C433EF for ; Wed, 9 Feb 2022 23:16:01 +0000 (UTC) Received: from localhost ([::1]:46814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHwBs-0001fg-Ep for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:16:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvxw-0004UA-4B for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:38 -0500 Received: from [2607:f8b0:4864:20::1030] (port=37492 helo=mail-pj1-x1030.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHvxe-00035c-Bj for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:20 -0500 Received: by mail-pj1-x1030.google.com with SMTP id v5-20020a17090a4ec500b001b8b702df57so6708756pjl.2 for ; Wed, 09 Feb 2022 15:01:17 -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=BVNq6HKqRhIG4DoxJxFF+5gTjgFiu1ncAD+73fAIqbs=; b=jXOY9TOFYJpWItZGuynmhYr8C8okUisndEa/prGgiIalUkJUnUZ0K5sxNd/3Hzdj/I xkLoUE3+mIQpabqCXXRKGfcmzA5orgo26vNif2DQQojPavjQLKCa0ycyty0p1rn1pm2L 2m5auJx3q+xL2ZyUTPgQpu0LeryPuGxNLkfg2bGTwOjHlDNKeyQqFOObG5P0+Y1JX9iC m+c31/2csoeRagXK2B6GnzzuKDWwFPhvxdF0HVDesI2t/EwOrFrcpI1RGQGHhtJCdFh9 5xGxqyXcGrAlLRrdwJIsPvSy8AqvV0YVcxRlujfCsT01PWgw+AyyugEaUma+WVAcm9A3 +/kA== 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=BVNq6HKqRhIG4DoxJxFF+5gTjgFiu1ncAD+73fAIqbs=; b=liOc7Sg8u38rBGnHCkk7Dt31i5bVYWynd1eS+P8RuaoXn3whXaml5MJvuVmDP1fuNH p9JWOdT/YylRcQtvmcIOUV47NxYXoDTwNVz1gu/RVZpQJ2F/L8e2CArQswJrkj7SyWvD Nbc4IH4h1uNu6BC9SX219W5gGL758kVEs35PtvsoBRTg9yxluu2+KTahyZKuGcv/9nEO OywH9zHmq30W+AnKD6vapWoHpbm4EkdX10rzn/ZK+v84OQW4yACtZp+R6225PWFihAVC 66mTi8usvH+brlUhsbxRVOvDjAFSinjWmCiQLso21pLbRzm/cQVxX27HqdBnIUXJP9gb UQUg== X-Gm-Message-State: AOAM531dBXeecJR8ukQ3KGLqMVxhkjFYD4PWf0ugtcASLUW3Jy483GSu 6Nme82Ce0CXL271m8NqtUWnnKO+02iI= X-Google-Smtp-Source: ABdhPJzxVU54ziHwqzX0rpJxDNCCRJSEF+broQJzFgDAXN2g6cOVe7irnA1Ritwdo/2J/6SApZG05A== X-Received: by 2002:a17:902:ced1:: with SMTP id d17mr4491444plg.78.1644447677032; Wed, 09 Feb 2022 15:01:17 -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 s29sm6711641pfw.159.2022.02.09.15.01.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:01:16 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 5/9] linux-user/cpu_loop: Add missing 'exec/cpu-all.h' header Date: Thu, 10 Feb 2022 00:00:26 +0100 Message-Id: <20220209230030.93987-6-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1030 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pj1-x1030.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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?= env_cpu() is declared in "exec/cpu-all.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/cpu_loop-common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/cpu_loop-common.h b/linux-user/cpu_loop-common.h index dc0042e4de..b0fd1ea3b1 100644 --- a/linux-user/cpu_loop-common.h +++ b/linux-user/cpu_loop-common.h @@ -20,6 +20,7 @@ #ifndef CPU_LOOP_COMMON_H #define CPU_LOOP_COMMON_H +#include "exec/cpu-all.h" #include "exec/log.h" #include "special-errno.h" From patchwork Wed Feb 9 23:00:27 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: 12741063 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 8D5DBC433EF for ; Wed, 9 Feb 2022 23:18:39 +0000 (UTC) Received: from localhost ([::1]:53322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHwEQ-00068a-No for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:18:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvy1-0004UX-5G for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:41 -0500 Received: from [2607:f8b0:4864:20::102c] (port=54261 helo=mail-pj1-x102c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHvxv-000364-Rx for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:38 -0500 Received: by mail-pj1-x102c.google.com with SMTP id qe15so3540039pjb.3 for ; Wed, 09 Feb 2022 15:01:26 -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=D9qxvMLg2aA1jlJbM4yenjefdRbyB4Cli0TTYvf9xu4=; b=XsmADXnvr4q8zRjvBWOgNSpcKM/I9XyJuswxYmJCo8GmmII84gn1nXWBTZOvhVEQAl XSllfMfOCf32QUnEiSFjj0wSuTpOES7nL9bSK1ecsIRTqoLjDSB0rnFXzhbllRW/JDNf wp13Y1dYnScJozhRRM5cY33MaiDIdAvhLhcAJEOtHfof681tcsXrbCul8KXAAVeDNTdS hYI+HwZCq3KlIggB6IFUgj0rf7VYdkdo0dlDNVLzr5+BL/0PnzjV9Ycpj9xOUQHVxiLj 9Ft9GrFA3xOTRjh3VP/JfaE3bjkbqw9mZGUUrFDLNTezQOuPSd7gEP2Wa172uws9bt6S /uDw== 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=D9qxvMLg2aA1jlJbM4yenjefdRbyB4Cli0TTYvf9xu4=; b=m/4G1/mN1lRdi9M82dv4K6rGklveqreKu0sKQjbiZQpQ3LT5/rnQHeSLZmfu/a3J7p ZF9U0TRJv4t7Pr+Ubvwe94ECmlIpimLJOoVpuehz0Bwt2jRk7JkY5q0LNERVPxAElv3u YqyiUzOxhkBkHWopMmOmZXjMSTJIchQPipt6EtjrRmVXiaSGZMz5KH2fzb9qzxPJlw8P dQBQ32FBK+KlPVOUCPfCTnvvOVVASo+39POeGGHuuqoh100CAo9IB+A2IYwQBrVot5aX PDmknVrjWgIsy8w1wrhe9KXqAnE1IVCiRVAkL+nZeecNBm/s1E0dgqEucrl1l3vY2zad DFyg== X-Gm-Message-State: AOAM530Ojw6d469Hqkwim1s1YXGwPey76FlhH8fYr9R/cMJxRT3tEuoT WlolDgYAs1x/XV+xbXgK89xX35IuMu4= X-Google-Smtp-Source: ABdhPJw7mPmGD2eEtBxWUuBu4mVBIfi/+dR8FQd5r5aHhoK4YqAJpEItoK+98BiNIVeDXtusYnLGIg== X-Received: by 2002:a17:903:2310:: with SMTP id d16mr4452079plh.39.1644447685200; Wed, 09 Feb 2022 15:01:25 -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 l20sm21692354pfc.53.2022.02.09.15.01.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:01:24 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 6/9] exec: Define MMUAccessType in 'exec/cpu-tlb.h' header Date: Thu, 10 Feb 2022 00:00:27 +0100 Message-Id: <20220209230030.93987-7-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pj1-x102c.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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?= To reduce the inclusion of "hw/core/cpu.h", extract MMUAccessType to its own "exec/cpu-tlb.h" header. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-defs.h | 1 + include/exec/cpu-tlb.h | 16 ++++++++++++++++ include/exec/cpu_ldst.h | 1 + include/exec/exec-all.h | 3 +++ include/hw/core/cpu.h | 6 ------ include/hw/core/tcg-cpu-ops.h | 1 + target/arm/internals.h | 1 + target/mips/internal.h | 1 + target/ppc/internal.h | 2 ++ target/ppc/mmu-hash32.h | 2 ++ target/ppc/mmu-hash64.h | 2 ++ target/ppc/mmu-radix64.h | 2 ++ target/s390x/s390x-internal.h | 2 ++ 13 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 include/exec/cpu-tlb.h diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index ba3cd32a1e..c7eefb8633 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -29,6 +29,7 @@ #include "exec/hwaddr.h" #endif #include "exec/memattrs.h" +#include "exec/cpu-tlb.h" #include "hw/core/cpu.h" #include "cpu-param.h" diff --git a/include/exec/cpu-tlb.h b/include/exec/cpu-tlb.h new file mode 100644 index 0000000000..dccf91a817 --- /dev/null +++ b/include/exec/cpu-tlb.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * cpu-tlb.h: MMUAccessType definitions + * + */ + +#ifndef EXEC_CPU_TLB_H +#define EXEC_CPU_TLB_H + +typedef enum MMUAccessType { + MMU_DATA_LOAD = 0, + MMU_DATA_STORE = 1, + MMU_INST_FETCH = 2 +} MMUAccessType; + +#endif diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 5c999966de..3784316471 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -63,6 +63,7 @@ #define CPU_LDST_H #include "exec/memopidx.h" +#include "exec/cpu-tlb.h" #include "qemu/int128.h" #include "cpu.h" diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index d2cb0981f4..537f465f54 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -381,6 +381,9 @@ static inline void tlb_flush_range_by_mmuidx_all_cpus_synced(CPUState *cpu, { } #endif + +#include "exec/cpu-tlb.h" + /** * probe_access: * @env: CPUArchState diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index c9d41e4ece..0b844cbf27 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -55,12 +55,6 @@ typedef struct CPUClass CPUClass; DECLARE_CLASS_CHECKERS(CPUClass, CPU, TYPE_CPU) -typedef enum MMUAccessType { - MMU_DATA_LOAD = 0, - MMU_DATA_STORE = 1, - MMU_INST_FETCH = 2 -} MMUAccessType; - typedef struct CPUWatchpoint CPUWatchpoint; /* see tcg-cpu-ops.h */ diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h index e13898553a..2c81fff428 100644 --- a/include/hw/core/tcg-cpu-ops.h +++ b/include/hw/core/tcg-cpu-ops.h @@ -10,6 +10,7 @@ #ifndef TCG_CPU_OPS_H #define TCG_CPU_OPS_H +#include "exec/cpu-tlb.h" #include "hw/core/cpu.h" struct TCGCPUOps { diff --git a/target/arm/internals.h b/target/arm/internals.h index 3f05748ea4..4c006aa6b4 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -25,6 +25,7 @@ #ifndef TARGET_ARM_INTERNALS_H #define TARGET_ARM_INTERNALS_H +#include "exec/cpu-tlb.h" #include "hw/registerfields.h" #include "tcg/tcg-gvec-desc.h" #include "syndrome.h" diff --git a/target/mips/internal.h b/target/mips/internal.h index ac6e03e2f2..f0f885005f 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -8,6 +8,7 @@ #ifndef MIPS_INTERNAL_H #define MIPS_INTERNAL_H +#include "exec/cpu-tlb.h" #include "exec/memattrs.h" #ifdef CONFIG_TCG #include "tcg/tcg-internal.h" diff --git a/target/ppc/internal.h b/target/ppc/internal.h index 6aa9484f34..20010f53e7 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -18,6 +18,8 @@ #ifndef PPC_INTERNAL_H #define PPC_INTERNAL_H +#include "exec/cpu-tlb.h" + #define FUNC_MASK(name, ret_type, size, max_val) \ static inline ret_type name(uint##size##_t start, \ uint##size##_t end) \ diff --git a/target/ppc/mmu-hash32.h b/target/ppc/mmu-hash32.h index 3892b693d6..c6fcdebac5 100644 --- a/target/ppc/mmu-hash32.h +++ b/target/ppc/mmu-hash32.h @@ -3,6 +3,8 @@ #ifndef CONFIG_USER_ONLY +#include "exec/cpu-tlb.h" + hwaddr get_pteg_offset32(PowerPCCPU *cpu, hwaddr hash); bool ppc_hash32_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type, hwaddr *raddrp, int *psizep, int *protp, int mmu_idx, diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h index 1496955d38..002dc4aec7 100644 --- a/target/ppc/mmu-hash64.h +++ b/target/ppc/mmu-hash64.h @@ -3,6 +3,8 @@ #ifndef CONFIG_USER_ONLY +#include "exec/cpu-tlb.h" + #ifdef TARGET_PPC64 void dump_slb(PowerPCCPU *cpu); int ppc_store_slb(PowerPCCPU *cpu, target_ulong slot, diff --git a/target/ppc/mmu-radix64.h b/target/ppc/mmu-radix64.h index 4c768aa5cc..601967ae82 100644 --- a/target/ppc/mmu-radix64.h +++ b/target/ppc/mmu-radix64.h @@ -3,6 +3,8 @@ #ifndef CONFIG_USER_ONLY +#include "exec/cpu-tlb.h" + /* Radix Quadrants */ #define R_EADDR_MASK 0x3FFFFFFFFFFFFFFF #define R_EADDR_VALID_MASK 0xC00FFFFFFFFFFFFF diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index 6fc8cad2d5..b451b702d0 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -10,6 +10,8 @@ #ifndef S390X_INTERNAL_H #define S390X_INTERNAL_H +#include "exec/cpu-tlb.h" + #include "cpu.h" #ifndef CONFIG_USER_ONLY From patchwork Wed Feb 9 23:00:28 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: 12741051 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 CB26CC433EF for ; Wed, 9 Feb 2022 23:12:26 +0000 (UTC) Received: from localhost ([::1]:41336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHw8P-0006NJ-E8 for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:12:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvxy-0004UV-Of for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:41 -0500 Received: from [2607:f8b0:4864:20::429] (port=40503 helo=mail-pf1-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 1nHvxv-00037G-Rs for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:37 -0500 Received: by mail-pf1-x429.google.com with SMTP id a39so6144528pfx.7 for ; Wed, 09 Feb 2022 15:01:34 -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=794y6swXt3Be6ZeeHwqMVlaY+8MqtzyalR1LJBF3V4w=; b=M5Fe9yf4/FB6a6L3drLcZjuNvMCCKPneTEvncujVgP8JPg0tjkFUQOSfbIHXfOpIV9 ZKn9LjoHLYLpSc6xiZNsGCZlXhJeXazZfKnNvIAWEmCzOyFaNP/yLqznSenS7aGfMFIF ofi6tbrtn+WHDMp7S1zOIssuW6/wPNTCw6tbRKFLxbsUQRRATiNqt+MHBJZHws27PGJ1 T4ir8t86h3NaXo9q41+Bfhjm2VAhxrprEkGxW9oPbdkd6+GQcBG1SXj5UFQNvTcny93h qxaYPrhAFnBmOkwf2Ef6aXIl2hY6asIYn78PPFX1EXBG1Q013WzN/tGq2HbSlopjOzYe H4Vg== 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=794y6swXt3Be6ZeeHwqMVlaY+8MqtzyalR1LJBF3V4w=; b=Xy/sxWLBmcpQHiCWxyL+fxz94tJI+5VsqIlqrVnCzu3NhxBg9aftBuXSR0BM8Zzin8 tLmDZ3ibet/C9IONuEmyZCWdgK10MJA0ZrFvOoqNKqZ5P+nEuJ+uE6UZOZdyMH0x9L/4 GECU3HVLGZZer82oqeoT0zSGKebvtzQThPGwFm8by7rBvNE9rdoci/se1usHTS8LU2y0 b2jDHznhSSvcDVJxNuOmd9ZTNeglcFPNOSFE44YfsLNrExsjKxG49C8V4j3ImeOZBt9E QxuZJLtJ2cWywv4Ea1sqhXI/uC9IwyKRBBLjIqpNa4yOKOGBD60e1fIONrHiXR8Pez/y 5vog== X-Gm-Message-State: AOAM531VbAVPMkoOqd/0yiYerBQjVoSti3PrkL+z91m5tEQn3EhsF1RM CtKcjrDi3RDU5cw7AYnZdlobsXtMwoI= X-Google-Smtp-Source: ABdhPJwAA+ldiww99dndFX2psHSF4fX7wgFe6pIDcoqTpehKsSM1jSRP3oQ3Nebz0cuoZHySwlxe1g== X-Received: by 2002:a05:6a00:230e:: with SMTP id h14mr4639140pfh.10.1644447693432; Wed, 09 Feb 2022 15:01:33 -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 q8sm22475709pfl.143.2022.02.09.15.01.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:01:33 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 7/9] user: Declare target-specific prototypes in 'user/cpu-target.h' Date: Thu, 10 Feb 2022 00:00:28 +0100 Message-Id: <20220209230030.93987-8-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::429 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pf1-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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 user-mode specific prototypes from "exec/exec-all.h" to "user/cpu-target.h". Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/user-exec.c | 1 + bsd-user/elfload.c | 1 + bsd-user/main.c | 1 + bsd-user/signal.c | 1 + include/exec/exec-all.h | 41 ------------------------ include/user/cpu-target.h | 55 ++++++++++++++++++++++++++++++++ linux-user/aarch64/cpu_loop.c | 1 + linux-user/alpha/cpu_loop.c | 1 + linux-user/arm/cpu_loop.c | 1 + linux-user/arm/signal.c | 1 + linux-user/cris/cpu_loop.c | 1 + linux-user/elfload.c | 1 + linux-user/hexagon/cpu_loop.c | 1 + linux-user/hppa/cpu_loop.c | 1 + linux-user/hppa/signal.c | 1 + linux-user/i386/cpu_loop.c | 1 + linux-user/linuxload.c | 1 + linux-user/m68k/cpu_loop.c | 1 + linux-user/main.c | 1 + linux-user/microblaze/cpu_loop.c | 1 + linux-user/mips/cpu_loop.c | 1 + linux-user/mmap.c | 1 + linux-user/nios2/cpu_loop.c | 1 + linux-user/openrisc/cpu_loop.c | 1 + linux-user/ppc/cpu_loop.c | 1 + linux-user/ppc/signal.c | 1 + linux-user/riscv/cpu_loop.c | 1 + linux-user/s390x/cpu_loop.c | 1 + linux-user/sh4/cpu_loop.c | 1 + linux-user/signal.c | 1 + linux-user/sparc/cpu_loop.c | 1 + linux-user/syscall.c | 1 + linux-user/uaccess.c | 1 + linux-user/xtensa/cpu_loop.c | 1 + 34 files changed, 87 insertions(+), 41 deletions(-) create mode 100644 include/user/cpu-target.h diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 6f5d4933f0..c05bd84f1b 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -28,6 +28,7 @@ #include "qemu/atomic128.h" #include "trace/trace-root.h" #include "tcg/tcg-ldst.h" +#include "user/cpu-target.h" #include "internal.h" __thread uintptr_t helper_retaddr; diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 142a5bfac2..d64b0de0f4 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu.h" +#include "user/cpu-target.h" #include "disas/disas.h" #include "qemu/path.h" diff --git a/bsd-user/main.c b/bsd-user/main.c index f1d58e905e..93f7851fdd 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -47,6 +47,7 @@ #include "trace/control.h" #include "crypto/init.h" #include "qemu/guest-random.h" +#include "user/cpu-target.h" #include "host-os.h" #include "target_arch_cpu.h" diff --git a/bsd-user/signal.c b/bsd-user/signal.c index 8a36b696d8..15af69c509 100644 --- a/bsd-user/signal.c +++ b/bsd-user/signal.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qemu.h" +#include "user/cpu-target.h" #include "signal-common.h" #include "trace.h" #include "hw/core/tcg-cpu-ops.h" diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 537f465f54..e8f14b6844 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -649,47 +649,6 @@ static inline tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env, */ MMUAccessType adjust_signal_pc(uintptr_t *pc, bool is_write); -/** - * handle_sigsegv_accerr_write: - * @cpu: the cpu context - * @old_set: the sigset_t from the signal ucontext_t - * @host_pc: the host pc, adjusted for the signal - * @host_addr: the host address of the fault - * - * Return true if the write fault has been handled, and should be re-tried. - */ -bool handle_sigsegv_accerr_write(CPUState *cpu, sigset_t *old_set, - uintptr_t host_pc, abi_ptr guest_addr); - -/** - * cpu_loop_exit_sigsegv: - * @cpu: the cpu context - * @addr: the guest address of the fault - * @access_type: access was read/write/execute - * @maperr: true for invalid page, false for permission fault - * @ra: host pc for unwinding - * - * Use the TCGCPUOps hook to record cpu state, do guest operating system - * specific things to raise SIGSEGV, and jump to the main cpu loop. - */ -void QEMU_NORETURN cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr, - MMUAccessType access_type, - bool maperr, uintptr_t ra); - -/** - * cpu_loop_exit_sigbus: - * @cpu: the cpu context - * @addr: the guest address of the alignment fault - * @access_type: access was read/write/execute - * @ra: host pc for unwinding - * - * Use the TCGCPUOps hook to record cpu state, do guest operating system - * specific things to raise SIGBUS, and jump to the main cpu loop. - */ -void QEMU_NORETURN cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr, - MMUAccessType access_type, - uintptr_t ra); - #else static inline void mmap_lock(void) {} static inline void mmap_unlock(void) {} diff --git a/include/user/cpu-target.h b/include/user/cpu-target.h new file mode 100644 index 0000000000..e621fb9f3d --- /dev/null +++ b/include/user/cpu-target.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * cpu-target.h: user-mode target-specific execution prototypes + * + */ + +#ifndef USER_CPU_TARGET_H +#define USER_CPU_TARGET_H + +#include "exec/cpu-tlb.h" +#include "exec/cpu_ldst.h" /* abi_ptr */ + +/** + * handle_sigsegv_accerr_write: + * @cpu: the cpu context + * @old_set: the sigset_t from the signal ucontext_t + * @host_pc: the host pc, adjusted for the signal + * @host_addr: the host address of the fault + * + * Return true if the write fault has been handled, and should be re-tried. + */ +bool handle_sigsegv_accerr_write(CPUState *cpu, sigset_t *old_set, + uintptr_t host_pc, abi_ptr guest_addr); + +/** + * cpu_loop_exit_sigsegv: + * @cpu: the cpu context + * @addr: the guest address of the fault + * @access_type: access was read/write/execute + * @maperr: true for invalid page, false for permission fault + * @ra: host pc for unwinding + * + * Use the TCGCPUOps hook to record cpu state, do guest operating system + * specific things to raise SIGSEGV, and jump to the main cpu loop. + */ +void QEMU_NORETURN cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr, + MMUAccessType access_type, + bool maperr, uintptr_t ra); + +/** + * cpu_loop_exit_sigbus: + * @cpu: the cpu context + * @addr: the guest address of the alignment fault + * @access_type: access was read/write/execute + * @ra: host pc for unwinding + * + * Use the TCGCPUOps hook to record cpu state, do guest operating system + * specific things to raise SIGBUS, and jump to the main cpu loop. + */ +void QEMU_NORETURN cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr, + MMUAccessType access_type, + uintptr_t ra); + + +#endif diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c index 1737e2ea65..ce19e2cf7a 100644 --- a/linux-user/aarch64/cpu_loop.c +++ b/linux-user/aarch64/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/alpha/cpu_loop.c b/linux-user/alpha/cpu_loop.c index de6e0c901c..735603f6f1 100644 --- a/linux-user/alpha/cpu_loop.c +++ b/linux-user/alpha/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 032e1ffddf..268e19cbca 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "elf.h" #include "cpu_loop-common.h" diff --git a/linux-user/arm/signal.c b/linux-user/arm/signal.c index cf99fd7b8a..0cec11ebe4 100644 --- a/linux-user/arm/signal.c +++ b/linux-user/arm/signal.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/cris/cpu_loop.c b/linux-user/cris/cpu_loop.c index 0f46b3c1a8..a70b93203c 100644 --- a/linux-user/cris/cpu_loop.c +++ b/linux-user/cris/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 99829faf89..0f5df23aee 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -6,6 +6,7 @@ #include #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "signal-common.h" #include "loader.h" diff --git a/linux-user/hexagon/cpu_loop.c b/linux-user/hexagon/cpu_loop.c index 0d73934d31..c167da2474 100644 --- a/linux-user/hexagon/cpu_loop.c +++ b/linux-user/hexagon/cpu_loop.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index a576d1a249..ebec350047 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/hppa/signal.c b/linux-user/hppa/signal.c index 962f551c04..17dbb96f07 100644 --- a/linux-user/hppa/signal.c +++ b/linux-user/hppa/signal.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/i386/cpu_loop.c b/linux-user/i386/cpu_loop.c index 90bffc1956..425b898590 100644 --- a/linux-user/i386/cpu_loop.c +++ b/linux-user/i386/cpu_loop.c @@ -21,6 +21,7 @@ #include "qemu-common.h" #include "qemu.h" #include "qemu/timer.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c index 2ed5fc45ed..e7312be184 100644 --- a/linux-user/linuxload.c +++ b/linux-user/linuxload.c @@ -2,6 +2,7 @@ #include "qemu/osdep.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "loader.h" diff --git a/linux-user/m68k/cpu_loop.c b/linux-user/m68k/cpu_loop.c index 928a18e3cf..2aec60da0d 100644 --- a/linux-user/m68k/cpu_loop.c +++ b/linux-user/m68k/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/main.c b/linux-user/main.c index 16def5215d..e318dcfcf8 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -30,6 +30,7 @@ #include "qapi/error.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "qemu/path.h" #include "qemu/queue.h" diff --git a/linux-user/microblaze/cpu_loop.c b/linux-user/microblaze/cpu_loop.c index 1a2556be2c..3023e5691b 100644 --- a/linux-user/microblaze/cpu_loop.c +++ b/linux-user/microblaze/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 9bb12a07ba..10292a9c40 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux-user/mips/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/mmap.c b/linux-user/mmap.c index c125031b90..1849bac128 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -20,6 +20,7 @@ #include "trace.h" #include "exec/log.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "user-mmap.h" diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c index 1e93ef34e6..f10c28f965 100644 --- a/linux-user/nios2/cpu_loop.c +++ b/linux-user/nios2/cpu_loop.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/openrisc/cpu_loop.c b/linux-user/openrisc/cpu_loop.c index 7683bea064..137889d7e0 100644 --- a/linux-user/openrisc/cpu_loop.c +++ b/linux-user/openrisc/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c index ffe39851ed..252ee8efbf 100644 --- a/linux-user/ppc/cpu_loop.c +++ b/linux-user/ppc/cpu_loop.c @@ -21,6 +21,7 @@ #include "qemu-common.h" #include "qemu.h" #include "qemu/timer.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c index 176c9d8503..541d70b410 100644 --- a/linux-user/ppc/signal.c +++ b/linux-user/ppc/signal.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c index 26d446f323..2712f2c675 100644 --- a/linux-user/riscv/cpu_loop.c +++ b/linux-user/riscv/cpu_loop.c @@ -21,6 +21,7 @@ #include "qemu-common.h" #include "qemu/error-report.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/s390x/cpu_loop.c b/linux-user/s390x/cpu_loop.c index 7901dfe6f5..37d05f127e 100644 --- a/linux-user/s390x/cpu_loop.c +++ b/linux-user/s390x/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c index 1bd313cb19..bd52b3be93 100644 --- a/linux-user/sh4/cpu_loop.c +++ b/linux-user/sh4/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/signal.c b/linux-user/signal.c index 32854bb375..c36f7669ad 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -25,6 +25,7 @@ #include #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "strace.h" #include "loader.h" diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index baf3d9ae01..506d4b49f0 100644 --- a/linux-user/sparc/cpu_loop.c +++ b/linux-user/sparc/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5950222a77..2cc17c8617 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -127,6 +127,7 @@ #include "uname.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "strace.h" #include "signal-common.h" diff --git a/linux-user/uaccess.c b/linux-user/uaccess.c index 425cbf677f..99234c52a0 100644 --- a/linux-user/uaccess.c +++ b/linux-user/uaccess.c @@ -1,6 +1,7 @@ /* User memory access */ #include "qemu/osdep.h" #include "qemu/cutils.h" +#include "user/cpu-target.h" #include "qemu.h" #include "user-internals.h" diff --git a/linux-user/xtensa/cpu_loop.c b/linux-user/xtensa/cpu_loop.c index d51ce05392..829659297b 100644 --- a/linux-user/xtensa/cpu_loop.c +++ b/linux-user/xtensa/cpu_loop.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu.h" +#include "user/cpu-target.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" From patchwork Wed Feb 9 23:00:29 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: 12741057 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 2D97AC433EF for ; Wed, 9 Feb 2022 23:16:47 +0000 (UTC) Received: from localhost ([::1]:49068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHwCa-0003GW-Ch for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:16:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvy6-0004ba-L8 for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:47 -0500 Received: from [2607:f8b0:4864:20::631] (port=38640 helo=mail-pl1-x631.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHvy3-00039B-5h for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:01:45 -0500 Received: by mail-pl1-x631.google.com with SMTP id c3so252528pls.5 for ; Wed, 09 Feb 2022 15:01: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=DoZtfPkMyT0ZEPfoTcE8wTfI0Jmyll7QV/yvybhBFT0=; b=p8NcTPyKK2ug2tPawOp3yY11LuWetq/YwNU5y9ZZMXN4slmubqRICcWKCwtt2lpbZ6 hjiY2dQapRpxcpl4KyLy1oCSBOzZ7AbZ/iFBkcrGHtItBiz8Vve5K16LVbh0jvk1TWMz Gakwy7cTbeLllQTEsWAIHtzVGdzKqiv7ZL3B8mQCMHrz8t/LxzCaURPcukO2LsuvOgpG +QxfyYKLuAL4uuwG3NgpmGEXopkERiQSTCjRRxOvszeDx6/3V6YkcFIzJLWx/nxu29Rn QX/6vIVKPy2BXLDIcW5OpDznZH6hhshkBieVSllfMXpf5gRok0tCe6+cIgBrgkxll3Tz UYHQ== 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=DoZtfPkMyT0ZEPfoTcE8wTfI0Jmyll7QV/yvybhBFT0=; b=M5j569wjiCssvIPb9VR19J2W3vYHYoK0nZxxsrDMUea9Rp/lsNeqUfzCgVpGv7DznV JulM9YhHNymnNd9WR5skgPONd2umRhIF0J1P5HenCJQyfnvNW/pDiPgjwVYPN2VJbCF1 zYbBNW2RhYXlzaoteTiZuFK6jAnAWb2YIRgxR+EuQH8LNR0cu/WNa6+V0/yWmgtC8fyX Nw84lD/HlCdraACKCNRpEoKp/1C9OrJaIVVMxwCmFa+DAVxPXCEM5iher+GjnPWzzzdj +54RyoZhDmN5Bg/QTwZQ4uhAziYvpMQYiXyJTBAotdcIHfEGcP39gPKP/BeJag+YjdDw EDSg== X-Gm-Message-State: AOAM531kx1VkaUAA8HD6w2TcaD1qw65ie1JOjtMNENusDixQVPBi0MW4 8KxythcIrXaEI+UlOeXCy2Gay2ScWBE= X-Google-Smtp-Source: ABdhPJwxdeI/DJVXaLkoMJR2pFKCcIScnbMj+UaWbOo3XTYZRc8GdcjaFMmB72+GLotYGzOfTMevvw== X-Received: by 2002:a17:90a:1984:: with SMTP id 4mr4299239pji.197.1644447701546; Wed, 09 Feb 2022 15:01: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 oj5sm2728731pjb.29.2022.02.09.15.01.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:01:41 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 8/9] user: Declare target-agnostic prototypes in 'user/cpu-common.h' Date: Thu, 10 Feb 2022 00:00:29 +0100 Message-Id: <20220209230030.93987-9-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::631 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pl1-x631.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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 user-mode common prototypes from "exec/exec-all.h" to "user/cpu-common.h". Signed-off-by: Philippe Mathieu-Daudé --- bsd-user/qemu.h | 2 -- include/exec/cpu-all.h | 3 +-- include/exec/exec-all.h | 10 ---------- include/user/cpu-common.h | 36 ++++++++++++++++++++++++++++++++++++ include/user/cpu-target.h | 1 + linux-user/exit.c | 3 +-- linux-user/user-internals.h | 10 ---------- 7 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 include/user/cpu-common.h diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 2f67776b0b..afaf94412e 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -182,8 +182,6 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6); void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2); -extern __thread CPUState *thread_cpu; -void cpu_loop(CPUArchState *env); char *target_strerror(int err); int get_osversion(void); void fork_start(void); diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 08b2894274..e9cf20560f 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -296,9 +296,8 @@ void *page_alloc_target_data(target_ulong address, size_t size); * at @address, as per page_alloc_target_data. */ void *page_get_target_data(target_ulong address); -#endif -CPUArchState *cpu_copy(CPUArchState *env); +#endif /* CONFIG_USER_ONLY */ /* Flags for use in ENV->INTERRUPT_PENDING. diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index e8f14b6844..545cc16a67 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -639,16 +639,6 @@ static inline tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env, return addr; } -/** - * adjust_signal_pc: - * @pc: raw pc from the host signal ucontext_t. - * @is_write: host memory operation was write, or read-modify-write. - * - * Alter @pc as required for unwinding. Return the type of the - * guest memory access -- host reads may be for guest execution. - */ -MMUAccessType adjust_signal_pc(uintptr_t *pc, bool is_write); - #else static inline void mmap_lock(void) {} static inline void mmap_unlock(void) {} diff --git a/include/user/cpu-common.h b/include/user/cpu-common.h new file mode 100644 index 0000000000..267acb143a --- /dev/null +++ b/include/user/cpu-common.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * cpu-target.h: user-mode target-agnostic execution prototypes + * + */ + +#ifndef USER_CPU_COMMON_H +#define USER_CPU_COMMON_H + +#include "exec/cpu-tlb.h" + +extern __thread CPUState *thread_cpu; + +/** + * adjust_signal_pc: + * @pc: raw pc from the host signal ucontext_t. + * @is_write: host memory operation was write, or read-modify-write. + * + * Alter @pc as required for unwinding. Return the type of the + * guest memory access -- host reads may be for guest execution. + */ +MMUAccessType adjust_signal_pc(uintptr_t *pc, bool is_write); + +void QEMU_NORETURN cpu_loop(CPUArchState *env); + +CPUArchState *cpu_copy(CPUArchState *env); + +/** + * preexit_cleanup: housekeeping before the guest exits + * + * env: the CPU state + * code: the exit code + */ +void preexit_cleanup(CPUArchState *env, int code); + +#endif diff --git a/include/user/cpu-target.h b/include/user/cpu-target.h index e621fb9f3d..4fbdb35fa4 100644 --- a/include/user/cpu-target.h +++ b/include/user/cpu-target.h @@ -9,6 +9,7 @@ #include "exec/cpu-tlb.h" #include "exec/cpu_ldst.h" /* abi_ptr */ +#include "user/cpu-common.h" /** * handle_sigsegv_accerr_write: diff --git a/linux-user/exit.c b/linux-user/exit.c index 10989f17f8..2c8a8dd75d 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -19,8 +19,7 @@ #include "qemu/osdep.h" #include "qemu/plugin.h" #include "exec/gdbstub.h" -#include "qemu.h" -#include "user-internals.h" +#include "user/cpu-common.h" #ifdef CONFIG_GPROF #include #endif diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h index 4d0f682aea..d17f3c9300 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h @@ -63,8 +63,6 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8); -extern __thread CPUState *thread_cpu; -void QEMU_NORETURN cpu_loop(CPUArchState *env); const char *target_strerror(int err); int get_osversion(void); void init_qemu_uname_release(void); @@ -166,14 +164,6 @@ static inline int regpairs_aligned(void *cpu_env, int num) { return 1; } static inline int regpairs_aligned(void *cpu_env, int num) { return 0; } #endif -/** - * preexit_cleanup: housekeeping before the guest exits - * - * env: the CPU state - * code: the exit code - */ -void preexit_cleanup(CPUArchState *env, int code); - /* * Include target-specific struct and function definitions; * they may need access to the target-independent structures From patchwork Wed Feb 9 23:00:30 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: 12741055 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 9A9F1C433EF for ; Wed, 9 Feb 2022 23:13:53 +0000 (UTC) Received: from localhost ([::1]:43234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHw9o-0007dQ-Ky for qemu-devel@archiver.kernel.org; Wed, 09 Feb 2022 18:13:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvyT-0004ik-Qs for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:02:09 -0500 Received: from [2607:f8b0:4864:20::634] (port=45893 helo=mail-pl1-x634.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHvyM-0003Dc-M8 for qemu-devel@nongnu.org; Wed, 09 Feb 2022 18:02:08 -0500 Received: by mail-pl1-x634.google.com with SMTP id w20so233787plq.12 for ; Wed, 09 Feb 2022 15:01:50 -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=7llCYmEtdzunbAQvJPeBYUb+uBMoKX2xk3BFF/zNgZs=; b=Bn3FQPR8yons6EvT97LjHdEEvP7sLz75A9c/P6Y7scwvM+y58c5aBrxX88IRq7T9OQ N57ViVcnLFr+8JFm3o92wUyTP2ZNrLTAcJTlVHBSNgzhx2Aaev5LW4gMzMpWYUdTkzXG xjut2em/jAMnbamBPYn5a9gMc6m8r3vHlnkR36s+rtgQwN+2jT0YNUIToh51Owz4CWtl RQVRzIPU9xU8keSSVxh9JFWL02g8Qy+WXNTYoD9TP/XJbNGQClybcAWDMltYGWF1qufX U6sVee6ktYwbE573FWLc4503UCqrhcKlU6SjUxObnIlQp4THSepmZQafdIdcta26CGmY TUxA== 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=7llCYmEtdzunbAQvJPeBYUb+uBMoKX2xk3BFF/zNgZs=; b=FgO+7dUbbOcITysWcWR3DezerdXomDY65iTsPQ5bV9Hc8CKbYAXlAlj8RuLGhkYY4P GbIq0533PhfmtvINcMqafVmHcGRJPBWu3O2defgZ3D5erxkFx0n/XthLuOuv228zhhni VrQEQ3l5ZZYB8VvNMPQtU2YVNCQOy8a7ABySEXAZzu+SH/y9t2MqKaHT7iEesEyqNP99 AzSFnAMBMXhbyxtBBtNlW5s9I2AyLw0HK7UuGnvsVTrgtL5gDzzFtDHz70gLZHi2q8Rt yvdPEyLCoFkAVN2XgyQjk22+H8ZqlTvUbAxcNr6ev0j4MCopd992S86yDy0P6qn85NdE gv5w== X-Gm-Message-State: AOAM532vyn7nFEZlE+7xepxzmcbjs+rqkrLGKqJkUYS+KB2mADI2T/ys EuEZSO3TJFoxjXK5NmR1hPmZ7naYbRY= X-Google-Smtp-Source: ABdhPJzGOhEJBlKtFj5zDcwvRnmOI1DLBylx22QGLuxcEvhIwQPd6VMvwaem3gNKA9Xkf4kr6cqLSg== X-Received: by 2002:a17:90a:d343:: with SMTP id i3mr6108692pjx.104.1644447709623; Wed, 09 Feb 2022 15:01:49 -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 q2sm14907780pgt.47.2022.02.09.15.01.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 09 Feb 2022 15:01:49 -0800 (PST) To: qemu-devel@nongnu.org Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 9/9] user: Share preexit_cleanup() with linux and bsd implementations Date: Thu, 10 Feb 2022 00:00:30 +0100 Message-Id: <20220209230030.93987-10-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209230030.93987-1-f4bug@amsat.org> References: <20220209230030.93987-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::634 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pl1-x634.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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?= preexit_cleanup() is not Linux specific, move it to common-user/. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- {linux-user => common-user}/exit.c | 0 common-user/meson.build | 1 + linux-user/meson.build | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename {linux-user => common-user}/exit.c (100%) diff --git a/linux-user/exit.c b/common-user/exit.c similarity index 100% rename from linux-user/exit.c rename to common-user/exit.c diff --git a/common-user/meson.build b/common-user/meson.build index 26212dda5c..7204f8bd61 100644 --- a/common-user/meson.build +++ b/common-user/meson.build @@ -1,6 +1,7 @@ common_user_inc += include_directories('host/' / host_arch) user_ss.add(files( + 'exit.c', 'safe-syscall.S', 'safe-syscall-error.c', )) diff --git a/linux-user/meson.build b/linux-user/meson.build index de4320af05..25756a2518 100644 --- a/linux-user/meson.build +++ b/linux-user/meson.build @@ -9,7 +9,6 @@ common_user_inc += include_directories('include') linux_user_ss.add(files( 'elfload.c', - 'exit.c', 'fd-trans.c', 'linuxload.c', 'main.c',