Skip to content

Commit 0d63e4c

Browse files
Saurabh Sengarliuw
authored andcommitted
x86/hyperv: Allow 15-bit APIC IDs for VTL platforms
The current method for signaling the compatibility of a Hyper-V host with MSIs featuring 15-bit APIC IDs relies on a synthetic cpuid leaf. However, for higher VTLs, this leaf is not reported, due to the absence of an IO-APIC. As an alternative, assume that when running at a high VTL, the host supports 15-bit APIC IDs. This assumption is safe, as Hyper-V does not employ any architectural MSIs at higher VTLs This unblocks startup of VTL2 environments with more than 256 CPUs. Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/1705341460-18394-1-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <1705341460-18394-1-git-send-email-ssengar@linux.microsoft.com>
1 parent 0f34d11 commit 0d63e4c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

arch/x86/hyperv/hv_vtl.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
extern struct boot_params boot_params;
1717
static struct real_mode_header hv_vtl_real_mode_header;
1818

19+
static bool __init hv_vtl_msi_ext_dest_id(void)
20+
{
21+
return true;
22+
}
23+
1924
void __init hv_vtl_init_platform(void)
2025
{
2126
pr_info("Linux runs in Hyper-V Virtual Trust Level\n");
@@ -38,6 +43,8 @@ void __init hv_vtl_init_platform(void)
3843
x86_platform.legacy.warm_reset = 0;
3944
x86_platform.legacy.reserve_bios_regions = 0;
4045
x86_platform.legacy.devices.pnpbios = 0;
46+
47+
x86_init.hyper.msi_ext_dest_id = hv_vtl_msi_ext_dest_id;
4148
}
4249

4350
static inline u64 hv_vtl_system_desc_base(struct ldttss_desc *desc)

0 commit comments

Comments
 (0)