Skip to content

Commit ecca250

Browse files
yakuizhaosuryasaimadhu
authored andcommitted
x86/Kconfig: Add new X86_HV_CALLBACK_VECTOR config symbol
Add a special Kconfig symbol X86_HV_CALLBACK_VECTOR so that the guests using the hypervisor interrupt callback counter can select and thus enable that counter. Select it when xen or hyperv support is enabled. No functional changes. Signed-off-by: Zhao Yakui <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Cc: Boris Ostrovsky <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Juergen Gross <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: [email protected] Cc: Nicolai Stange <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> Cc: Stefano Stabellini <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: x86-ml <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent d1fdb6d commit ecca250

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

arch/x86/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,9 @@ config PARAVIRT_SPINLOCKS
781781

782782
If you are unsure how to answer this question, answer Y.
783783

784+
config X86_HV_CALLBACK_VECTOR
785+
def_bool n
786+
784787
source "arch/x86/xen/Kconfig"
785788

786789
config KVM_GUEST

arch/x86/include/asm/hardirq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef struct {
3737
#ifdef CONFIG_X86_MCE_AMD
3838
unsigned int irq_deferred_error_count;
3939
#endif
40-
#if IS_ENABLED(CONFIG_HYPERV) || defined(CONFIG_XEN)
40+
#ifdef CONFIG_X86_HV_CALLBACK_VECTOR
4141
unsigned int irq_hv_callback_count;
4242
#endif
4343
#if IS_ENABLED(CONFIG_HYPERV)

arch/x86/kernel/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)
135135
seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
136136
seq_puts(p, " Machine check polls\n");
137137
#endif
138-
#if IS_ENABLED(CONFIG_HYPERV) || defined(CONFIG_XEN)
138+
#ifdef CONFIG_X86_HV_CALLBACK_VECTOR
139139
if (test_bit(HYPERVISOR_CALLBACK_VECTOR, system_vectors)) {
140140
seq_printf(p, "%*s: ", prec, "HYP");
141141
for_each_online_cpu(j)

arch/x86/xen/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config XEN
77
bool "Xen guest support"
88
depends on PARAVIRT
99
select PARAVIRT_CLOCK
10+
select X86_HV_CALLBACK_VECTOR
1011
depends on X86_64 || (X86_32 && X86_PAE)
1112
depends on X86_LOCAL_APIC && X86_TSC
1213
help

drivers/hv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ config HYPERV
66
tristate "Microsoft Hyper-V client drivers"
77
depends on X86 && ACPI && X86_LOCAL_APIC && HYPERVISOR_GUEST
88
select PARAVIRT
9+
select X86_HV_CALLBACK_VECTOR
910
help
1011
Select this option to run Linux as a Hyper-V client operating
1112
system.

0 commit comments

Comments
 (0)