From: "K. Y. Srinivasan" <kys@microsoft.com>
To: 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
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V
Date: Sun, 3 Feb 2013 17:22:38 -0800 [thread overview]
Message-ID: <1359940959-32168-2-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1359940959-32168-1-git-send-email-kys@microsoft.com>
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@microsoft.com>
---
arch/x86/kernel/cpu/mshyperv.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
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]);
--
1.7.4.1
next prev parent reply other threads:[~2013-02-04 0:55 UTC|newest]
Thread overview: 55+ 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 ` K. Y. Srinivasan [this message]
2013-02-13 0:57 ` [tip:x86/hyperv] X86: Add a check to catch Xen emulation of Hyper-V 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
-- strict thread matches above, loose matches on Subject: below --
2013-01-30 0:51 K. Y. Srinivasan
2013-01-30 0:51 ` [PATCH 1/3] x86: Hyper-V: register clocksource only if its advertised K. Y. Srinivasan
2013-01-30 0:51 ` [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V K. Y. Srinivasan
2013-01-30 8:53 ` Jan Beulich
2013-01-30 18:12 ` KY Srinivasan
2013-01-30 18:19 ` H. Peter Anvin
2013-01-31 7:37 ` Jan Beulich
2013-01-31 14:46 ` KY Srinivasan
2013-01-31 15:53 ` KY Srinivasan
2013-01-31 16:45 ` Jan Beulich
2013-01-31 18:29 ` H. Peter Anvin
2013-01-31 21:41 ` H. Peter Anvin
2013-02-01 13:19 ` Stefano Stabellini
2013-02-01 15:10 ` KY Srinivasan
2013-02-01 19:34 ` KY Srinivasan
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=1359940959-32168-2-git-send-email-kys@microsoft.com \
--to=kys@microsoft.com \
--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=linux-kernel@vger.kernel.org \
--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).