linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH  0/3] X86: Deliver Hyper-V interrupts on a seperate IDT vector
@ 2013-02-04  1:21 K. Y. Srinivasan
  2013-02-04  1:22 ` [PATCH 1/3] x86: Hyper-V: register clocksource only if its advertised K. Y. Srinivasan
  2013-02-05 11:16 ` [PATCH 0/3] X86: Deliver Hyper-V interrupts on a seperate IDT vector KY Srinivasan
  0 siblings, 2 replies; 43+ messages in thread
From: K. Y. Srinivasan @ 2013-02-04  1:21 UTC (permalink / raw)
  To: x86, gregkh, linux-kernel, devel, olaf, apw, jasowang, tglx, hpa,
	JBeulich, bp
  Cc: K. Y. Srinivasan

This patch-set implements the functionality to deliver Hyper-V VMBUS interrupts via
a special IDT entry. Xen emulates Hyper-V and I have added code in this patch-set to
properly manage this emulation when Linux is running on Hyper-V.

K. Y. Srinivasan (2):
  X86: Add a check to catch Xen emulation of Hyper-V
  X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts

Olaf Hering (1):
  x86: Hyper-V: register clocksource only if its advertised

 arch/x86/include/asm/irq_vectors.h |    4 +-
 arch/x86/include/asm/mshyperv.h    |    4 ++
 arch/x86/kernel/cpu/mshyperv.c     |   54 +++++++++++++++++++++++++++++++++++-
 arch/x86/kernel/entry_32.S         |    9 +++++-
 arch/x86/kernel/entry_64.S         |    7 ++++-
 drivers/xen/events.c               |    7 ++--
 6 files changed, 77 insertions(+), 8 deletions(-)

-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 43+ messages in thread
* Re: KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ? Or "KVM emulates Hyper-V" as "Hyper-V emulates Hyper-V" ? Re: [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V
@ 2013-04-17 13:49 Victor Miasnikov
  0 siblings, 0 replies; 43+ messages in thread
From: Victor Miasnikov @ 2013-04-17 13:49 UTC (permalink / raw)
  To: devel, linux-kernel

Hi!

2013/4/17 Jan Beulich
>
> >>> On 17.04.13 at 12:16, "Michael S. Tsirkin"  wrote:
> > If the hypervisor says it's Hyper-V, that's because it wants
> > guests to use Hyper-V. I don't see why is guest second-guessing
> > this a good idea.
>
> There are two reasons here: For one, when the hypervisor is not
> Hyper-V, but is providing some Hyper-V emulation, that's intended
> for Windows guests to use, not e.g. Linux ones, especially when
> such guests could use the native hypervisor interface with much
> greater benefit.
>
> And second, there reportedly are features of (newer?) Hyper-V
> that some emulation may not provide, but that are also not easily
> detectable.
>


Yes

+



> On Wed, Apr 17, 2013 at 12:10:01PM +0300, Victor Miasnikov wrote:



>>
>> Question is very simple:  Hyper-V users/sysadmins need wait patch a-la this:
>> Or  "KVM_and_or_XEN_or_other_Hypervisor_what_has_non-full-emulation_of_Hyper-V emulates Hyper-V" as "Hyper-V emulates
>> Hyper-V" ?
>>
>
> No.  You are using Hyper-V, not the KVM_and_or_XEN_or_other_Hypervisor_what_has_non-full-emulation_of_Hyper-V
> emulation of it.
> No patches dealing with this emulation should have any effect on you.


 This is _positive_ variant of possible future,
but on _practic_ very often we need prevent _negative_ variant of possible future


>> ==
>> + /*
>> +  * KVM_and_or_XEN_or_other_Hypervisor_what_has_non-full-emulation_of_Hyper-V emulates Hyper-V to support
>> enlightened Windows.
>> +  * Check to see first if we are on a KVM_and_or_XEN_or_other_Hypervisor_what_has_non-full-emulation_of_Hyper-V
>> Hypervisor.
>> +  */
>> +
>> + if (KVM_and_or_XEN_or_other_Hypervisor_what_has_non-full-emulation_of_Hyper-V_cpuid_base())
>> +  return false;

>
> If the hypervisor says it's Hyper-V, that's because it wants guests to use Hyper-V.
>


 Even if guest ( i.e. Virtual Computer) contain Linux OS ?


>> ==
>> KVM_and_or_XEN_or_other_Hypervisor_what_has_non-full-emulation_of_Hyper-V emulates Hyper-V to host enlightened
>> Windows.
>>
>> . . .
>>
>> [ hpa: the problem here is that
>> KVM_and_or_XEN_or_other_Hypervisor_what_has_non-full-emulation_of_Hyper-V doesn't emulate Hyper-V well enough,  .
>>  . ]
>
> What's emulated not well enough?
>

 In case of XEN variant non-full-emulation_of_Hyper-V , IMHO :

{{
----- Original Message ----- 
From: "Victor Miasnikov"
To: "Michael S. Tsirkin"
Sent: Wednesday, April 17, 2013 12:41 PM
Subject: IMHO, XEN emulation of Hyper-V not contain needed clocksource for Lunux guest Re: [PATCH 2/3] X86: Add a check
to catch Xen emulation of Hyper-V

Hi!

> It seems that one might want to use hyper-v emulation e.g. to test
> hyper-v code without using windows, so the functionality
> that this patch disables is not completely useless,
> so there should be a good reason for disabling it.

 As I undestand, XEN emulation of Hyper-V not contain  needed clocksource for Lunux guest ( virtual computers)

I.e. Linux VM "think" what is running on Hyper-V host call clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100)
and a-la BSOD or vice versa . . .


> I went over the original discussion in
> https://patchwork.kernel.org/patch/2064331/
> and that's still not clear to me. Is there a configuration
> that is broken without this patch but starts working with
> this patch?


 IMHO, this related to:

- clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);
+ if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
+  clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);


 See

