From nobody Thu Feb 22 13:50:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TgZKy4W1sz5Cf1w; Thu, 22 Feb 2024 13:51:02 +0000 (UTC) (envelope-from bapt@nours.eu) Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TgZKx4j61z41B7; Thu, 22 Feb 2024 13:51:01 +0000 (UTC) (envelope-from bapt@nours.eu) Authentication-Results: mx1.freebsd.org; none Received: from [IPv6:::1] (unknown [IPv6:2a01:e0a:9a1:e510:e757:27e8:1d54:bfb5]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aniel.nours.eu (Postfix) with ESMTPSA id E0D1977208; Thu, 22 Feb 2024 14:50:53 +0100 (CET) Date: Thu, 22 Feb 2024 14:50:51 +0100 From: Baptiste Daroussin To: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8f5406c77f1b - main - x86/xen: implement early init hook User-Agent: K-9 Mail for Android In-Reply-To: <202402221031.41MAVSjF018338@gitrepo.freebsd.org> References: <202402221031.41MAVSjF018338@gitrepo.freebsd.org> Message-ID: <69A06BC5-5DF4-4A39-8E70-3B16AC7D3C6C@nours.eu> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----X3FJVLSHKXFQGXUY681CX7HTPDB8CZ Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4TgZKx4j61z41B7 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:176.31.0.0/16, country:FR] ------X3FJVLSHKXFQGXUY681CX7HTPDB8CZ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le 22 f=C3=A9vrier 2024 11:31:28 GMT+01:00, "Roger Pau Monn=C3=A9" a =C3=A9crit=C2=A0: >The branch main has been updated by royger: > >URL: https://cgit=2EFreeBSD=2Eorg/src/commit/?id=3D8f5406c77f1b7009c36df4= e025fd8789a46d33ce > >commit 8f5406c77f1b7009c36df4e025fd8789a46d33ce >Author: Roger Pau Monn=C3=A9 >AuthorDate: 2024-02-02 10:56:32 +0000 >Commit: Roger Pau Monn=C3=A9 >CommitDate: 2024-02-22 10:08:05 +0000 > > x86/xen: implement early init hook > =20 > Unify the HVM and PVH early setup, byt making both rely on the hyperv= isor > initialization hook part of identify_hypervisor()=2E > =20 > The current initialization takes care of the hypercall page, the sahr= ed info > page and does any fixup necessary to metadata video console informati= on if > FreeBSD is booted as the initial domain (so the video console is hand= ed from > Xen into FreeBSD)=2E > =20 > Note this has the nice side effect of also allowing to use the Xen co= nsole on > HVM guests, which allows to get rid of the QEMU emulated uart and sti= ll get > a nice text console=2E > =20 > Sponsored by: Cloud Software Group > Reviewed by: markj > Differential revision: https://reviews=2Efreebsd=2Eorg/D43764 >--- > sys/x86/include/xen/xen-os=2Eh | 2 - > sys/x86/x86/identcpu=2Ec | 10 ++++- > sys/x86/xen/hvm=2Ec | 105 +++++------------------------------= -------- > sys/x86/xen/pv=2Ec | 17 +------ > 4 files changed, 22 insertions(+), 112 deletions(-) > >diff --git a/sys/x86/include/xen/xen-os=2Eh b/sys/x86/include/xen/xen-os= =2Eh >index ec0d4b1ab9f1=2E=2Ed3f21e2a6c45 100644 >--- a/sys/x86/include/xen/xen-os=2Eh >+++ b/sys/x86/include/xen/xen-os=2Eh >@@ -52,8 +52,6 @@ extern int xen_disable_pv_disks; > /* tunable for disabling PV nics */ > extern int xen_disable_pv_nics; >=20 >-extern uint32_t xen_cpuid_base; >- > /* compatibility for accessing xen_ulong_t with atomics */ > #define atomic_clear_xen_ulong atomic_clear_long > #define atomic_set_xen_ulong atomic_set_long >diff --git a/sys/x86/x86/identcpu=2Ec b/sys/x86/x86/identcpu=2Ec >index 6df138bccba1=2E=2E919dda722d71 100644 >--- a/sys/x86/x86/identcpu=2Ec >+++ b/sys/x86/x86/identcpu=2Ec >@@ -67,6 +67,10 @@ > #include > #include >=20 >+#ifdef XENHVM >+#include >+#endif >+ > #ifdef __i386__ > #define IDENTBLUE_CYRIX486 0 > #define IDENTBLUE_IBMCPU 1 >@@ -1345,7 +1349,11 @@ static struct { > int vm_guest; > void (*init)(void); > } vm_cpuids[] =3D { >- { "XenVMMXenVMM", VM_GUEST_XEN }, /* XEN */ >+ { "XenVMMXenVMM", VM_GUEST_XEN, >+#ifdef XENHVM >+ &xen_early_init, >+#endif >+ }, /* XEN */ > { "Microsoft Hv", VM_GUEST_HV }, /* Microsoft Hyper-V */ > { "VMwareVMware", VM_GUEST_VMWARE }, /* VMware VM */ > { "KVMKVMKVM", VM_GUEST_KVM }, /* KVM */ >diff --git a/sys/x86/xen/hvm=2Ec b/sys/x86/xen/hvm=2Ec >index 6336602c8bc4=2E=2E17500516debf 100644 >--- a/sys/x86/xen/hvm=2Ec >+++ b/sys/x86/xen/hvm=2Ec >@@ -104,22 +104,6 @@ void xen_emergency_print(const char *str, size_t siz= e) > outsb(XEN_HVM_DEBUGCONS_IOPORT, str, size); > } >=20 >-uint32_t xen_cpuid_base; >- >-static uint32_t >-xen_hvm_cpuid_base(void) >-{ >- uint32_t base, regs[4]; >- >- for (base =3D 0x40000000; base < 0x40010000; base +=3D 0x100) { >- do_cpuid(base, regs); >- if (!memcmp("XenVMMXenVMM", ®s[1], 12) >- && (regs[0] - base) >=3D 2) >- return (base); >- } >- return (0); >-} >- > static void > hypervisor_quirks(unsigned int major, unsigned int minor) > { >@@ -156,38 +140,6 @@ hypervisor_version(void) > hypervisor_quirks(major, minor); > } >=20 >-/* >- * Allocate and fill in the hypcall page=2E >- */ >-int >-xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type init_type) >-{ >- uint32_t regs[4]; >- >- if (xen_cpuid_base !=3D 0) >- /* Already setup=2E */ >- goto out; >- >- xen_cpuid_base =3D xen_hvm_cpuid_base(); >- if (xen_cpuid_base =3D=3D 0) >- return (ENXIO); >- >- /* >- * Find the hypercall pages=2E >- */ >- do_cpuid(xen_cpuid_base + 2, regs); >- if (regs[0] !=3D 1) >- return (EINVAL); >- >- wrmsr(regs[1], (init_type =3D=3D XEN_HVM_INIT_EARLY) >- ? (vm_paddr_t)((uintptr_t)&hypercall_page - KERNBASE) >- : vtophys(&hypercall_page)); >- >-out: >- hypervisor_version(); >- return (0); >-} >- > /* > * Translate linear to physical address when still running on the bootlo= ader > * created page-tables=2E >@@ -336,12 +288,14 @@ xen_early_init(void) > uint32_t regs[4]; > int rc; >=20 >- xen_cpuid_base =3D xen_hvm_cpuid_base(); >- if (xen_cpuid_base =3D=3D 0) >+ if (hv_high < hv_base + 2) { >+ xc_printf("Invalid maximum leaves for hv_base\n"); >+ vm_guest =3D VM_GUEST_VM; > return; >+ } >=20 > /* Find the hypercall pages=2E */ >- do_cpuid(xen_cpuid_base + 2, regs); >+ do_cpuid(hv_base + 2, regs); > if (regs[0] !=3D 1) { > xc_printf("Invalid number of hypercall pages %u\n", > regs[0]); >@@ -362,33 +316,6 @@ xen_early_init(void) > fixup_console(); > } >=20 >-static void >-xen_hvm_init_shared_info_page(void) >-{ >- struct xen_add_to_physmap xatp; >- >- if (xen_pv_domain()) { >- /* >- * Already setup in the PV case, shared_info is passed inside >- * of the start_info struct at start of day=2E >- */ >- return; >- } >- >- if (HYPERVISOR_shared_info =3D=3D NULL) { >- HYPERVISOR_shared_info =3D malloc(PAGE_SIZE, M_XENHVM, M_NOWAIT); >- if (HYPERVISOR_shared_info =3D=3D NULL) >- panic("Unable to allocate Xen shared info page"); >- } >- >- xatp=2Edomid =3D DOMID_SELF; >- xatp=2Eidx =3D 0; >- xatp=2Espace =3D XENMAPSPACE_shared_info; >- xatp=2Egpfn =3D vtophys(HYPERVISOR_shared_info) >> PAGE_SHIFT; >- if (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp)) >- panic("HYPERVISOR_memory_op failed"); >-} >- > static int > set_percpu_callback(unsigned int vcpu) > { >@@ -505,32 +432,29 @@ xen_hvm_disable_emulated_devices(void) > static void > xen_hvm_init(enum xen_hvm_init_type init_type) > { >- int error; >- int i; >+ unsigned int i; >=20 > if (!xen_domain() || > init_type =3D=3D XEN_HVM_INIT_CANCELLED_SUSPEND) > return; >=20 >- error =3D xen_hvm_init_hypercall_stubs(init_type); >+ hypervisor_version(); >=20 > switch (init_type) { > case XEN_HVM_INIT_LATE: >- if (error !=3D 0) >- return; >- > setup_xen_features(); > #ifdef SMP > cpu_ops =3D xen_hvm_cpu_ops; > #endif > break; > case XEN_HVM_INIT_RESUME: >- if (error !=3D 0) >- panic("Unable to init Xen hypercall stubs on resume"); >- > /* Clear stale vcpu_info=2E */ > CPU_FOREACH(i) > DPCPU_ID_SET(i, vcpu_info, NULL); >+ >+ if (map_shared_info() !=3D 0) >+ panic("cannot map Xen shared info page"); >+ > break; > default: > panic("Unsupported HVM initialization type"); >@@ -540,13 +464,6 @@ xen_hvm_init(enum xen_hvm_init_type init_type) > xen_evtchn_needs_ack =3D false; > xen_hvm_set_callback(NULL); >=20 >- /* >- * On (PV)HVM domains we need to request the hypervisor to >- * fill the shared info page, for PVH guest the shared_info page >- * is passed inside the start_info struct and is already set, so this >- * functions are no-ops=2E >- */ >- xen_hvm_init_shared_info_page(); > xen_hvm_disable_emulated_devices(); > }=20 >=20 >diff --git a/sys/x86/xen/pv=2Ec b/sys/x86/xen/pv=2Ec >index e33fa41c83d7=2E=2E0e6492b124b8 100644 >--- a/sys/x86/xen/pv=2Ec >+++ b/sys/x86/xen/pv=2Ec >@@ -147,12 +147,9 @@ isxen(void) > } >=20 > #define CRASH(=2E=2E=2E) do { \ >- if (isxen()) { \ >+ if (isxen()) \ > xc_printf(__VA_ARGS__); \ >- HYPERVISOR_shutdown(SHUTDOWN_crash); \ >- } else { \ >- halt(); \ >- } \ >+ halt(); \ > } while (0) >=20 > uint64_t >@@ -162,16 +159,6 @@ hammer_time_xen(vm_paddr_t start_info_paddr) > uint64_t physfree; > char *kenv; >=20 >- if (isxen()) { >- vm_guest =3D VM_GUEST_XEN; >- xen_early_init(); >- if (xen_cpuid_base =3D=3D 0) { >- xc_printf( >- "ERROR: failed to initialize hypercall page\n"); >- HYPERVISOR_shutdown(SHUTDOWN_crash); >- } >- } >- > start_info =3D (struct hvm_start_info *)(start_info_paddr + KERNBASE); > if (start_info->magic !=3D XEN_HVM_START_MAGIC_VALUE) { > CRASH("Unknown magic value in start_info struct: %#x\n", This breaks i386 kernel build /home/bapt/worktrees/main/sys/x86/xen/hvm=2Ec:156:47: error: format specif= ies type 'unsigned long' but the argument has type 'uintptr_t' (aka 'unsign= ed int') [-Werror,-Wformat] Bapt ------X3FJVLSHKXFQGXUY681CX7HTPDB8CZ Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Le 22= f=C3=A9vrier 2024 11:31:28 GMT+01:00, "Roger Pau Monn=C3=A9" <royger@Fr= eeBSD=2Eorg> a =C3=A9crit=C2=A0:
The branch main has been updated b= y royger:

