Re: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

From: Andrew Cooper
Date: Tue Apr 19 2022 - 07:43:00 EST


On 18/04/2022 17:50, Josh Poimboeuf wrote:
> The startup_xen() kernel entry point is referenced by the ".note.Xen"
> section, but is presumably not indirect-branched to.

It's the real entrypoint of the VM.  It's "got to" by setting %rip
during vcpu setup.

We could in principle support starting a PV VM with CET active, but that
sounds like an enormous quantity of effort for very little gain.  CET
for Xen PV requires paravirt anyway (because the kernel runs in CPL!=0)
so decisions like this can wait until someone feels like doing the work.

> Add ANNOTATE_ENDBR
> to silence future objtool warnings.
>
> Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Cc: Juergen Gross <jgross@xxxxxxxx>
> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

FWIW, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, preferably
with the commit message tweaked to remove the uncertainty.

~Andrew