summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/svm.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-07-30 13:13:43 +0200
committerAvi Kivity <avi@qumranet.com>2007-10-13 10:18:21 +0200
commitb114b0804df7131cb6764b948c1c530c834fa3c0 (patch)
tree4e5ced9ed1cdb673d27b26b166cd0bd7c845d5b9 /drivers/kvm/svm.c
parentKVM: Use kmem cache for allocating vcpus (diff)
downloadlinux-b114b0804df7131cb6764b948c1c530c834fa3c0.tar.xz
linux-b114b0804df7131cb6764b948c1c530c834fa3c0.zip
KVM: Use alignment properties of vcpu to simplify FPU ops
Now we use a kmem cache for allocating vcpus, we can get the 16-byte alignment required by fxsave & fxrstor instructions, and avoid manually aligning the buffer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r--drivers/kvm/svm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 8193651dd815..5277084f3a35 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1557,8 +1557,8 @@ again:
}
if (vcpu->fpu_active) {
- fx_save(vcpu->host_fx_image);
- fx_restore(vcpu->guest_fx_image);
+ fx_save(&vcpu->host_fx_image);
+ fx_restore(&vcpu->guest_fx_image);
}
asm volatile (
@@ -1670,8 +1670,8 @@ again:
vcpu->guest_mode = 0;
if (vcpu->fpu_active) {
- fx_save(vcpu->guest_fx_image);
- fx_restore(vcpu->host_fx_image);
+ fx_save(&vcpu->guest_fx_image);
+ fx_restore(&vcpu->host_fx_image);
}
if ((svm->vmcb->save.dr7 & 0xff))