Message ID | 1245276660-11259-1-git-send-email-agraf@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 06/18/2009 01:11 AM, Alexander Graf wrote: > 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. > > There's infrastructure in helper.c to make -cpu blah,-hypervisor fairly trivial, no?
On 22.06.2009, at 10:46, Avi Kivity wrote: > On 06/18/2009 01:11 AM, Alexander Graf wrote: >> 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. >> >> > > There's infrastructure in helper.c to make -cpu blah,-hypervisor > fairly trivial, no? Yes. I merely wanted to get something upstream for LinuxTag so people can try it out :-). Alex -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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:
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 <agraf@suse.de> --- target-i386/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)