From patchwork Wed Apr 22 04:32:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 185658 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp297976ilf; Tue, 21 Apr 2020 21:35:09 -0700 (PDT) X-Google-Smtp-Source: APiQypJ6hJjXdn1+Vd6Ri7nazKGv9BkA5dz7GWH6oh30KoLBvVVYyezcGPC6Vvdc/0m9z6b97ffQ X-Received: by 2002:ac8:6d3b:: with SMTP id r27mr25694391qtu.55.1587530109814; Tue, 21 Apr 2020 21:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587530109; cv=none; d=google.com; s=arc-20160816; b=xV1IkeLNOSXJ3nP26+pBiAlgM0ssNWLib3WwddmPWuBZqEXCNY7nWFx5Rupv+WxsU+ JsgvlVRT0SnUgaVsCkhgG2YJ6EYm6p33hsy04v0FqsFxe0TMNf2XjhxY0x2hb3vGbFPw Q9TDMdt5AGrLe24hh3J2pKcXQ7fQ7VWsnpWUk/Xov5+ImFSOcrOsU1kgPnWwwdXRJ83y aWrG5jRQ/QDmhqtMo/WkL+jFoLQJowzzYc1c7uUuSSJMyg5Lcf++qgh5ksset9IUvVKO nV6hIw+mkjAvvfnCB65bNMdIQBGnMtAU7X5sDYNexFMGm5/hJkwDdML3HKtNtTIdvJJY M0AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=Ar4ktbgi8ho4D2K0AlAA7ABuossIOEQqKwU/YvDdwbY=; b=HWcd7KbxPjwxZSZaLYe85zU1L3BN13/3972v22x56KSCDQmeeq3Rec17tD3afxwrny qlki3Zy8tQgFHRUUf86OvPQP2ygklgL0MjtRcw6OWQ6tR8I7aXspm6CL90+Mlo7VS3ex 1d6Z2+Z3+YtfEBg9eWIfYJH1zzMxrdC7IrEvCg47WPD2yx93lW2AxQWspNWh+EJ+b/3s 9DdXXuFddZKI5Lq8GUi6j3W6d6oMBSv8+rStzy0F9WFhZu5ORpUoq6SYk8OpUDk7p63e zvSWkcUBD3bzXvHa/Oyz8nBmKozQA1Oy4UAHuMMjFQRlEK6yRaMCySjRWonF7WOQ7lxX Xp4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KKHmN9DU; 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 e3si2532258qvx.39.2020.04.21.21.35.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Apr 2020 21:35:09 -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=KKHmN9DU; 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]:41298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR76L-0003MG-5C for patch@linaro.org; Wed, 22 Apr 2020 00:35:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50072) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR74X-0000QJ-OA for qemu-devel@nongnu.org; Wed, 22 Apr 2020 00:33:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jR74X-0004j5-4w for qemu-devel@nongnu.org; Wed, 22 Apr 2020 00:33:17 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:33825) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jR74W-0004fG-Mm for qemu-devel@nongnu.org; Wed, 22 Apr 2020 00:33:16 -0400 Received: by mail-pf1-x443.google.com with SMTP id x15so457990pfa.1 for ; Tue, 21 Apr 2020 21:33:16 -0700 (PDT) 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=Ar4ktbgi8ho4D2K0AlAA7ABuossIOEQqKwU/YvDdwbY=; b=KKHmN9DUtNl/895jM8s3jff7LEzmFeqpQ8DWMpXM1qONzT3m9ARgcZsMgP+XdscICt HZLMNtv/ZqoDWF8cXeHk+2bSlQs/4PWjWY5m0f5+6wiIyah2Z+B4dd2NmFckQr7NJ6HO FJ2+o+DHRGk8N+afxBcsGByNqu6GDXbOc6issTgN7yM3kAgSlrKXj2oY6o/6HzchDLLo iH6AsFkzi9ygAU/ahiyH9fYPWIhJi4eQgbeJH9nfG4wPaO08AUWKlOGemDpIwU7+crxI eXUdP952xqi7ovID9SZ5VX81/jeMI2wy+AP48xd3inj5+XoViGfrnA0WWgdTVEceMl3X kM3Q== 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=Ar4ktbgi8ho4D2K0AlAA7ABuossIOEQqKwU/YvDdwbY=; b=pKp4HhKOe3UZkAp1jcPrX/7FgkrhVQUzdOlqJ8FcUwITiakSyIb3CJbH7EB1kC9WGo Go2nMCRhHSgro+KOMQzGcnAi3fHf1o2WT20QrdG2RlDAYqffQMwqQGN4q/KHvwJclZ4+ LLdlS1kaYPSV+z54WA2a87bZgYiaE2v6sbxLrGl0KYT9mHYR0twK5eRYDilt0qsT/xto CKy2q2n+V11dvSLyyM3jXQPKQIDbRGpsyCP+UFpSlxP9ZHcaIww2cbAZYVIHdcXThVDT i7B+rLL6MBqqnh5uSX8pUTd1aJ2q6qut0GR6UDu+eSi+8EYJOVo3D2v16a/FaKhhbFHJ SJtg== X-Gm-Message-State: AGi0PuYRUjPCbt6N+meKuufYobEMfw1dEnIezrp13MBI4AY3uxQKYpEn ipf2YhkG6EKvX6+qUPDl9G6ZyX+e2cE= X-Received: by 2002:a63:5853:: with SMTP id i19mr22901678pgm.288.1587529994937; Tue, 21 Apr 2020 21:33:14 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id l137sm4129613pfd.107.2020.04.21.21.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 21:33:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 03/18] accel/tcg: Add block comment for probe_access Date: Tue, 21 Apr 2020 21:32:54 -0700 Message-Id: <20200422043309.18430-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200422043309.18430-1-richard.henderson@linaro.org> References: <20200422043309.18430-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::443 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: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.20.1 diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 350c4b451b..d656a1f05c 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -330,6 +330,23 @@ static inline void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *cpu, { } #endif +/** + * probe_access: + * @env: CPUArchState + * @addr: guest virtual address to look up + * @size: size of the access + * @access_type: read, write or execute permission + * @mmu_idx: MMU index to use for lookup + * @retaddr: return address for unwinding + * + * Look up the guest virtual address @addr. Raise an exception if the + * page does not satisfy @access_type. Raise an exception if the + * access (@addr, @size) hits a watchpoint. For writes, mark a clean + * page as dirty. + * + * Finally, return the host address for a page that is backed by RAM, + * or NULL if the page requires I/O. + */ void *probe_access(CPUArchState *env, target_ulong addr, int size, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr);