Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32c9c801 authored by Jan Kiszka's avatar Jan Kiszka Committed by Thomas Gleixner
Browse files

x86/apic: Install an empty physflat_init_apic_ldr



As the comment already stated, there is no need for setting up LDR (and
DFR) in physflat mode as it remains unused (see SDM, 10.6.2.1).
flat_init_apic_ldr only served as a placeholder for a nop operation so
far, causing no harm.

That will change when running over the Jailhouse hypervisor. Here we
must not touch LDR in a way that destroys the mapping originally set up
by the Linux root cell. Jailhouse enforces this setting in order to
efficiently validate any IPI requests sent by a cell.

Avoid a needless clash caused by flat_init_apic_ldr by installing a true
nop handler.

Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: jailhouse-dev@googlegroups.com
Link: https://lkml.kernel.org/r/f9867d294cdae4d45ed89d3a2e6adb524f4f6794.1511770314.git.jan.kiszka@siemens.com
parent c92a9a46
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -218,6 +218,15 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
	return 0;
}

static void physflat_init_apic_ldr(void)
{
	/*
	 * LDR and DFR are not involved in physflat mode, rather:
	 * "In physical destination mode, the destination processor is
	 * specified by its local APIC ID [...]." (Intel SDM, 10.6.2.1)
	 */
}

static void physflat_send_IPI_allbutself(int vector)
{
	default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
@@ -251,8 +260,7 @@ static struct apic apic_physflat __ro_after_init = {
	.dest_logical			= 0,
	.check_apicid_used		= NULL,

	/* not needed, but shouldn't hurt: */
	.init_apic_ldr			= flat_init_apic_ldr,
	.init_apic_ldr			= physflat_init_apic_ldr,

	.ioapic_phys_id_map		= NULL,
	.setup_apic_routing		= NULL,