aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/svm.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-07-30 07:13:43 -0400
committerAvi Kivity <avi@qumranet.com>2007-10-13 04:18:21 -0400
commitb114b0804df7131cb6764b948c1c530c834fa3c0 (patch)
tree4e5ced9ed1cdb673d27b26b166cd0bd7c845d5b9 /drivers/kvm/svm.c
parentc16f862d0257349607b7a9be7b4a4b7ed419a3ab (diff)
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:
1557 } 1557 }
1558 1558
1559 if (vcpu->fpu_active) { 1559 if (vcpu->fpu_active) {
1560 fx_save(vcpu->host_fx_image); 1560 fx_save(&vcpu->host_fx_image);
1561 fx_restore(vcpu->guest_fx_image); 1561 fx_restore(&vcpu->guest_fx_image);
1562 } 1562 }
1563 1563
1564 asm volatile ( 1564 asm volatile (
@@ -1670,8 +1670,8 @@ again:
1670 vcpu->guest_mode = 0; 1670 vcpu->guest_mode = 0;
1671 1671
1672 if (vcpu->fpu_active) { 1672 if (vcpu->fpu_active) {
1673 fx_save(vcpu->guest_fx_image); 1673 fx_save(&vcpu->guest_fx_image);
1674 fx_restore(vcpu->host_fx_image); 1674 fx_restore(&vcpu->host_fx_image);
1675 } 1675 }
1676 1676
1677 if ((svm->vmcb->save.dr7 & 0xff)) 1677 if ((svm->vmcb->save.dr7 & 0xff))