Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers: hv: Allow vmbus message synic interrupt injected from Hyper-V

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

Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Signed-off-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>

authored by

Tianyu Lan and committed by
Wei Liu
3e1b6115 f34f5e57

+13
+5
arch/x86/hyperv/hv_apic.c
··· 53 53 wrmsrq(HV_X64_MSR_ICR, reg_val); 54 54 } 55 55 56 + void hv_enable_coco_interrupt(unsigned int cpu, unsigned int vector, bool set) 57 + { 58 + apic_update_vector(cpu, vector, set); 59 + } 60 + 56 61 static u32 hv_apic_read(u32 reg) 57 62 { 58 63 u32 reg_val, hi;
+2
drivers/hv/hv.c
··· 307 307 } 308 308 309 309 hv_set_msr(HV_MSR_SIEFP, siefp.as_uint64); 310 + hv_enable_coco_interrupt(cpu, vmbus_interrupt, true); 310 311 311 312 /* Setup the shared SINT. */ 312 313 if (vmbus_irq != -1) ··· 351 350 /* Need to correctly cleanup in the case of SMP!!! */ 352 351 /* Disable the interrupt */ 353 352 hv_set_msr(HV_MSR_SINT0 + VMBUS_MESSAGE_SINT, shared_sint.as_uint64); 353 + hv_enable_coco_interrupt(cpu, vmbus_interrupt, false); 354 354 355 355 simp.as_uint64 = hv_get_msr(HV_MSR_SIMP); 356 356 /*
+5
drivers/hv/hv_common.c
··· 716 716 } 717 717 EXPORT_SYMBOL_GPL(hv_tdx_hypercall); 718 718 719 + void __weak hv_enable_coco_interrupt(unsigned int cpu, unsigned int vector, bool set) 720 + { 721 + } 722 + EXPORT_SYMBOL_GPL(hv_enable_coco_interrupt); 723 + 719 724 void hv_identify_partition_type(void) 720 725 { 721 726 /* Assume guest role */
+1
include/asm-generic/mshyperv.h
··· 347 347 bool hv_isolation_type_snp(void); 348 348 u64 hv_ghcb_hypercall(u64 control, void *input, void *output, u32 input_size); 349 349 u64 hv_tdx_hypercall(u64 control, u64 param1, u64 param2); 350 + void hv_enable_coco_interrupt(unsigned int cpu, unsigned int vector, bool set); 350 351 void hyperv_cleanup(void); 351 352 bool hv_query_ext_cap(u64 cap_query); 352 353 void hv_setup_dma_ops(struct device *dev, bool coherent);