* Re: [PATCH 1/1] X86: Handle Xen emulation of Hyper-V more gracefully
2013-04-18 15:44 [PATCH 1/1] X86: Handle Xen emulation of Hyper-V more gracefully K. Y. Srinivasan
@ 2013-04-18 14:17 ` Michael S. Tsirkin
2013-04-18 15:49 ` Please, apply patch both 3.10 and 3.9 " Victor Miasnikov
2013-04-18 17:02 ` [tip:x86/urgent] x86, hyperv: " tip-bot for K. Y. Srinivasan
1 sibling, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2013-04-18 14:17 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: gregkh, linux-kernel, devel, olaf, apw, jasowang, JBeulich, hpa
On Thu, Apr 18, 2013 at 08:44:46AM -0700, K. Y. Srinivasan wrote:
> Install the Hyper-V specific interrupt handler only when needed. This would
> permit us to get rid of the Xen check. Note that when the vmbus drivers invokes
> the call to register its handler, we are sure to be running on Hyper-V.
>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Looks good to me, this will address the concern. FWIW
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Any chance we can fast-path this patch into 3.9 so that we don't release
a kernel with hyper-v on Xen completely disabled?
> ---
> arch/x86/kernel/cpu/mshyperv.c | 18 +++++-------------
> 1 files changed, 5 insertions(+), 13 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
> index a7d26d8..8f4be53 100644
> --- a/arch/x86/kernel/cpu/mshyperv.c
> +++ b/arch/x86/kernel/cpu/mshyperv.c
> @@ -35,13 +35,6 @@ static bool __init ms_hyperv_platform(void)
> if (!boot_cpu_has(X86_FEATURE_HYPERVISOR))
> return false;
>
> - /*
> - * Xen emulates Hyper-V to support enlightened Windows.
> - * Check to see first if we are on a Xen Hypervisor.
> - */
> - if (xen_cpuid_base())
> - return false;
> -
> cpuid(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS,
> &eax, &hyp_signature[0], &hyp_signature[1], &hyp_signature[2]);
>
> @@ -82,12 +75,6 @@ static void __init ms_hyperv_init_platform(void)
>
> if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
> clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);
> -#if IS_ENABLED(CONFIG_HYPERV)
> - /*
> - * Setup the IDT for hypervisor callback.
> - */
> - alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
> -#endif
> }
>
> const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
> @@ -103,6 +90,11 @@ static irq_handler_t vmbus_isr;
>
> void hv_register_vmbus_handler(int irq, irq_handler_t handler)
> {
> + /*
> + * Setup the IDT for hypervisor callback.
> + */
> + alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
> +
> vmbus_irq = irq;
> vmbus_isr = handler;
> }
> --
> 1.7.4.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] X86: Handle Xen emulation of Hyper-V more gracefully
@ 2013-04-18 15:44 K. Y. Srinivasan
2013-04-18 14:17 ` Michael S. Tsirkin
2013-04-18 17:02 ` [tip:x86/urgent] x86, hyperv: " tip-bot for K. Y. Srinivasan
0 siblings, 2 replies; 4+ messages in thread
From: K. Y. Srinivasan @ 2013-04-18 15:44 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, jasowang, JBeulich, hpa,
mst
Cc: K. Y. Srinivasan
Install the Hyper-V specific interrupt handler only when needed. This would
permit us to get rid of the Xen check. Note that when the vmbus drivers invokes
the call to register its handler, we are sure to be running on Hyper-V.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
arch/x86/kernel/cpu/mshyperv.c | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index a7d26d8..8f4be53 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -35,13 +35,6 @@ static bool __init ms_hyperv_platform(void)
if (!boot_cpu_has(X86_FEATURE_HYPERVISOR))
return false;
- /*
- * Xen emulates Hyper-V to support enlightened Windows.
- * Check to see first if we are on a Xen Hypervisor.
- */
- if (xen_cpuid_base())
- return false;
-
cpuid(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS,
&eax, &hyp_signature[0], &hyp_signature[1], &hyp_signature[2]);
@@ -82,12 +75,6 @@ static void __init ms_hyperv_init_platform(void)
if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);
-#if IS_ENABLED(CONFIG_HYPERV)
- /*
- * Setup the IDT for hypervisor callback.
- */
- alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
-#endif
}
const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
@@ -103,6 +90,11 @@ static irq_handler_t vmbus_isr;
void hv_register_vmbus_handler(int irq, irq_handler_t handler)
{
+ /*
+ * Setup the IDT for hypervisor callback.
+ */
+ alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
+
vmbus_irq = irq;
vmbus_isr = handler;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Please, apply patch both 3.10 and 3.9 Re: [PATCH 1/1] X86: Handle Xen emulation of Hyper-V more gracefully
2013-04-18 14:17 ` Michael S. Tsirkin
@ 2013-04-18 15:49 ` Victor Miasnikov
0 siblings, 0 replies; 4+ messages in thread
From: Victor Miasnikov @ 2013-04-18 15:49 UTC (permalink / raw)
To: gregkh, devel, linux-kernel
Cc: K. Y. Srinivasan, Michael S. Tsirkin, hpa, JBeulich, jasowang,
apw, olaf
Hi!
>> - /*
>> - * Xen emulates Hyper-V to support enlightened Windows.
>> - * Check to see first if we are on a Xen Hypervisor.
>> - */
>> - if (xen_cpuid_base())
>> - return false;
. . .
>> void hv_register_vmbus_handler(int irq, irq_handler_t handler)
>> {
>> + /*
>> + * Setup the IDT for hypervisor callback.
>> + */
>> + alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
>> +
Michael S. Tsirkin> Any chance we can fast-path this patch into 3.9 so
Michael S. Tsirkin> that we don't release a kernel with hyper-v on Xen completely disabled?
Yes, this backport from linux-next ( future 3.10 ) to 3.9 ( on 2013-04-18 -- 3.9-rc(7+N) ) look like usefull . . .
Please, apply patch both 3.10 and 3.9
Best regards, Victor Miasnikov
Blog: http://vvm.blog.tut.by/
----- Original Message -----
From: "Michael S. Tsirkin"
To: "K. Y. Srinivasan"
Cc:
Sent: Thursday, April 18, 2013 5:17 PM
Subject: Re: [PATCH 1/1] X86: Handle Xen emulation of Hyper-V more gracefully
> On Thu, Apr 18, 2013 at 08:44:46AM -0700, K. Y. Srinivasan wrote:
>> Install the Hyper-V specific interrupt handler only when needed. This would
>> permit us to get rid of the Xen check. Note that when the vmbus drivers invokes
>> the call to register its handler, we are sure to be running on Hyper-V.
>>
>> Signed-off-by: K. Y. Srinivasan
>
> Looks good to me, this will address the concern. FWIW
>
> Acked-by: Michael S. Tsirkin
>
> Any chance we can fast-path this patch into 3.9 so that we don't release
> a kernel with hyper-v on Xen completely disabled?
>
>> ---
. . .
>> - /*
>> - * Xen emulates Hyper-V to support enlightened Windows.
>> - * Check to see first if we are on a Xen Hypervisor.
>> - */
>> - if (xen_cpuid_base())
>> - return false;
>> -
>> cpuid(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS,
>> &eax, &hyp_signature[0], &hyp_signature[1], &hyp_signature[2]);
>>
>> @@ -82,12 +75,6 @@ static void __init ms_hyperv_init_platform(void)
>>
>> if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
>> clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);
>> -#if IS_ENABLED(CONFIG_HYPERV)
>> - /*
>> - * Setup the IDT for hypervisor callback.
>> - */
>> - alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
>> -#endif
>> }
. . .
>> void hv_register_vmbus_handler(int irq, irq_handler_t handler)
>> {
>> + /*
>> + * Setup the IDT for hypervisor callback.
>> + */
>> + alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
>> +
>> vmbus_irq = irq;
. . .
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:x86/urgent] x86, hyperv: Handle Xen emulation of Hyper-V more gracefully
2013-04-18 15:44 [PATCH 1/1] X86: Handle Xen emulation of Hyper-V more gracefully K. Y. Srinivasan
2013-04-18 14:17 ` Michael S. Tsirkin
@ 2013-04-18 17:02 ` tip-bot for K. Y. Srinivasan
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for K. Y. Srinivasan @ 2013-04-18 17:02 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, mst, kys, tglx, hpa
Commit-ID: 7eff7ded02d1b15ba8321664839b353fa6c0c1e4
Gitweb: http://git.kernel.org/tip/7eff7ded02d1b15ba8321664839b353fa6c0c1e4
Author: K. Y. Srinivasan <kys@microsoft.com>
AuthorDate: Thu, 18 Apr 2013 08:44:46 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 18 Apr 2013 08:59:20 -0700
x86, hyperv: Handle Xen emulation of Hyper-V more gracefully
Install the Hyper-V specific interrupt handler only when needed. This would
permit us to get rid of the Xen check. Note that when the vmbus drivers invokes
the call to register its handler, we are sure to be running on Hyper-V.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Link: http://lkml.kernel.org/r/1366299886-6399-1-git-send-email-kys@microsoft.com
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/kernel/cpu/mshyperv.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index a7d26d8..8f4be53 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -35,13 +35,6 @@ static bool __init ms_hyperv_platform(void)
if (!boot_cpu_has(X86_FEATURE_HYPERVISOR))
return false;
- /*
- * Xen emulates Hyper-V to support enlightened Windows.
- * Check to see first if we are on a Xen Hypervisor.
- */
- if (xen_cpuid_base())
- return false;
-
cpuid(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS,
&eax, &hyp_signature[0], &hyp_signature[1], &hyp_signature[2]);
@@ -82,12 +75,6 @@ static void __init ms_hyperv_init_platform(void)
if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);
-#if IS_ENABLED(CONFIG_HYPERV)
- /*
- * Setup the IDT for hypervisor callback.
- */
- alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
-#endif
}
const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
@@ -103,6 +90,11 @@ static irq_handler_t vmbus_isr;
void hv_register_vmbus_handler(int irq, irq_handler_t handler)
{
+ /*
+ * Setup the IDT for hypervisor callback.
+ */
+ alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
+
vmbus_irq = irq;
vmbus_isr = handler;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-18 17:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 15:44 [PATCH 1/1] X86: Handle Xen emulation of Hyper-V more gracefully K. Y. Srinivasan
2013-04-18 14:17 ` Michael S. Tsirkin
2013-04-18 15:49 ` Please, apply patch both 3.10 and 3.9 " Victor Miasnikov
2013-04-18 17:02 ` [tip:x86/urgent] x86, hyperv: " tip-bot for K. Y. Srinivasan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.