URL: https://cgit=2EFreeBSD=2Eorg/= src/commit/?id=3D8f5406c77f1b7009c36df4e025fd8789a46d33ce

commit= 8f5406c77f1b7009c36df4e025fd8789a46d33ce
Author: Roger Pau Monn=C3= =A9 <royger@FreeBSD=2Eorg>
AuthorDate: 2024-02-02 10:56:32 +0000Commit: Roger Pau Monn=C3=A9 <royger@FreeBSD=2Eorg>
CommitDa= te: 2024-02-22 10:08:05 +0000

x86/xen: implement early init hook=

Unify the HVM and PVH early setup, byt making both rely on = the hypervisor
initialization hook part of identify_hypervisor()=2E<= br>
The current initialization takes care of the hypercall page,= the sahred info
page and does any fixup necessary to metadata video= console information if
FreeBSD is booted as the initial domain (so = the video console is handed from
Xen into FreeBSD)=2E

= Note this has the nice side effect of also allowing to use the Xen console= on
HVM guests, which allows to get rid of the QEMU emulated uart an= d still get
a nice text console=2E

Sponsored by: Clou= d Software Group
Reviewed by: markj
Differential revision: https://reviews=2Efreebsd= =2Eorg/D43764
sys/x86/include/xen/xen-os=2Eh | 2 -
sys/x86/x8= 6/identcpu=2Ec | 10 ++++-
sys/x86/xen/hvm=2Ec | 105 += ++++--------------------------------------
sys/x86/xen/pv=2Ec = | 17 +------
4 files changed, 22 insertions(+), 112 deletions(-)
diff --git a/sys/x86/include/xen/xen-os=2Eh b/sys/x86/include/xen/xen-= os=2Eh
index ec0d4b1ab9f1=2E=2Ed3f21e2a6c45 100644
--- a/sys/x86/incl= ude/xen/xen-os=2Eh
+++ b/sys/x86/include/xen/xen-os=2Eh
@@ -52,8 +52,= 6 @@ extern int xen_disable_pv_disks;
/* tunable for disabling PV nics = */
extern int xen_disable_pv_nics;

