From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlFO0-0007jd-47 for qemu-devel@nongnu.org; Thu, 23 Apr 2015 07:33:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlFNy-0001Tg-Sw for qemu-devel@nongnu.org; Thu, 23 Apr 2015 07:33:40 -0400 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:34906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlFNy-0001TX-L0 for qemu-devel@nongnu.org; Thu, 23 Apr 2015 07:33:38 -0400 Received: by labbd9 with SMTP id bd9so10403605lab.2 for ; Thu, 23 Apr 2015 04:33:37 -0700 (PDT) From: Vladislav Yarmak Date: Thu, 23 Apr 2015 14:33:23 +0300 Message-Id: <1429788803-7964-2-git-send-email-yarmak.vladislav@gmail.com> In-Reply-To: <1429788803-7964-1-git-send-email-yarmak.vladislav@gmail.com> References: <1429788803-7964-1-git-send-email-yarmak.vladislav@gmail.com> Subject: [Qemu-devel] [PATCH] kvm: do not force hypervisor flag in guest`s CPUID List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Vladislav Yarmak 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 --- 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