summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-04-12 12:03:01 +0200
committerAvi Kivity <avi@qumranet.com>2007-05-03 09:52:29 +0200
commitd917a6b92d0d1e4e2b98e86c584bc9e643cd5117 (patch)
tree2ba826853c0683f3aadb42d59bd5ab02650552b9 /drivers/kvm/kvm_main.c
parentKVM: Fix overflow bug in overflow detection code (diff)
downloadlinux-d917a6b92d0d1e4e2b98e86c584bc9e643cd5117.tar.xz
linux-d917a6b92d0d1e4e2b98e86c584bc9e643cd5117.zip
KVM: Initialize cr0 to indicate an fpu is present
Solaris panics if it sees a cpu with no fpu, and it seems to rely on this bit. Closes sourceforge bug 1698920. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index b065c4991568..0b30631585bd 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2332,6 +2332,7 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n)
vcpu->host_fx_image = (char*)ALIGN((hva_t)vcpu->fx_buf,
FX_IMAGE_ALIGN);
vcpu->guest_fx_image = vcpu->host_fx_image + FX_IMAGE_SIZE;
+ vcpu->cr0 = 0x10;
r = kvm_arch_ops->vcpu_create(vcpu);
if (r < 0)