From: "Victor Miasnikov" <vvm@tut.by>
To: "Michael S. Tsirkin" <mst@redhat.com>,
"K. Y. Srinivasan" <kys@microsoft.com>
Cc: <x86@kernel.org>, <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>, <devel@linuxdriverproject.org>,
<olaf@aepfle.de>, <apw@canonical.com>, <jasowang@redhat.com>,
<tglx@linutronix.de>, <hpa@zytor.com>, <JBeulich@suse.com>,
<bp@alien8.de>
Subject: 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
Date: Wed, 17 Apr 2013 12:10:01 +0300 [thread overview]
Message-ID: <39D7C3658A5B4979A3F025E1D944E743@local.st.by> (raw)
In-Reply-To: 20130417070616.GA4487@redhat.com
Hi!
Short:
>> >> When KVM runs in Hyper-V emulation mode it expects to get Hyper-V hypercalls.
>> >> Mixing KVM hypercalls and Hyper-V requires some tricks. It
VVM>> KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ?
> It's not related.
Are You shue?
Xen-team _think_ too what is not related, but has non-100% _full_ emulation of Hyper-V and, as result, create problems
Question is very simple: Hyper-V users/sysadmins need wait patch a-la this:
==
KVM emulates Hyper-V to host enlightened Windows.
. . .
[ hpa: the problem here is that KVM doesn't emulate Hyper-V well
enough, . . ]
. . .
+ * KVM emulates Hyper-V to support enlightened Windows.
+ * Check to see first if we are on a KVM Hypervisor.
+ if (KVM_cpuid_base())
+ return false;
. . .
==
Or "KVM emulates Hyper-V" as "Hyper-V emulates Hyper-V" ?
--
Full:
----- Original Message -----
From: "Michael S. Tsirkin"
To: "K. Y. Srinivasan"
Cc:
Sent: Wednesday, April 17, 2013 10:06 AM
Subject: Re: [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V
> On Sun, Feb 03, 2013 at 05:22:38PM -0800, K. Y. Srinivasan wrote:
>> Xen emulates Hyper-V to host enlightened Windows. Looks like this
>> emulation may be turned on by default even for Linux guests. Check and
>> fail Hyper-V detection if we are on Xen.
>>
>> Signed-off-by: K. Y. Srinivasan kys (at) microsoft.com
>
> I'm very curious what's the specific bug that is fixed here?
> 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?
>
> 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.
>
> Could you enlighten me please? :)
Short history of question:
{{
==
> > And hypercall has its own set of problems with Windows guests.
> > When KVM runs in Hyper-V emulation mode it expects to get Hyper-V hypercalls.
> > Mixing KVM hypercalls and Hyper-V requires some tricks. It
>
> Can't we simply register a hypercall ID range with Microsoft?
>
> > may also affect WHQLing Windows drivers since driver will talk to HW
> > bypassing Windows interfaces.
>
> Then the WHQL'ed driver doesn't support the PV MMIO hcall?
==
KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ?
}}
{{
>> >> When KVM runs in Hyper-V emulation mode it expects to get Hyper-V hypercalls.
>> >> Mixing KVM hypercalls and Hyper-V requires some tricks. It
>> KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ?
> It's not related.
Are You shue?
Xen-team _think_ too what is not related, but has non-100% _full_ emulation of Hyper-V and, as result, create problems:
==
Xen emulates Hyper-V to host enlightened Windows. Looks like this
emulation may be turned on by default even for Linux guests. Check and
fail Hyper-V detection if we are on Xen.
[ hpa: the problem here is that Xen doesn't emulate Hyper-V well
enough, and if the Xen support isn't compiled in, we end up stubling
over the Hyper-V emulation and try to activate it -- and it fails. ]
. . .
+ /*
+ * 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;
+
==
}}
Question is very simple: Hyper-V users/sysadmins need wait patch a-la this:
==
KVM emulates Hyper-V to host enlightened Windows. Looks like this
emulation may be turned on by default even for Linux guests. Check and
fail Hyper-V detection if we are on KVM.
[ hpa: the problem here is that KVM doesn't emulate Hyper-V well
enough, and if the KVM support isn't compiled in, we end up stubling
over the Hyper-V emulation and try to activate it -- and it fails. ]
. . .
+ /*
+ * KVM emulates Hyper-V to support enlightened Windows.
+ * Check to see first if we are on a KVM Hypervisor.
+ */
+ if (KVM_cpuid_base())
+ return false;
+
==
Or "KVM emulates Hyper-V" as "Hyper-V emulates Hyper-V" ?
Best regards, Victor Miasnikov
Blog: http://vvm.blog.tut.by/
P.S.
----- Original Message -----
From: "Michael S. Tsirkin"
To: "Victor Miasnikov"
Sent: Wednesday, April 17, 2013 10:07 AM
I'm not sure what are we talking about then, but please
use the mailing list appropriate for the subject.
----- Original Message -----
From: "Victor Miasnikov" vvm (a) tut (dot) by
To: "Michael S. Tsirkin"
Cc: "KY Srinivasan"
Sent: Tuesday, April 16, 2013 9:36 AM
Subject: Are You shue what is 100% _full_ emulation of Hyper-V? Re: It's not related Re: KVM "Hyper-V emulation" -- this
can be related "Linux on Hyper-V" ?
Hi!
>> >> When KVM runs in Hyper-V emulation mode it expects to get Hyper-V hypercalls.
>> >> Mixing KVM hypercalls and Hyper-V requires some tricks. It
>> KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ?
> It's not related.
Are You shue?
Xen-team _think_ too what is not related, but has non-100% _full_ emulation of Hyper-V and, as result, create problems:
==
Xen emulates Hyper-V to host enlightened Windows. Looks like this
emulation may be turned on by default even for Linux guests. Check and
fail Hyper-V detection if we are on Xen.
[ hpa: the problem here is that Xen doesn't emulate Hyper-V well
enough, and if the Xen support isn't compiled in, we end up stubling
over the Hyper-V emulation and try to activate it -- and it fails. ]
. . .
+ /*
+ * 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;
+
==
( full see ib P.S.)
Best regards, Victor Miasnikov
Blog: http://vvm.blog.tut.by/
P.S.
==
----- Original Message -----
From: "tip-bot for K. Y. Srinivasan"
. . .
Sent: Wednesday, February 13, 2013 3:57 AM
Subject: [tip:x86/hyperv] X86: Add a check to catch Xen emulation of Hyper-V
Commit-ID: db34bbb767bdfa1ebed7214b876fe01c5b7ee457
Gitweb: http://git.kernel.org/tip/db34bbb767bdfa1ebed7214b876fe01c5b7ee457
Author: K. Y. Srinivasan
AuthorDate: Sun, 3 Feb 2013 17:22:38 -0800
Committer: H. Peter Anvin
CommitDate: Tue, 12 Feb 2013 16:27:03 -0800
X86: Add a check to catch Xen emulation of Hyper-V
Xen emulates Hyper-V to host enlightened Windows. Looks like this
emulation may be turned on by default even for Linux guests. Check and
fail Hyper-V detection if we are on Xen.
[ hpa: the problem here is that Xen doesn't emulate Hyper-V well
enough, and if the Xen support isn't compiled in, we end up stubling
over the Hyper-V emulation and try to activate it -- and it fails. ]
Signed-off-by: K. Y. Srinivasan
Link: http://lkml.kernel.org/r/1359940959-32168-2-git-send-email-kys@microsoft.com
Signed-off-by: H. Peter Anvin
---
arch/x86/kernel/cpu/mshyperv.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 646d192..4dab317 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -30,6 +30,13 @@ 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]);
--
==
----- Original Message -----
From: "Michael S. Tsirkin"
To: "Victor Miasnikov" vvm (a) tut (dot) by
Sent: Tuesday, April 16, 2013 1:11 AM
Subject: Re: KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ? Fw: When KVM runs in Hyper-V emulation
mode it expects to get Hyper-V hypercalls.
> On Mon, Apr 15, 2013 at 04:00:34PM +0300, Victor Miasnikov wrote:
>>
>> ==
>> >> And hypercall has its own set of problems with Windows guests.
>> >> When KVM runs in Hyper-V emulation mode it expects to get Hyper-V hypercalls.
>> >> Mixing KVM hypercalls and Hyper-V requires some tricks. It
>> >
>> >Can't we simply register a hypercall ID range with Microsoft?
>> >
>> >> may also affect WHQLing Windows drivers since driver will talk to HW
>> >> bypassing Windows interfaces.
>> >
>> >Then the WHQL'ed driver doesn't support the PV MMIO hcall?
>> ==
>>
>> KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ?
>>
>>
>
> It's not related.
----- Original Message -----
From: "Victor Miasnikov" vvm (a) tut (dot) by
To: "Michael S. Tsirkin"
Sent: Monday, April 15, 2013 4:00 PM
Subject: KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ? Fw: When KVM runs in Hyper-V emulation mode
it expects to get Hyper-V hypercalls.
Hi!
==
> > And hypercall has its own set of problems with Windows guests.
> > When KVM runs in Hyper-V emulation mode it expects to get Hyper-V hypercalls.
> > Mixing KVM hypercalls and Hyper-V requires some tricks. It
>
> Can't we simply register a hypercall ID range with Microsoft?
>
> > may also affect WHQLing Windows drivers since driver will talk to HW
> > bypassing Windows interfaces.
>
> Then the WHQL'ed driver doesn't support the PV MMIO hcall?
==
KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ?
Best regards, Victor Miasnikov
Blog: http://vvm.blog.tut.by/
next prev parent reply other threads:[~2013-04-17 9:10 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Victor Miasnikov [this message]
2013-04-17 10:16 ` KVM "Hyper-V emulation" -- this can be related "Linux on Hyper-V" ? Or "KVM emulates Hyper-V" as "Hyper-V emulates Hyper-V" ? " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39D7C3658A5B4979A3F025E1D944E743@local.st.by \
--to=vvm@tut.by \
--cc=JBeulich@suse.com \
--cc=apw@canonical.com \
--cc=bp@alien8.de \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=olaf@aepfle.de \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).