From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 1/2] x86/dom0: fix restoring %cr3 and the mapcache override on PV build error
Date: Wed, 31 Jul 2024 09:57:56 +0200 [thread overview]
Message-ID: <ZqnuhBkM9hpSbSw1@macbook> (raw)
In-Reply-To: <5e5cc6b2-cdf3-4670-a2dc-2e23dc22d520@suse.com>
On Wed, Jul 31, 2024 at 08:32:03AM +0200, Jan Beulich wrote:
> On 30.07.2024 17:28, Roger Pau Monne wrote:
> > One of the error paths in the PV dom0 builder section that runs on the guest
> > page-tables wasn't restoring the Xen value of %cr3, neither removing the
> > mapcache override.
>
> s/neither/nor/ ?
>
> > --- a/xen/arch/x86/pv/dom0_build.c
> > +++ b/xen/arch/x86/pv/dom0_build.c
> > @@ -825,6 +825,8 @@ int __init dom0_construct_pv(struct domain *d,
> > rc = elf_load_binary(&elf);
> > if ( rc < 0 )
> > {
> > + mapcache_override_current(NULL);
> > + switch_cr3_cr4(current->arch.cr3, read_cr4());
> > printk("Failed to load the kernel binary\n");
> > goto out;
> > }
>
> Just below here we have
>
> bootstrap_map(NULL);
>
> This too is wanted in the error case aiui. Happy to move it up immediately
> ahead of the if() while committing, so long as you agree. Then:
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
I'm happy with this, but note there are further instances of error
paths above this one that already don't remove the bootstrap mappings.
Thanks, Roger.
next prev parent reply other threads:[~2024-07-31 7:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 15:28 [PATCH v2 0/2] x86/dom0: miscellaneous fixes for PV dom0 builder Roger Pau Monne
2024-07-30 15:28 ` [PATCH v2 1/2] x86/dom0: fix restoring %cr3 and the mapcache override on PV build error Roger Pau Monne
2024-07-31 6:32 ` Jan Beulich
2024-07-31 7:57 ` Roger Pau Monné [this message]
2024-07-31 8:02 ` Jan Beulich
2024-07-30 15:28 ` [PATCH v2 2/2] x86/dom0: only disable SMAP for the PV dom0 build Roger Pau Monne
2024-07-31 6:44 ` Jan Beulich
2024-07-31 13:25 ` Roger Pau Monné
2024-07-31 13:39 ` Jan Beulich
2024-07-31 14:10 ` Roger Pau Monné
2024-07-31 16:47 ` Andrew Cooper
2024-08-01 7:12 ` Jan Beulich
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=ZqnuhBkM9hpSbSw1@macbook \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@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.