https://lkml.org/lkml/2013/2/12/623
==
            Date Tue, 12 Feb 2013 16:56:07 -0800
            From tip-bot for Olaf Hering
            Subject [tip:x86/hyperv] x86: Hyper-V: register clocksource only if its advertised

 . . .

==



Best regards, Victor Miasnikov
}}





Best regards, Victor Miasnikov
Blog:  http://vvm.blog.tut.by/


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2013-04-18 13:33 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-04  1:21 [PATCH 0/3] X86: Deliver Hyper-V interrupts on a seperate IDT vector K. Y. Srinivasan
2013-02-04  1:22 ` [PATCH 1/3] x86: Hyper-V: register clocksource only if its advertised K. Y. Srinivasan
2013-02-04  1:22   ` [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V K. Y. Srinivasan
2013-02-13  0:57     ` [tip:x86/hyperv] " tip-bot for K. Y. Srinivasan
2013-04-17  7:06     ` [PATCH 2/3] " Michael S. Tsirkin
2013-04-17  9:10       ` KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ? Or "KVM emulates Hyper-V" as "Hyper-V emulates Hyper-V" ? " Victor Miasnikov
2013-04-17 10:16         ` Michael S. Tsirkin
2013-04-17 12:12           ` Jan Beulich
2013-04-17 12:15             ` Michael S. Tsirkin
     [not found]             ` <CAP2xkNqGgbYz1gdS85xjA8gwROGY89fAsiaRiGSE90xnzjJ4Xw@mail.gmail.com>
2013-04-17 12:43               ` Michael S. Tsirkin
2013-04-17 14:08                 ` Victor Miasnikov
2013-04-17 13:20       ` KY Srinivasan
2013-04-17 12:48         ` Michael S. Tsirkin
2013-04-17 14:12           ` KY Srinivasan
2013-04-17 13:25             ` Michael S. Tsirkin
2013-04-17 14:34               ` KY Srinivasan
2013-04-17 13:48                 ` Michael S. Tsirkin
2013-04-17 15:31                   ` KY Srinivasan
2013-04-17 15:50                     ` Jan Beulich
2013-04-17 16:28                       ` KY Srinivasan
2013-04-18  7:48                         ` Michael S. Tsirkin
2013-04-18 13:23                           ` KY Srinivasan
2013-04-18 13:30                             ` KY Srinivasan
2013-04-17 13:52         ` Jan Beulich
2013-04-17 13:01           ` Michael S. Tsirkin
2013-04-17 13:11             ` Michael S. Tsirkin
2013-04-17 14:09             ` Jan Beulich
2013-04-17 15:17               ` H. Peter Anvin
2013-02-04  1:22   ` [PATCH 3/3] X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts K. Y. Srinivasan
2013-02-13  0:58     ` [tip:x86/hyperv] " tip-bot for K. Y. Srinivasan
2013-02-13  1:58       ` [tip:x86/hyperv] x86, hyperv: HYPERV depends on X86_LOCAL_APIC tip-bot for H. Peter Anvin
2013-02-13  2:05         ` KY Srinivasan
2013-02-13  2:56       ` [tip:x86/hyperv] X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts Yinghai Lu
2013-02-13  3:32         ` KY Srinivasan
2013-02-13  3:46           ` H. Peter Anvin
2013-02-13  3:49             ` KY Srinivasan
2013-02-13  3:54               ` H. Peter Anvin
2013-02-13  3:58                 ` KY Srinivasan
2013-02-13  4:42                   ` Yinghai Lu
2013-02-13 12:47                     ` KY Srinivasan
2013-02-13  0:56   ` [tip:x86/hyperv] x86: Hyper-V: register clocksource only if its advertised tip-bot for Olaf Hering
2013-02-05 11:16 ` [PATCH 0/3] X86: Deliver Hyper-V interrupts on a seperate IDT vector KY Srinivasan
2013-04-17 13:49 KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ? Or "KVM emulates Hyper-V" as "Hyper-V emulates Hyper-V" ? Re: [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V Victor Miasnikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).