All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org, Juergen Gross <jgross@suse.com>
Subject: Re: issue with dom0_pvh on Xen 4.20
Date: Tue, 2 Sep 2025 14:54:44 +0200	[thread overview]
Message-ID: <aLbpFH2jPRPEqjhe@mail.soc.lip6.fr> (raw)
In-Reply-To: <7d0fc0eb-52a4-4478-8c1b-9a359513abdd@suse.com>

On Tue, Sep 02, 2025 at 02:45:04PM +0200, Jan Beulich wrote:
> >> What puzzles me is that:
> >>
> >> - %cr2 is 0, so probably the first fault wasn't a page fault
> > 
> > AFAIK it can't be as we're still in real mode
> 
> It's protected mode, but with paging still off.
> 
> >> - RIP is %ebx + 8, so maybe the code was just clobbered by the loop?
> >>
> >> Could it be the code has been moved to this location, or is about to
> >> be moved away afterwards?
> > 
> > No. RIP shouldn't end up there in any way. the assembly code is quite simple,
> > it's just a loop and I'm quite confident that we did enter the loop with
> > sane values
> 
> Yet Jürgen has a point - entry point and what is being modified are on the
> same page (and despite paging still being off, you writing page tables here
> makes pages a relevant unit). Considering
> - entry point @ 0x20e4d0
> - %ecx = 0xdfeb7
> - %ebx = 0x20e260
> the loop continuing a little further will overwrite the entry point code.
> And with the entry point not at an even (e.g page-aligned) address, other
> code (like the one here) could conceivably live immediately ahead of it.
> (Of course this overwriting may be intentional, but it looks suspicious in
> this context.)

Indeed. Now the exact same kernel is booting fine with Xen 4.18 (and also
the same bootstrap is used for domU PVH which works with Xen 4.20).
I guess something changed in the way Xen sets up the dom0 kernel.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--


  reply	other threads:[~2025-09-02 12:55 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 10:17 issue with dom0_pvh on Xen 4.20 Manuel Bouyer
2025-09-02 10:44 ` Andrew Cooper
2025-09-02 10:56   ` Manuel Bouyer
2025-09-02 11:13     ` Andrew Cooper
2025-09-02 11:23       ` Manuel Bouyer
2025-09-02 12:14         ` Andrew Cooper
2025-09-02 12:24           ` Manuel Bouyer
2025-09-02 12:52             ` Andrew Cooper
2025-09-02 12:55               ` Andrew Cooper
2025-09-02 12:56               ` Manuel Bouyer
2025-09-02 12:00     ` Jan Beulich
2025-09-02 12:10       ` Manuel Bouyer
2025-09-02 12:54         ` Jan Beulich
2025-09-02 12:22     ` Juergen Gross
2025-09-02 12:28       ` Juergen Gross
2025-09-02 12:49         ` Manuel Bouyer
2025-09-02 13:41         ` Manuel Bouyer
2025-09-02 13:55           ` Jan Beulich
2025-09-02 14:06             ` Manuel Bouyer
2025-09-02 14:23               ` Jan Beulich
2025-09-02 14:28                 ` Manuel Bouyer
2025-09-02 14:32                   ` Manuel Bouyer
2025-09-02 13:58           ` Andrew Cooper
2025-09-02 12:28       ` Manuel Bouyer
2025-09-02 12:45         ` Jan Beulich
2025-09-02 12:54           ` Manuel Bouyer [this message]
2025-09-02 12:56             ` Jan Beulich
2025-09-02 13:05               ` Manuel Bouyer
2025-09-03 15:47               ` Manuel Bouyer

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=aLbpFH2jPRPEqjhe@mail.soc.lip6.fr \
    --to=bouyer@antioche.eu.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@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.