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

Commit 6c248aad authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: Base autoeoi enablement based on hypervisor hints



Don't enable auto-eoi if the hypervisor recommends otherwise. This will
enable vAPIC functionality if available.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4539673a
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -147,6 +147,11 @@
 */
 */
#define HV_X64_RELAXED_TIMING_RECOMMENDED	(1 << 5)
#define HV_X64_RELAXED_TIMING_RECOMMENDED	(1 << 5)


/*
 * Virtual APIC support
 */
#define HV_X64_DEPRECATING_AEOI_RECOMMENDED	(1 << 9)

/*
/*
 * Crash notification flag.
 * Crash notification flag.
 */
 */
+4 −1
Original line number Original line Diff line number Diff line
@@ -254,6 +254,9 @@ int hv_synic_init(unsigned int cpu)
	shared_sint.as_uint64 = 0;
	shared_sint.as_uint64 = 0;
	shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
	shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
	shared_sint.masked = false;
	shared_sint.masked = false;
	if (ms_hyperv.hints & HV_X64_DEPRECATING_AEOI_RECOMMENDED)
		shared_sint.auto_eoi = false;
	else
		shared_sint.auto_eoi = true;
		shared_sint.auto_eoi = true;


	hv_set_synint_state(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT,
	hv_set_synint_state(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT,