The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Xin Li <xin@zytor.com>, Zijlstra Peter <peterz@infradead.org>
Cc: Gupta Pawan <pawan.kumar.gupta@linux.intel.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Hansen Dave <dave.hansen@linux.intel.com>,
	alexandre.chartre@oracle.com,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Zhang Tao1 <tao1.zhang@intel.com>
Subject: Re: [Bug Report] Linux v6.15-rc7 boot failure on Xen-4.17
Date: Wed, 28 May 2025 10:57:59 +0200	[thread overview]
Message-ID: <760c96da-a8da-49be-bc4e-b82a8b2a1623@suse.com> (raw)
In-Reply-To: <400ee15a-12fa-4477-ba03-123eb8e07dc2@zytor.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 2068 bytes --]

On 28.05.25 10:26, Xin Li wrote:
> On 5/28/2025 12:27 AM, Xin Li wrote:
>> On 5/27/2025 11:49 PM, Juergen Gross wrote:
>>> On 28.05.25 07:11, Jürgen Groß wrote:
>>>> On 27.05.25 21:29, Andrew Cooper wrote:
>>>>> On 27/05/2025 8:21 pm, Xin Li wrote:
>>>>>>> On May 27, 2025, at 11:36 AM, Jürgen Groß <jgross@suse.com> wrote:
>>>>>>>
>>>>>>> On 27.05.25 19:54, Xin Li wrote:
>>>>>>>> On 5/27/2025 10:46 AM, Pawan Gupta wrote:
>>>>>>>>>> Attached is the serial console log and my kernel config.
>>>>>>>>> Serial logs aren't telling much. I do not have a Xen setup to test, 
>>>>>>>>> without
>>>>>>>>> Xen the config that you provided is booting a KVM guest just fine.
>>>>>>>> Yeah, as I replied to Juergen, the same kernel binary boots fine as
>>>>>>>> "native".
>>>>>>>> Unfortunately when booting as dom0 on Xen, it keeps rebooting w/o
>>>>>>>> helpful log.
>>>>>>> What about booting Xen on bare metal, i.e. no KVM being involved?
>>>>>> The same exact problem happens on Intel Simics.  And I got to see it’s a 
>>>>>> NX page fault in dom0 kernel during apply alternatives.
>>>>>
>>>>> In which case it's likely that there's an opencoded PTE update, rather
>>>>> than using the hooks (which are suitably paravirt'd).
>>>>
>>>> I'd suspect a bug when NOT using 2M pages for execmem.
>>>>
>>>> I'll have a look.
>>>
>>> Could you have a try using "nohugevmalloc" dom0 kernel boot parameter?
>>>
>>
>> Tried in a KVM guest, still the same problem, and nothing new in the
>> serial log.
> 
> Attached is a dom0 log with stack traces.
> 
> But I really did NOT change anything to make it happen...

Thanks.

I think this might be related to Xen not advertising X86_FEATURE_PSE.

This will use PAGE_KERNEL page protection for execmem_alloc() page protection,
while with X86_FEATURE_PSE PAGE_KERNEL_ROX is being used.

For the kernel (so not in a module) there is no execmem_restore_rox() call
involved, so the NX bit will be kept for kernel side ITS thunks.

Peter, can you confirm my suspicion?


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2025-05-28  8:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25  4:42 [Bug Report] Linux v6.15-rc7 boot failure on Xen-4.17 Xin Li
2025-05-25  6:58 ` Jürgen Groß
2025-05-25  8:34   ` Xin Li
2025-05-27 17:46 ` Pawan Gupta
2025-05-27 17:54   ` Xin Li
2025-05-27 18:35     ` Jürgen Groß
2025-05-27 19:21       ` Xin Li
2025-05-27 19:29         ` Andrew Cooper
2025-05-28  5:11           ` Jürgen Groß
2025-05-28  6:49             ` Juergen Gross
2025-05-28  7:27               ` Xin Li
2025-05-28  8:26                 ` Xin Li
2025-05-28  8:57                   ` Jürgen Groß [this message]
2025-05-28  9:19                     ` Juergen Gross
2025-05-28 21:53                       ` Gupta Pawan
2025-05-29  6:02                         ` Jürgen Groß
2025-05-28  8:39         ` Jürgen Groß

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=760c96da-a8da-49be-bc4e-b82a8b2a1623@suse.com \
    --to=jgross@suse.com \
    --cc=alexandre.chartre@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=tao1.zhang@intel.com \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox