diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-07-30 21:13:43 +1000 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 10:18:21 +0200 |
commit | b114b0804df7131cb6764b948c1c530c834fa3c0 (patch) | |
tree | 4e5ced9ed1cdb673d27b26b166cd0bd7c845d5b9 /drivers/kvm/svm.c | |
parent | c16f862d0257349607b7a9be7b4a4b7ed419a3ab (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.c | 8 |
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)) |