-extern uint32_t xen_cpuid_b= ase;
-
/* compatibility for accessing xen_ulong_t with atomics */ #define atomic_clear_xen_ulong atomic_clear_long
#define atomic_set_= xen_ulong atomic_set_long
diff --git a/sys/x86/x86/identcpu=2Ec b/sys/x= 86/x86/identcpu=2Ec
index 6df138bccba1=2E=2E919dda722d71 100644
--- a= /sys/x86/x86/identcpu=2Ec
+++ b/sys/x86/x86/identcpu=2Ec
@@ -67,6 +67= ,10 @@
#include <x86/isa/icu=2Eh>
#include <x86/vmware=2Eh= >

+#ifdef XENHVM
+#include <xen/xen-os=2Eh>
+#endif<= br>+
#ifdef __i386__
#define IDENTBLUE_CYRIX486 0
#define IDENT= BLUE_IBMCPU 1
@@ -1345,7 +1349,11 @@ static struct {
int vm_guest;=
void (*init)(void);
} vm_cpuids[] =3D {
- { "XenVMMXenVMM", V= M_GUEST_XEN }, /* XEN */
+ { "XenVMMXenVMM", VM_GUEST_XEN,
+#ifdef X= ENHVM
+ &xen_early_init,
+#endif
+ }, /* XEN */
{ = "Microsoft Hv", VM_GUEST_HV }, /* Microsoft Hyper-V */
{ "VMwareVMwar= e", VM_GUEST_VMWARE }, /* VMware VM */
{ "KVMKVMKVM", VM_GUEST_KVM },= /* KVM */
diff --git a/sys/x86/xen/hvm=2Ec b/sys/x86/xen/hvm=2Ec
in= dex 6336602c8bc4=2E=2E17500516debf 100644
--- a/sys/x86/xen/hvm=2Ec
+= ++ b/sys/x86/xen/hvm=2Ec
@@ -104,22 +104,6 @@ void xen_emergency_print(c= onst char *str, size_t size)
outsb(XEN_HVM_DEBUGCONS_IOPORT, str, size= );
}

