All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Julien Grall <julien@xen.org>
Cc: Luca Fancellu <Luca.Fancellu@arm.com>,
	Xen-devel <xen-devel@lists.xenproject.org>,
	Penny Zheng <Penny.Zheng@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <Bertrand.Marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH 3/7] xen/p2m: put reference for superpage
Date: Thu, 9 May 2024 13:28:12 +0200	[thread overview]
Message-ID: <ZjyzTCOSeNvPq2Np@macbook> (raw)
In-Reply-To: <bd463f7a-eadf-441f-96e3-3a39f647f160@xen.org>

On Thu, May 09, 2024 at 10:50:56AM +0100, Julien Grall wrote:
> 
> 
> On 09/05/2024 09:13, Roger Pau Monné wrote:
> > On Wed, May 08, 2024 at 11:11:04PM +0100, Julien Grall wrote:
> > Also the interactions with the remote domain would need to be audited,
> > as the remote domain shattering the superpage would need to be
> > replicated in the mapping side in order to account for the changes.
> 
> ... I don't understand this one. How is this different from today's where a
> domain can foreign map a 2MB which may be using a superpage in the remote
> domain?

Hm, right, I was wrong with that I think, as long as proper references
as taken for the superpage entries it should be fine.

> >  Not sure all paths will be easy to
> > audit for preemption if it's more than relinquish_p2m_mapping() that
> > you need to adjust.
> 
> I thought about it yesterday. But I came to the conclusion that if we have
> any concern about removing 1GB foreign superpage then we would already have
> the problem today as a domain can map contiguously 1GB worth of foreign
> mapping using small pages.

Yeah, but in that case addition or removal is done in 4K chunks, and
hence we can preempt during the operation.

OTOH for 1GB given the code here the page could be freed in one go,
without a chance of preempting the operation.

Maybe you have to shatter superpages into 4K entries and then remove
them individually, as to allow for preemption to be possible by
calling put_page() for each 4K chunk?

Thanks, Roger.


  reply	other threads:[~2024-05-09 11:28 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  8:25 [PATCH 0/7] Static shared memory followup v2 - pt2 Luca Fancellu
2024-04-23  8:25 ` [PATCH 1/7] xen/arm: Lookup bootinfo shm bank during the mapping Luca Fancellu
2024-05-06 13:24   ` Michal Orzel
2024-05-07 13:44     ` Luca Fancellu
2024-05-07 14:01       ` Michal Orzel
2024-05-07 14:12         ` Luca Fancellu
2024-04-23  8:25 ` [PATCH 2/7] xen/arm: Wrap shared memory mapping code in one function Luca Fancellu
2024-05-06 13:39   ` Michal Orzel
2024-05-07 13:57     ` Luca Fancellu
2024-05-07 14:08       ` Michal Orzel
2024-05-07 14:15         ` Luca Fancellu
2024-05-08  6:33           ` Michal Orzel
2024-04-23  8:25 ` [PATCH 3/7] xen/p2m: put reference for superpage Luca Fancellu
2024-05-07 12:26   ` Michal Orzel
2024-05-07 13:20   ` Julien Grall
2024-05-07 13:30     ` Luca Fancellu
2024-05-08 21:05       ` Julien Grall
2024-05-08 22:11         ` Julien Grall
2024-05-09  8:13           ` Roger Pau Monné
2024-05-09  9:50             ` Julien Grall
2024-05-09 11:28               ` Roger Pau Monné [this message]
2024-05-09 12:12                 ` Julien Grall
2024-05-09 12:58                   ` Roger Pau Monné
2024-05-10 21:37                     ` Julien Grall
2024-05-13  8:04                       ` Roger Pau Monné
2024-05-14  7:55                       ` Luca Fancellu
2024-05-09  7:55   ` Roger Pau Monné
2024-04-23  8:25 ` [PATCH 4/7] xen/arm: Parse xen,shared-mem when host phys address is not provided Luca Fancellu
2024-05-08 12:09   ` Michal Orzel
2024-05-08 13:28     ` Luca Fancellu
2024-05-09  8:58       ` Luca Fancellu
2024-04-23  8:25 ` [PATCH 5/7] xen/arm: Rework heap page allocation outside allocate_bank_memory Luca Fancellu
2024-05-09 11:04   ` Michal Orzel
2024-04-23  8:25 ` [PATCH 6/7] xen/arm: Implement the logic for static shared memory from Xen heap Luca Fancellu
2024-05-10  9:17   ` Michal Orzel
2024-05-10  9:25     ` Luca Fancellu
2024-05-10  9:32       ` Michal Orzel
2024-05-10  9:37         ` Luca Fancellu
2024-04-23  8:25 ` [PATCH 7/7] xen/docs: Describe static shared memory when host address is not provided Luca Fancellu
2024-05-10  9:33   ` Michal Orzel

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=ZjyzTCOSeNvPq2Np@macbook \
    --to=roger.pau@citrix.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Luca.Fancellu@arm.com \
    --cc=Penny.Zheng@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --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.