From: Alexander Graf Subject: [PATCH] Don't expose hypervisor bit when running nested SVM Date: Thu, 18 Jun 2009 00:11:00 +0200 Message-ID: <1245276660-11259-1-git-send-email-agraf@suse.de> To: kvm@vger.kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:43769 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752700AbZFQWLC (ORCPT ); Wed, 17 Jun 2009 18:11:02 -0400 Received: from relay1.suse.de (relay-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 47EDF74862 for ; Thu, 18 Jun 2009 00:11:04 +0200 (CEST) Sender: kvm-owner@vger.kernel.org List-ID: Hyper-V refuses to run in hypervisor mode when it finds the hypervisor bit set, because it assumes it's running as a guest. While the perfect way of not setting the hypervisor would be an option to the -cpu parameter, this is reasonable sane for now. Let's deal with the -cpu way when we get to -cpu host. Signed-off-by: Alexander Graf --- target-i386/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/helper.c b/target-i386/helper.c index 2c5af3c..7da0e24 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1513,7 +1513,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, *edx = env->cpuid_features; /* "Hypervisor present" bit required for Microsoft SVVP */ - if (kvm_enabled()) + if (kvm_enabled() && !kvm_nested) *ecx |= (1 << 31); break; case 2: -- 1.6.0.2