From nobody Tue Feb 10 03:38:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1571319499; cv=none; d=zoho.com; s=zohoarc; b=oJsKYUa8LqjxCIYjU2SKZq1qPcXoorpzRMHM2NxP8IZ8AZEeSxVIfrj8HN/ZiVY8OR7irwjlQWJtQj244cW6tJOfgftPu8m0ao1G7rJCD3HCaUQ1GfAQRetplBrptm/Ei+f7YUmaztd9bLs9azGEJGXc2FnMmeyMn6QxdZolxL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571319499; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=K+1mXE6c26sJ05xL/OiaWYUlLkihUxvX+Cms6fDNZy0=; b=a1NQOrnu7zpxKdoxXE5Ft7K7tZSP8dYjAd3jum3vXxdX2QoIJDRhJ088E+1ALhtd+IZv/Msw2jfopMeXJwbnIcq+uibx//AQKBmhECE+O8xBtzuPaHoe04XEpqvabkC1znim336TNE6jXa507o4fDVLQjX9MQRqoFIfaL9DpR1s= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571319499008201.03255940177962; Thu, 17 Oct 2019 06:38:19 -0700 (PDT) Received: from localhost ([::1]:48068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL5yr-0008Dl-I8 for importer@patchew.org; Thu, 17 Oct 2019 09:38:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33952) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL5dj-000864-U6 for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iL5di-0005TT-KS for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:16:27 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:54842) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iL5di-0005T8-Dp for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:16:26 -0400 Received: by mail-wm1-x342.google.com with SMTP id p7so2527895wmp.4 for ; Thu, 17 Oct 2019 06:16:26 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u26sm2387029wrd.87.2019.10.17.06.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 06:16:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C2A261FF9A; Thu, 17 Oct 2019 14:16:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K+1mXE6c26sJ05xL/OiaWYUlLkihUxvX+Cms6fDNZy0=; b=skQ4kprBFAkH6oRF0+0aDe5wxPbSBlRhVDQnJ4CzGC3oW6HSeOiMVPpC8nm24LTfR3 sbLuQRbOsNSMVF7leDmgObEZvCNoYQx/EMfsWS8k4UguHuLbZe5sNVH9187uYMd9y7Tg yB79vjBUa4jIwfsCLDtUPa//vYzI3Ec1axACdQMe+w82KVElgBWyPljirDvYjqF4dIxK H88uEPHQu+xi9h9Q1z8RXum+YvSHDD0FWoSm5hfSsaJvhtwYXL9pKmLI5Zop5n9rbH5b srfwn2aBbfUzmG5E8mjLUK0L354M93sPId/SIOvIvlK0ghWUF7yK8BGkwkud57/rftqd TQAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K+1mXE6c26sJ05xL/OiaWYUlLkihUxvX+Cms6fDNZy0=; b=F9+6GWWAs9D4ayNL8x/SCj9EeDKLEt58SH9bwj4hJg9ZRi9ZwB/bhpebD8a3r/Y47X CUxmciX48ycRG2nDjraYhrm95Pk/JS2kIezkkNSDPLx3Fcts5qcEtbZmiKxfgh8YpFBz punspXyeGDi1xGTDFqQAweWsNeN6ggqNvew8s+d+UvnzUjTvyGdd/cTJxqJv7l+0NjIF 3H/aCQg6tk1TzYajybV59o4Ky49Up8lTb8HuTzyRTDehP90Mqu10UN4lF4OrHtm/29d/ ZL8bZeiczWwWBd7sIQOSZ29Cfcr6MJdq23bg/Ze05ivF3BzKEZiEdbL7fEc5relVBndE 5Rew== X-Gm-Message-State: APjAAAWHVO5U/99WipeMrmU5XtuJck8/9obROnT5qZbZLfozdFI9/5u3 l1NeZ75mE9HlLtKsTcSk91Gsuw== X-Google-Smtp-Source: APXvYqxUUxKo4xiOVqDOZa2eSoFnlHlu5frMuvLn02t9T3hFisu6UMv5ev7UVJtTuq8UbPNpTniaCQ== X-Received: by 2002:a05:600c:29a:: with SMTP id 26mr3060695wmk.127.1571318185259; Thu, 17 Oct 2019 06:16:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v6 10/54] cputlb: document get_page_addr_code Date: Thu, 17 Oct 2019 14:15:31 +0100 Message-Id: <20191017131615.19660-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191017131615.19660-1-alex.bennee@linaro.org> References: <20191017131615.19660-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@futurewei.com, Richard Henderson , peter.puhov@futurewei.com, aaron@os.amperecomputing.com, cota@braap.org, Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" Suggested-by: Alex Benn=C3=A9e Signed-off-by: Emilio G. Cota Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- include/exec/exec-all.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 04795c49bf..e4206cb173 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -504,7 +504,15 @@ void mmap_lock(void); void mmap_unlock(void); bool have_mmap_lock(void); =20 -static inline tb_page_addr_t get_page_addr_code(CPUArchState *env1, target= _ulong addr) +/** + * get_page_addr_code() - user-mode version + * @env: CPUArchState + * @addr: guest virtual address of guest code + * + * Returns @addr. + */ +static inline tb_page_addr_t get_page_addr_code(CPUArchState *env, + target_ulong addr) { return addr; } @@ -512,8 +520,18 @@ static inline tb_page_addr_t get_page_addr_code(CPUArc= hState *env1, target_ulong static inline void mmap_lock(void) {} static inline void mmap_unlock(void) {} =20 -/* cputlb.c */ -tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr); +/** + * get_page_addr_code() - full-system version + * @env: CPUArchState + * @addr: guest virtual address of guest code + * + * If we cannot translate and execute from the entire RAM page, or if + * the region is not backed by RAM, returns -1. Otherwise, returns the + * ram_addr_t corresponding to the guest code at @addr. + * + * Note: this function can trigger an exception. + */ +tb_page_addr_t get_page_addr_code(CPUArchState *env, target_ulong addr); =20 void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length); void tlb_set_dirty(CPUState *cpu, target_ulong vaddr); --=20 2.20.1