From nobody Sat Feb 7 05:26:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) client-ip=209.85.128.49; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f49.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1621249890; cv=none; d=zohomail.com; s=zohoarc; b=gk/29I1CRpNAvTAw5pk01xXv8voArbhASypBLYTlrn+x+Bc4bM8F+ljvTtatMus8mLhdOZ1tRDY2s7d9TfjT5+k4hKO8HWYOgOWhKyNCuA6bX0Pe94JqHnbJxm1BDnExWFEd3yH9GDDlKCfUboxBTPk2vev9WJixJT8sq31qxDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621249890; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KsOd4cFGdpWMT1est35/VbB1+PKurYa2ah3FsZXq+ZU=; b=n79k+atHFh6zOpZgpEYopI5k4xqwhlUOp86yOQ6aiYb5rtntAjV3tEZ6n0CU8ZM8bxn3rvqj7E/efnkuHMYeMsjruewwh35KU3CvH0JKHOGJa7luSi9CCC7xWtJKdOTnUcxlNTV+C+qHn2pU7DplU+Q/a9KwyqF9CoqUNatgI6Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.zohomail.com with SMTPS id 162124989017555.81274477133729; Mon, 17 May 2021 04:11:30 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id y184-20020a1ce1c10000b02901769b409001so1946473wmg.3 for ; Mon, 17 May 2021 04:11:29 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id 6sm16234139wry.60.2021.05.17.04.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KsOd4cFGdpWMT1est35/VbB1+PKurYa2ah3FsZXq+ZU=; b=UosgpI6v/evula3iHdrKnoUMdOyBKCaZghtIgUeBSXIoI49UE93NT09csovTgeRQyt CL1Bhz8kOoYJouRrQKxVCAqhDa+iINdbY3c7aYpQV+bJniVE7Gcf+OtPTuDZfjdpoqts eFOcbPAg6XAIpLEy/mM1O953dJACMzpXRkIXYXvEfA7GUrIKzWm8hd+SDB+1e7mbcbnf C75X+iBUI5MC2v4o4lTq0xzCzABR2H6La8CWK3joEwQaL+cL9quSQXQhP0Ibal9wlXeJ yGQAkfdWq6+YdzprK8CYiqbDrFhPAqhnxDg4uU/xc+ni6lM6a8NmSJmUhZcTbIIEmW0A eIrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KsOd4cFGdpWMT1est35/VbB1+PKurYa2ah3FsZXq+ZU=; b=QYwqll0p/gczRA0OKeCt/iyn/BDJmG60TyEDE1aNcbbYBO8BpAT2dj7WO6f8Oh0jqp NLc3MiZOL7+UPUh6F9m8WH7I62+6rqfPZy91myGhPmjHoqR9oBRy/b9PD5flMy8dy2nI PcRq0fdYNncNyhqSOTh/99z3F5Kn1BLFDXlWN9ktPVzhJ2eYk48MmDfWWcrrxOp6q9In /tEv7wJ+5gvc2lwnE/QRu+SoQlfYEnffY3VrBXILX0Qjt6QZ02pQFJlY3v2FchKCkdTj wMqDuXZ7xBEMxKZxaoPXVHryX7PrJqMhX4+ZV+V1f0oysKPtkUBzQYV5ThNjPvCwuwJ7 /orQ== X-Gm-Message-State: AOAM533NGgS27Qy3cPLiJdCleHnJ4ycm+wjrcGrvOuoiUgwB7Y4QI8d+ JZ1hoEJksUK5uJRrJ6/tr0Y= X-Google-Smtp-Source: ABdhPJzEHqkIAhICNMdGYAVyEbl8cbr1w2U5cmscVYs3PFaUcNOGNhBllSO5ZhIrwLmibIyJAdQLvw== X-Received: by 2002:a1c:5582:: with SMTP id j124mr28476733wmb.0.1621249888171; Mon, 17 May 2021 04:11:28 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Claudio Fontana , Laurent Vivier , Paolo Bonzini , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 03/11] exec: Restrict cputlb.h to sysemu/ Date: Mon, 17 May 2021 13:11:03 +0200 Message-Id: <20210517111111.1068153-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) To make it clearer the cputlb.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/cputlb.h,exec/sysemu/cputlb.h, $(git grep -l exec/cputlb.= h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/{ =3D> sysemu}/cputlb.h | 11 +++++++---- accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 6 +++--- MAINTAINERS | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) rename include/exec/{ =3D> sysemu}/cputlb.h (86%) diff --git a/include/exec/cputlb.h b/include/exec/sysemu/cputlb.h similarity index 86% rename from include/exec/cputlb.h rename to include/exec/sysemu/cputlb.h index 19b16e58f84..5a37a870343 100644 --- a/include/exec/cputlb.h +++ b/include/exec/sysemu/cputlb.h @@ -17,15 +17,18 @@ * License along with this library; if not, see . */ =20 -#ifndef CPUTLB_H -#define CPUTLB_H +#ifndef EXEC_SYSEMU_CPUTLB_H +#define EXEC_SYSEMU_CPUTLB_H + +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif =20 #include "exec/cpu-common.h" =20 -#if !defined(CONFIG_USER_ONLY) /* cputlb.c */ void tlb_protect_code(ram_addr_t ram_addr); void tlb_unprotect_code(ram_addr_t ram_addr); void tlb_flush_counts(size_t *full, size_t *part, size_t *elide); -#endif + #endif diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 84e7d91a5ca..452029e8193 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -23,7 +23,7 @@ #include "exec/exec-all.h" #include "exec/memory.h" #include "exec/cpu_ldst.h" -#include "exec/cputlb.h" +#include "exec/sysemu/cputlb.h" #include "exec/tb-hash.h" #include "exec/memory-internal.h" #include "exec/ram_addr.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index ae7e873713a..98a07ce4e4e 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -42,11 +42,11 @@ #include #endif #endif -#else +#else /* !CONFIG_USER_ONLY */ +#include "exec/sysemu/cputlb.h" #include "exec/ram_addr.h" -#endif +#endif /* CONFIG_USER_ONLY */ =20 -#include "exec/cputlb.h" #include "exec/tb-hash.h" #include "exec/translate-all.h" #include "qemu/bitmap.h" diff --git a/MAINTAINERS b/MAINTAINERS index f1ae9934349..4378ec47a2c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -131,6 +131,7 @@ F: include/exec/helper*.h F: include/exec/tb-hash.h F: include/exec/sysemu/hwaddr.h F: include/sysemu/cpus.h +F: include/exec/sysemu/cputlb.h F: include/sysemu/tcg.h F: include/hw/core/tcg-cpu-ops.h =20 --=20 2.26.3