From patchwork Sun Sep 25 10:51:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 609131 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1268253pvb; Sun, 25 Sep 2022 03:59:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5EfREYvlZmOH8t33XzGG4XYCDUPZGZ1pdSBImwubCz+j0oZT01Kr6LwOLJce4pFmIzLeay X-Received: by 2002:a05:622a:1213:b0:35c:c7e3:441f with SMTP id y19-20020a05622a121300b0035cc7e3441fmr13930466qtx.244.1664103544343; Sun, 25 Sep 2022 03:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664103544; cv=none; d=google.com; s=arc-20160816; b=Rm4Q0UACMPGVGOgfhCjKDpKDa/Z077TY6Y+DNf+qqsXG+3BfAka3gnwgt+GjYHMi5O zmnKvitD+9hhLTRyECQ3ou5Z73f2L8kW3sHsRk4O57RlUVjMo0C0BvZ+0bpdcFQA1zlP heODEu8pCZ/aYc07djKYKJpB/9HiXVE2aG00Flx+5jGTdeTk/rGfSZv1LQNVVOUg0fsG Almoz5A3myyk2Fvc/pDu15y1+DZsmkcnwZ7jCpFmjOgM+69Gy/Tjyfi+hu6xaScoHpZ2 4rbXcm0I0Q30z+P2rgRnF0RoQGkiqckLEfUz/4c07oTcO3Vgtl0lpxGyWR1ACZGr9Jiw 3hHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SeIr0TcoiSWdEtUQ0CBed/Veb3zjAFGhK3Fx7VZ92YQ=; b=mk8cireWpXJx6Rslkq8EKGLLpcUKoJqo+BSUK5KOkeVcUvQnSLA7Fj3j5LgjUtxbS9 QoAFPmajZLWtQSL7fsado4JzsFS5bj6gJ9wAStu41VOhsXkk1nNdUhqc59BhLX3O46Qk iv/Zly9bTamX56w3Q+WDFaWGQpqALK7Jtoi+dcONXh30wPP2EMYR6OnlZPSMNL0rb+4G EyxFCFbP5iMaHmYxtkImclm3qpGijPZNTI6rnPwANE3+H3CyT+AuWTGXwlzLskPH7uai QgAYCStJnxVwU2xcR/mfdanFtFnLcO4qOFjCXFx8axXf8pgGuOoekMPXvLByeaH/Ijrt ZBww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=emXdrSMp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q11-20020ad45cab000000b004a85378abb9si7318109qvh.425.2022.09.25.03.59.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Sep 2022 03:59:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=emXdrSMp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocPLj-0008Uq-RB for patch@linaro.org; Sun, 25 Sep 2022 06:59:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocPEo-0002jB-1h for qemu-devel@nongnu.org; Sun, 25 Sep 2022 06:51:54 -0400 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:42796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocPEm-0000MU-JS for qemu-devel@nongnu.org; Sun, 25 Sep 2022 06:51:53 -0400 Received: by mail-qt1-x832.google.com with SMTP id w2so2590635qtv.9 for ; Sun, 25 Sep 2022 03:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=SeIr0TcoiSWdEtUQ0CBed/Veb3zjAFGhK3Fx7VZ92YQ=; b=emXdrSMpB13C3cBcTgMjZWBH4CBMs+We1f3GAUIN5KrjZ2u+MgHJo5eWfsoUYe9g40 FhGfzvOjURrB6KO85Y1fTW14YMrpJStPpcx3UIefxQ1b3LFLb+tDun/U1/ivifbJADv9 boPKdmfvJ4sEYGcwqexn2IGJ/Rs+ic/1jr0SE7zn2A33iRPbqgRCQEsN1XdjwkqxtxiP 7zQQjcm886ntbjuJEK7Slbsm0UcSE16sDwurgsFva5DbR/SnHhnWfzBDXmaulxZ1gtPb FL0n+/44r/C0xkFWUaKy54cx7BOFsbNzoS8XKpjxJpRC4qBb/9Z3CYZpc7fsYC5DOHDD xXWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=SeIr0TcoiSWdEtUQ0CBed/Veb3zjAFGhK3Fx7VZ92YQ=; b=q+DdLJpyhuyeHhZCajjcY8R9pRyrkYy5l9YDm0WccJuSOWjvKW6aeAzAf2e1OmiEm7 hS5GimK7JX/EofDHNxFv+I7DTJ2l1//WeohpnmmJkBpPvk2wmMxUGYp8zBrHR5MdaL2v /CZDUtdWqXlLRRArZgdnDlj789V5Jf99QWSdJcHKD3YDA2ARPsxelY0rk5rfE9WQedTe 5G8JmmHZqgqmQHmP5BL9On8OsAtZvBtgzF9J01Zr/pEEgOFZYDbHOPP1yg/lfOszHLf5 sLpO81jOGgfY7S2ONhZd5eEL+J7ybnt4w9fcniR4Xshb+drXkuEDcUE7RBIS1pSTVqxO gsng== X-Gm-Message-State: ACrzQf0bFsNfcsH/x7jhpkQ+OWx6yflr3xgroacvwQffEEOeS4aezxyG 50xNWRlDJM/0oQCnFWtpGSpiIaDdn6En+Q== X-Received: by 2002:a05:622a:1002:b0:35b:baaf:24bb with SMTP id d2-20020a05622a100200b0035bbaaf24bbmr14036866qte.85.1664103111723; Sun, 25 Sep 2022 03:51:51 -0700 (PDT) Received: from stoup.. ([2605:ef80:80a9:5c0e:1ec2:d482:4986:8538]) by smtp.gmail.com with ESMTPSA id u15-20020a05620a0c4f00b006cf19068261sm10061132qki.116.2022.09.25.03.51.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 03:51:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= Subject: [PATCH v5 06/17] include/exec: Introduce TARGET_PAGE_ENTRY_EXTRA Date: Sun, 25 Sep 2022 10:51:13 +0000 Message-Id: <20220925105124.82033-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220925105124.82033-1-richard.henderson@linaro.org> References: <20220925105124.82033-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x832.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Allow the target to cache items from the guest page tables. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- include/exec/cpu-defs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 5e12cc1854..67239b4e5e 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -163,6 +163,15 @@ typedef struct CPUTLBEntryFull { /* @lg_page_size contains the log2 of the page size. */ uint8_t lg_page_size; + + /* + * Allow target-specific additions to this structure. + * This may be used to cache items from the guest cpu + * page tables for later use by the implementation. + */ +#ifdef TARGET_PAGE_ENTRY_EXTRA + TARGET_PAGE_ENTRY_EXTRA +#endif } CPUTLBEntryFull; /*