qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Yarmak <yarmak.vladislav@gmail.com>
To: qemu-devel@nongnu.org
Cc: Vladislav Yarmak <yarmak.vladislav@gmail.com>
Subject: [Qemu-devel] [PATCH] kvm: do not force hypervisor flag in guest`s CPUID
Date: Thu, 23 Apr 2015 14:33:23 +0300	[thread overview]
Message-ID: <1429788803-7964-2-git-send-email-yarmak.vladislav@gmail.com> (raw)
In-Reply-To: <1429788803-7964-1-git-send-email-yarmak.vladislav@gmail.com>

Do not force hypervisor flag in guests` CPUID - let invoker decide this. It is needed for hidding hypervisor from guest and aimed to run Hyper-V nested in KVM.

Signed-off-by: Vladislav A Yarmak <yarmak.vladislav@gmail.com>

---
 target-i386/kvm.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 41d09e5..63026cc 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -213,10 +213,6 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
         /* KVM before 2.6.30 misreports the following features */
         ret |= CPUID_MTRR | CPUID_PAT | CPUID_MCE | CPUID_MCA;
     } else if (function == 1 && reg == R_ECX) {
-        /* We can set the hypervisor flag, even if KVM does not return it on
-         * GET_SUPPORTED_CPUID
-         */
-        ret |= CPUID_EXT_HYPERVISOR;
         /* tsc-deadline flag is not returned by GET_SUPPORTED_CPUID, but it
          * can be enabled if the kernel has KVM_CAP_TSC_DEADLINE_TIMER,
          * and the irqchip is in the kernel.
-- 
2.1.4

           reply	other threads:[~2015-04-23 11:33 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1429788803-7964-1-git-send-email-yarmak.vladislav@gmail.com>]

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=1429788803-7964-2-git-send-email-yarmak.vladislav@gmail.com \
    --to=yarmak.vladislav@gmail.com \
    --cc=qemu-devel@nongnu.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).