All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien@xen.org>,
	Elliott Mitchell <ehem+xen@m5p.com>,
	xen-devel@lists.xenproject.org,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Subject: Re: Issue with shared information page on Xen/ARM 4.17
Date: Thu, 5 Oct 2023 11:24:52 +0200	[thread overview]
Message-ID: <ZR6A5LP1FKFAgJRv@MacBookPdeRoger> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2310041509170.2348112@ubuntu-linux-20-04-desktop>

On Wed, Oct 04, 2023 at 03:52:54PM -0700, Stefano Stabellini wrote:
> On Wed, 4 Oct 2023, Julien Grall wrote:
> > > > If we want to handle such firmware, I think it would be better if we
> > > > provide
> > > > an hypercall that would return the GFN where it is currently mapped.
> > > 
> > > Sure, but such hypercall would be racy, as by the time the gfn is
> > > returned the value could be stale.  Adding a replacing and non
> > > replacing XENMEM_add_to_physmap variations would IMO be better.
> > > 
> > > Anyway, I don't maintain this, so it's up to you.
> > 
> > Bertrand/Stefano, any opinions?
> 
> I think we should fix EDK2 to unmap the shared info in all cases as
> that's simpler and the best implementation. What's the value of keeping
> the mapping around when the OS can't find it? Unless you have an idea on
> how the OS could find the location of the existing EDK2 shared info
> mapping.

Indeed, edk2 should unmap the page, and we should fix that.

> 
> It is important not to have 2 different behaviors for the same hypercall
> on ARM and x86, especially when the hypercall looks arch-neutral and an
> operating system would reasonably expect to use it in common code.
> Having different behaviors on ARM/x86 is more error prone than having a
> less-than-ideal hypercall implementation.
> 
> I agree with Julien that the ARM behavior is the right behavior. Can we
> change the x86 implementation to match ARM somehow?

I'm afraid I don't see how.  edk2 is supported on x86, and hence we
cannot simply make a change to the hypervisor that would render all
current versions of edk2 unusable.

> If we do, I guess we would end up breaking legacy EDK2?

Breaking plain edk2, as there's no version of edk2 that currently does
the unmapping?

> Is really the only choice to change the ARM implementation to match the
> x86 implementation?

Unless we want x86 and Arm to diverge in behavior.

I do think the arm behavior is more sane, but I don't think we can
make that change on x86 and simply render all existing versions of
edk2 unusable.

Thanks, Roger.


  parent reply	other threads:[~2023-10-05  9:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29  2:49 Issue with shared information page on Xen/ARM 4.17 Elliott Mitchell
2023-10-03  8:26 ` Roger Pau Monné
2023-10-03 19:18   ` Elliott Mitchell
2023-10-04  8:13     ` Roger Pau Monné
2023-10-04 10:55       ` Julien Grall
2023-10-04 11:42         ` Oleksandr Tyshchenko
2023-10-04 12:59           ` Roger Pau Monné
2023-10-04 17:18             ` Oleksandr Tyshchenko
2023-10-04 12:53         ` Roger Pau Monné
2023-10-04 13:03           ` Julien Grall
2023-10-04 13:39             ` Roger Pau Monné
2023-10-04 14:06               ` Julien Grall
2023-10-04 14:53                 ` Roger Pau Monné
2023-10-04 17:47                   ` Julien Grall
2023-10-04 21:13                     ` Elliott Mitchell
2023-10-04 22:21                       ` Stefano Stabellini
2023-10-04 22:37                         ` Elliott Mitchell
2023-10-04 22:42                           ` Stefano Stabellini
2023-10-05  8:54                       ` Julien Grall
2023-10-05 15:56                         ` Elliott Mitchell
2023-10-04 22:52                     ` Stefano Stabellini
2023-10-05  0:20                       ` Elliott Mitchell
2023-10-05  9:24                       ` Roger Pau Monné [this message]
2023-10-05 20:52                         ` Stefano Stabellini

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=ZR6A5LP1FKFAgJRv@MacBookPdeRoger \
    --to=roger.pau@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=ehem+xen@m5p.com \
    --cc=julien@xen.org \
    --cc=oleksandr_tyshchenko@epam.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.