-uint32_t xen_cpuid_base;
-
-static uint32_t
-xen= _hvm_cpuid_base(void)
-{
- uint32_t base, regs[4];
-
- for (bas= e =3D 0x40000000; base < 0x40010000; base +=3D 0x100) {
- do_cpuid(b= ase, regs);
- if (!memcmp("XenVMMXenVMM", &regs[1], 12)
- &= amp;& (regs[0] - base) >=3D 2)
- return (base);
- }
- ret= urn (0);
-}
-
static void
hypervisor_quirks(unsigned int majo= r, unsigned int minor)
{
@@ -156,38 +140,6 @@ hypervisor_version(voi= d)
hypervisor_quirks(major, minor);
}

-/*
- * Allocate = and fill in the hypcall page=2E
- */
-int
-xen_hvm_init_hypercall_= stubs(enum xen_hvm_init_type init_type)
-{
- uint32_t regs[4];
-- if (xen_cpuid_base !=3D 0)
- /* Already setup=2E */
- goto out;=
-
- xen_cpuid_base =3D xen_hvm_cpuid_base();
- if (xen_cpuid_base= =3D=3D 0)
- return (ENXIO);
-
- /*
- * Find the hypercall pa= ges=2E
- */
- do_cpuid(xen_cpuid_base + 2, regs);
- if (regs[0] != =3D 1)
- return (EINVAL);
-
- wrmsr(regs[1], (init_type =3D=3D XE= N_HVM_INIT_EARLY)
- ? (vm_paddr_t)((uintptr_t)&hypercall_page - = KERNBASE)
- : vtophys(&hypercall_page));
-
-out:
- hype= rvisor_version();
- return (0);
-}
-
/*
* Translate linea= r to physical address when still running on the bootloader
* created p= age-tables=2E
@@ -336,12 +288,14 @@ xen_early_init(void)
uint32_t r= egs[4];
int rc;

- xen_cpuid_base =3D xen_hvm_cpuid_base();
= - if (xen_cpuid_base =3D=3D 0)
+ if (hv_high < hv_base + 2) {
+ x= c_printf("Invalid maximum leaves for hv_base\n");
+ vm_guest =3D VM_GUE= ST_VM;
return;
+ }

/* Find the hypercall pages=2E */
= - do_cpuid(xen_cpuid_base + 2, regs);
+ do_cpuid(hv_base + 2, regs);
= if (regs[0] !=3D 1) {
xc_printf("Invalid number of hypercall pages = %u\n",
regs[0]);
@@ -362,33 +316,6 @@ xen_early_init(void)
= fixup_console();
}

