[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v2] x86/hvm: Allow pre-enabling x2apic mode on BSP


  • To: Teddy Astie <teddy.astie@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Wed, 21 Jan 2026 11:14:53 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vates.tech smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kb/tGiyo3qWKeaMR0COArIKTzjNddp3s/jztw8KHiG4=; b=sX6RjPHc72jxNXPXLUbBCGdsVptYihoDucUCS6jdnvUcg3/gu5ws3NB8tHUtIU9CfD5zQ0dwdwpQr8AqsukG/lds0faYCsfmDt5+lrDG+byWjdOMhRY0djjV0ULI15cRBJP+9N53pIWyzMu3AkEs0C58ea82xBO66chJ340CjcjWjdoQAHmazA+IhQkYMkwfk8oTKNDDTnX0EQaztXXhc5tW9qzKpWydm5SD7L8b56PjO5rU1fqzXGHeWKIBlc9vfVYQcEMfe8yoLttYNZNVnSYne/+3q6Ri4CstrviaaT/W46XAwejbts49KonnFv2PJLRt9WFv4+Eglo84JOUGeg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lrDogGQnxmp2zTt5CQh+Yl/NCjXmReTCfsBaVtvZ88fh7Gra9GS0FotXyxEkRJsFGHGfleMv7qBfHvDYvraZlDkP3k/foSYPYiBgMj+3pSNQONwwPYY3y0XPQGkQNRJdJ3tOU/tSa/L7oztA/Pb3TOfWF8tlivyA04dqnQin9RTrdI8+C1wCz4scINLw27PSwaHjDFlRQnqJPJFruvQkLaxUCu9GuzV70aj3ULOyJyCu0+YXUJpB7t7lHXHOaKjp+6hGR0d+YdzR8eDuM+Ab21ZhyJTlrA+wH3q+ZwZfRge4qP/U7GVckkaH8ij90WJuKG3DY2TT7IuJtqWtZXZSoA==
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Delivery-date: Wed, 21 Jan 2026 10:15:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed Nov 12, 2025 at 3:51 PM CET, Teddy Astie wrote:
> Introduce a new option to start the BSP vCPU in x2APIC mode instead
> of xAPIC mode. Expose this in xl through a new "x2apic_mode" option.
>
> Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
> ---
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
> Cc: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
>
> Later on, we could consider with this option to use x2APIC ACPI
> tables instead of xAPIC ones.
>
> There is also some room into introducing a new Kconfig option to
> only support x2apic mode, which would change how the "Xen default"
> would behave.
>
> changed in v2:
>  - only pre-enable instead of forcing
>  - use domain builder to pre-enable instead of introducing a new domain 
> creation flag

Hmmm. For dom0less/Hyperlaunch and CPU hotplug it'd be beneficial to actually
have it in the domain creation struct, I think, annoying as this might sound
(because it's a circle back to what you had before) could we keep the misc_flag
with the different meaning of "preenable x2APIC" rather than "force"?

Then on each vCPU creation (or even hotplug) we could check whether they need to
be preinitialised as x2APIC or not. Otherwise hotplug needs different treatment.

On the plus side, Hyperlaunch would merely have a new trivial binding rather
than an ad-hoc solution.

Cheers,
Alejandro



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.