From nobody Tue Oct 17 09:05:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8p3Y628jz4xHB7; Tue, 17 Oct 2023 09:05:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4S8p3Y291xz4Z71; Tue, 17 Oct 2023 09:05:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 39H95Gji024622 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 17 Oct 2023 12:05:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 39H95Gji024622 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 39H95F7L024620; Tue, 17 Oct 2023 12:05:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 17 Oct 2023 12:05:15 +0300 From: Konstantin Belousov To: John Baldwin Cc: Mitchell Horne , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 74e4a8d208f0 - main - pmap: add pmap_kextract(9) man page Message-ID: References: <202310131827.39DIRXsu082741@gitrepo.freebsd.org> <068574a3-f63a-4830-be1d-2a8cd67c1819@freebsd.org> <527ab884-ce06-4325-52a6-7c6dec1af563@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <527ab884-ce06-4325-52a6-7c6dec1af563@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4S8p3Y291xz4Z71 On Mon, Oct 16, 2023 at 03:54:32PM -0700, John Baldwin wrote: > On 10/14/23 10:34 AM, Mitchell Horne wrote: > > On 10/14/23 10:28, Konstantin Belousov wrote: > > > On Fri, Oct 13, 2023 at 06:27:33PM +0000, Mitchell Horne wrote: > > > > +.Pp > > > > +.Fn vtophys > > > > +is an alias for > > > > +.Fn pmap_kextract > > > > +and behaves identically. > > > > +.Sh RETURN VALUES > > > > +The > > > > +.Fn pmap_kextract > > > > +function will return the physical address > > > > +.Pq Vt vm_paddr_t > > > > +associated with the kernel virtual address > > > and 'associated'? > > > > > > The function returns address of physical memory mapped at the supplied > > > kernel virtual address. > > > > > > > Sure, this is more accurate. > > I suggest tweaking this further just to be very explicit about the type > of address being returned: > > The > .Fn pmap_kextract > function returns the physical address of memory mapped at the > kernel virtual address > .Va va . > > or some such. There are two larger things that are worth adding to the man page, IMO. 1. pmap_kextract() is safe to be used from any context (in particular, it does not do any locking internally) 2. it is caller duty to ensure that the active mapping is alive and stable long enough for the answer to be useful