-static void
-xen_hvm_init_shared_i= nfo_page(void)
-{
- struct xen_add_to_physmap xatp;
-
- if (xen= _pv_domain()) {
- /*
- * Already setup in the PV case, shared_info= is passed inside
- * of the start_info struct at start of day=2E
-= */
- return;
- }
-
- if (HYPERVISOR_shared_info =3D=3D NULL= ) {
- HYPERVISOR_shared_info =3D malloc(PAGE_SIZE, M_XENHVM, M_NOWAIT);=
- if (HYPERVISOR_shared_info =3D=3D NULL)
- panic("Unable to allo= cate Xen shared info page");
- }
-
- xatp=2Edomid =3D DOMID_SELF;<= br>- xatp=2Eidx =3D 0;
- xatp=2Espace =3D XENMAPSPACE_shared_info;
- = xatp=2Egpfn =3D vtophys(HYPERVISOR_shared_info) >> PAGE_SHIFT;
- i= f (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp))
- panic("HYP= ERVISOR_memory_op failed");
-}
-
static int
set_percpu_callba= ck(unsigned int vcpu)
{
@@ -505,32 +432,29 @@ xen_hvm_disable_emulat= ed_devices(void)
static void
xen_hvm_init(enum xen_hvm_init_type in= it_type)
{
- int error;
- int i;
+ unsigned int i;

i= f (!xen_domain() ||
init_type =3D=3D XEN_HVM_INIT_CANCELLED_SUSPEN= D)
return;

- error =3D xen_hvm_init_hypercall_stubs(init_type= );
+ hypervisor_version();

switch (init_type) {
case XEN_= HVM_INIT_LATE:
- if (error !=3D 0)
- return;
-
setup_xen_= features();
#ifdef SMP
cpu_ops =3D xen_hvm_cpu_ops;
#endif break;
case XEN_HVM_INIT_RESUME:
- if (error !=3D 0)
- pa= nic("Unable to init Xen hypercall stubs on resume");
-
/* Clear st= ale vcpu_info=2E */
CPU_FOREACH(i)
DPCPU_ID_SET(i, vcpu_info, = NULL);
+
+ if (map_shared_info() !=3D 0)
+ panic("cannot map Xe= n shared info page");
+
break;
default:
panic("Unsuppor= ted HVM initialization type");
@@ -540,13 +464,6 @@ xen_hvm_init(enum xe= n_hvm_init_type init_type)
xen_evtchn_needs_ack =3D false;
xen_hv= m_set_callback(NULL);

- /*
- * On (PV)HVM domains we need to re= quest the hypervisor to
- * fill the shared info page, for PVH guest th= e shared_info page
- * is passed inside the start_info struct and is al= ready set, so this
- * functions are no-ops=2E
- */
- xen_hvm_in= it_shared_info_page();
xen_hvm_disable_emulated_devices();
}
=
diff --git a/sys/x86/xen/pv=2Ec b/sys/x86/xen/pv=2Ec
index e33fa41c8= 3d7=2E=2E0e6492b124b8 100644
--- a/sys/x86/xen/pv=2Ec
+++ b/sys/x86/x= en/pv=2Ec
@@ -147,12 +147,9 @@ isxen(void)
}

#define CRASH(= =2E=2E=2E) do { \
- if (isxen()) { \
+ if (isxen()) \
= xc_printf(__VA_ARGS__); \
- HYPERVISOR_shutdown(SHUTDOWN_crash); \=
- } else { \
- halt(); \
- } \
+ halt(); \<= br> } while (0)

uint64_t
@@ -162,16 +159,6 @@ hammer_time_xen(v= m_paddr_t start_info_paddr)
uint64_t physfree;
char *kenv;
- if (isxen()) {
- vm_guest =3D VM_GUEST_XEN;
- xen_early_init();=
- if (xen_cpuid_base =3D=3D 0) {
- xc_printf(
- "ERROR: = failed to initialize hypercall page\n");
- HYPERVISOR_shutdown(SHUTDOW= N_crash);
- }
- }
-
start_info =3D (struct hvm_start_info *)= (start_info_paddr + KERNBASE);
if (start_info->magic !=3D XEN_HVM_S= TART_MAGIC_VALUE) {
CRASH("Unknown magic value in start_info struct: = %#x\n",

This breaks i386 kernel build

/home/bapt/worktrees/main/sys/x86/x= en/hvm=2Ec:156:47: error: format specifies type 'unsigned long' but the arg= ument has type 'uintptr_t' (aka 'unsigned int') [-Werror,-Wformat]

B= apt
------X3FJVLSHKXFQGXUY681CX7HTPDB8CZ--