On 14.08.2025 22:40, Andrew Cooper wrote: > On 14/08/2025 4:57 pm, Jan Beulich wrote: >> On 08.08.2025 22:23, Andrew Cooper wrote: >>> --- /dev/null >>> +++ b/xen/arch/x86/x86_64/entry-fred.S >>> @@ -0,0 +1,35 @@ >>> +/* SPDX-License-Identifier: GPL-2.0-or-later */ >>> + >>> + .file "x86_64/entry-fred.S" >>> + >>> +#include <asm/asm_defns.h> >>> +#include <asm/page.h> >>> + >>> + .section .text.entry, "ax", @progbits >>> + >>> + /* The Ring3 entry point is required to be 4k aligned. */ >>> + >>> +FUNC(entry_FRED_R3, 4096) >> ... doesn't this 4k-alignment requirement suggest we want to put >> entry-fred.o first? > > Perhaps, but that is quite subtle. I did also consider a > .text.entry.page_aligned section, but .text.entry only matters for XPTI > which (as agreed), I'm not intending to implement in FRED mode unless it > proves to be necessary. > > Also IIRC there's still a symbol bug where _sentrytext takes priority > over entry_FRED_R3, so the backtrace is effectively wrong. > > (These are all bad excuses, but some parts of this series are rather old.) > >> Also, might it be more natural to use PAGE_SIZE >> here? > > I did debate that, but the spec uses 0xfff, not pages, even if the > pipline surely does have an optimisation for chopping 12 metadata bits > off the bottom of a pointer.
I found this, though: "Bits 63:12 contain the upper bits of the linear address of a page in memory containing event handlers. FRED event delivery will load RIP to refer to an entry point on this page. See Section 5.1.1." Jan