All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: George Dunlap <dunlapg@umich.edu>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger@xenproject.org>,
	"Alejandro Vallejo" <agarciav@amd.com>,
	"Teddy Astie" <teddy.astie@vates.tech>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"George Dunlap" <gwd@xenproject.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 07/14] x86/mm: simplify create_perdomain_mapping() interface
Date: Tue, 8 Sep 2026 16:39:02 +0200	[thread overview]
Message-ID: <6a2b153f-e823-454c-a449-9683c76aae9a@suse.com> (raw)
In-Reply-To: <20260901-asi-part2-7-ecc269f268b7@xenproject.org>

On 02.09.2026 11:43, George Dunlap wrote:
> From: Roger Pau Monné <roger.pau@citrix.com>
> 
> create_perdomain_mapping()'s interface is richer than any caller needs.
> The paging structure for the requested range is built to a depth
> selected by the pl1tab and ppg arguments, each of which distinguishes
> NULL from NIL() from a real pointer:
> 
>  - nr == 0: only ensure the per-domain L3 exists; nothing else is
>    allocated, and the other arguments are ignored.
>  - pl1tab == a pointer: allocate the L1 tables covering the range from
>    the *xenheap*, and return their (stable, direct-map) addresses in
>    the array -- the mode that existed to build the GDT/LDT stash.
>  - pl1tab == NIL(): allocate the L1 tables from the domain heap, and
>    return nothing.
>  - pl1tab == NULL: do not plumb L1 tables for their own sake (they are
>    still allocated on demand if data-page population requires them).
>  - ppg == a pointer: allocate and install zeroed data pages across the
>    range, and return their struct page_info pointers in the array.
>  - ppg == NIL(): allocate and install the zeroed data pages, but hand
>    nothing back; the pages are reachable only through the mapping.
>  - ppg == NULL: do not allocate data pages.
>  - both NULL, nr > 0: stop after the slot's L2; do not plumb L1 tables
>    at all.
> 
> Very few of these modes have users now.  The last user of the
> pl1tab capture mode was removed when we removed the GDT/LDT stash.
> The ppg capture mode never had any users.  Nothing uses the both-NULL
> L2-only mode with nr != 0.  What remains is exactly one bit of
> information: whether the caller wants the range populated with zeroed,
> area-owned data pages, or merely plumbed down to the L1 tables, ready
> for populate_perdomain_mapping() to install caller-owned pages.
> 
> Replace the two arguments with a boolean expressing that bit.  With the
> stashing mode gone the NIL()/IS_NIL() macros lose their last user, so
> drop them as well; and document the resulting interface.
> 
> No caller changes behaviour: every existing call maps onto the boolean
> exactly.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Assisted-by: Claude Code:claude-fable-5
> Signed-off-by: George Dunlap <gwd@xenproject.org>

Reviewed-by: Jan Beulich <jbeulich@suse.com>



  reply	other threads:[~2026-09-08 14:39 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  9:43 [PATCH v2 00/14] x86: Address Space Isolation, part 2: asi= option and per-vCPU page tables George Dunlap
2026-09-02  9:43 ` [PATCH v2 01/14] x86/domain_page: introduce IRQs-off variants of {,un}map_domain_page() George Dunlap
2026-09-03 14:07   ` Jan Beulich
2026-09-03 19:56     ` George Dunlap
2026-09-02  9:43 ` [PATCH v2 02/14] x86/mm: introduce populate_perdomain_mapping() George Dunlap
2026-09-03 15:57   ` Jan Beulich
2026-09-03 21:27     ` George Dunlap
2026-09-04  5:58       ` Jan Beulich
2026-09-04  5:47   ` Jan Beulich
2026-09-02  9:43 ` [PATCH v2 03/14] x86/pv: use populate_perdomain_mapping() to map the Xen GDT George Dunlap
2026-09-03 16:11   ` Jan Beulich
2026-09-03 22:35     ` George Dunlap
2026-09-04  6:00       ` Jan Beulich
2026-09-04  6:54         ` Jürgen Groß
2026-09-04  8:06           ` George Dunlap
2026-09-04  8:29             ` Jan Beulich
2026-09-04  8:50               ` George Dunlap
2026-09-04 10:11                 ` Jan Beulich
2026-09-04 10:34                 ` Roger Pau Monné
2026-09-07 13:58                   ` George Dunlap
2026-09-02  9:43 ` [PATCH v2 04/14] x86/pv: set/clear guest GDT mappings using populate_perdomain_mapping() George Dunlap
2026-09-07 12:50   ` Jan Beulich
2026-09-07 13:51     ` George Dunlap
2026-09-07 14:57       ` Jan Beulich
2026-09-02  9:43 ` [PATCH v2 05/14] x86/pv: update guest LDT mappings using {populate,destroy}_perdomain_mapping() George Dunlap
2026-09-07 16:06   ` Jan Beulich
2026-09-09 19:29     ` George Dunlap
2026-09-02  9:43 ` [PATCH v2 06/14] x86/pv: remove stashing of GDT/LDT L1 page-tables George Dunlap
2026-09-08 14:29   ` Jan Beulich
2026-09-02  9:43 ` [PATCH v2 07/14] x86/mm: simplify create_perdomain_mapping() interface George Dunlap
2026-09-08 14:39   ` Jan Beulich [this message]
2026-09-02  9:43 ` [PATCH v2 08/14] x86/mm: purge unneeded destroy_perdomain_mapping() George Dunlap
2026-09-08 15:03   ` Jan Beulich
2026-09-02  9:43 ` [PATCH v2 09/14] x86/mm: prepare destroy_perdomain_mapping() for per-vCPU perdomain areas George Dunlap
2026-09-08 15:36   ` Jan Beulich
2026-09-10 11:38     ` George Dunlap
2026-09-10 11:54       ` Jan Beulich
2026-09-02  9:43 ` [PATCH v2 10/14] x86/domain_page: drop redundant create_perdomain_mapping() call George Dunlap
2026-09-08 15:55   ` Jan Beulich
2026-09-10 11:52     ` George Dunlap
2026-09-02  9:43 ` [PATCH v2 11/14] x86/mm: prepare create_perdomain_mapping() for per-vCPU perdomain areas George Dunlap
2026-09-02  9:43 ` [PATCH v2 12/14] x86/spec-ctrl: introduce Address Space Isolation command line option George Dunlap
2026-09-02  9:43 ` [PATCH v2 13/14] x86/pv: clear the XPTI root_pgt per-domain slot on context-switch out George Dunlap
2026-09-02  9:43 ` [PATCH v2 14/14] x86/mm: introduce per-vCPU L3 page-table George Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a2b153f-e823-454c-a449-9683c76aae9a@suse.com \
    --to=jbeulich@suse.com \
    --cc=agarciav@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dunlapg@umich.edu \
    --cc=gwd@xenproject.org \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger@xenproject.org \
    --cc=sstabellini@kernel.org \
    --cc=teddy.astie@vates.tech \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.