All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.19? 1/2] xen/x86: account for max guest gfn and number of foreign mappings in the p2m
Date: Mon, 6 May 2024 17:33:29 +0200	[thread overview]
Message-ID: <Zjj4SQ3r9ZtjjjKn@macbook> (raw)
In-Reply-To: <45c52348-e821-4e36-9bd6-7dda00eeb7d3@suse.com>

On Mon, May 06, 2024 at 12:07:33PM +0200, Jan Beulich wrote:
> On 30.04.2024 18:58, Roger Pau Monne wrote:
> > Keep track of the maximum gfn that has ever been populated into the p2m, and
> > also account for the number of foreign mappings.  Such information will be
> > needed in order to remove foreign mappings during teardown for HVM guests.
> 
> Is "needed" the right term? We could e.g. traverse the P2M tree (didn't look
> at patch 2 yet as to how exactly you use these two new fields there), at which
> point we might get away without either or both of these extra statistics,
> while at the same time also not needing to iterate over a gigantic range of
> GFNs. Going from populated page tables would roughly match "max_gfn", with the
> benefit of certain removals of P2M entries then also shrinking the upper bound.

One note about traversing the p2m tree that I forgot to add earlier:
AFAICT we would need one implementation for EPT and one for NPT, as I
expect the different page-table format won't allow us to use the same
code against both EPT and NPT page-tables (I really need to check).

Thanks, Roger.


  parent reply	other threads:[~2024-05-06 15:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 16:58 [PATCH for-4.19? 0/2] xen/x86: support foreign mappings for HVM Roger Pau Monne
2024-04-30 16:58 ` [PATCH for-4.19? 1/2] xen/x86: account for max guest gfn and number of foreign mappings in the p2m Roger Pau Monne
2024-05-06 10:07   ` Jan Beulich
2024-05-06 14:32     ` Roger Pau Monné
2024-05-06 14:55       ` Jan Beulich
2024-05-06 15:13         ` Roger Pau Monné
2024-05-06 15:33     ` Roger Pau Monné [this message]
2024-05-06 15:34       ` Jan Beulich
2024-04-30 16:58 ` [PATCH for-4.19? 2/2] xen/x86: remove foreign mappings from the p2m on teardown Roger Pau Monne
2024-05-06 10:41   ` Jan Beulich
2024-05-06 14:56     ` Roger Pau Monné
2024-05-02  8:50 ` [PATCH for-4.19? 0/2] xen/x86: support foreign mappings for HVM Oleksii
2024-05-03 13:10 ` Roger Pau Monné

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=Zjj4SQ3r9ZtjjjKn@macbook \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --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.