x86: make get_cpu_vendor() accessible from Xen code
authorJuergen Gross <jgross@suse.com>
Thu, 17 Oct 2024 06:29:48 +0000 (08:29 +0200)
committerJuergen Gross <jgross@suse.com>
Fri, 13 Dec 2024 08:28:10 +0000 (09:28 +0100)
commitefbcd61d9bebb771c836a3b8bfced8165633db7c
tree899f6b6a49f224ead59d6c9d8159700dd96acbbd
parentf9244fb55f37356f75c739c57323d9422d7aa0f8
x86: make get_cpu_vendor() accessible from Xen code

In order to be able to differentiate between AMD and Intel based
systems for very early hypercalls without having to rely on the Xen
hypercall page, make get_cpu_vendor() non-static.

Refactor early_cpu_init() for the same reason by splitting out the
loop initializing cpu_devs() into an externally callable function.

This is part of XSA-466 / CVE-2024-53241.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c