lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250506130712.156583-4-ltykernel@gmail.com>
Date: Tue,  6 May 2025 09:07:08 -0400
From: Tianyu Lan <ltykernel@...il.com>
To: kys@...rosoft.com,
	haiyangz@...rosoft.com,
	wei.liu@...nel.org,
	decui@...rosoft.com,
	tglx@...utronix.de,
	mingo@...hat.com,
	bp@...en8.de,
	dave.hansen@...ux.intel.com,
	x86@...nel.org,
	hpa@...or.com,
	Neeraj.Upadhyay@....com,
	yuehaibing@...wei.com,
	kvijayab@....com,
	jacob.jun.pan@...ux.intel.com,
	jpoimboe@...nel.org,
	tiala@...rosoft.com
Cc: linux-hyperv@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [RFC PATCH 3/6] drivers/hv: Allow vmbus message synic interrupt injected from Hyper-V

From: Tianyu Lan <tiala@...rosoft.com>

When Secure AVIC is enabled, Vmbus driver should
call x2apic Secure AVIC interface to allow Hyper-V
to inject Vmbus message interrupt.

Signed-off-by: Tianyu Lan <tiala@...rosoft.com>
---
 drivers/hv/hv.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 308c8f279df8..f77c1dc0e8d4 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -20,6 +20,11 @@
 #include <linux/interrupt.h>
 #include <clocksource/hyperv_timer.h>
 #include <asm/mshyperv.h>
+
+#if IS_ENABLED(CONFIG_AMD_SECURE_AVIC)
+#include <asm/apic.h>
+#endif
+
 #include <linux/set_memory.h>
 #include "hyperv_vmbus.h"
 
@@ -311,6 +316,10 @@ void hv_synic_enable_regs(unsigned int cpu)
 		enable_percpu_irq(vmbus_irq, 0);
 	shared_sint.as_uint64 = hv_get_msr(HV_MSR_SINT0 + VMBUS_MESSAGE_SINT);
 
+#if IS_ENABLED(CONFIG_AMD_SECURE_AVIC)
+	x2apic_savic_update_vector(smp_processor_id(), vmbus_interrupt, true);
+#endif
+	
 	shared_sint.vector = vmbus_interrupt;
 	shared_sint.masked = false;
 	shared_sint.auto_eoi = hv_recommend_using_aeoi();
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