diff options
author | Amit Shah <amit.shah@qumranet.com> | 2007-11-15 11:38:46 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:53:05 -0500 |
commit | 9327fd1195b77e67b86db8c1c1c4c4f7db009b00 (patch) | |
tree | 749d44bc2ed554280acd6f807d95569cd695c496 | |
parent | 4cee576493b6abc95cc7447a65f1b9d2b40b8f20 (diff) |
KVM: Make unloading of FPU state when putting vcpu arch-independent
Instead of having each architecture do it individually, we
do this in the arch-independent code (just x86 as of now).
[avi: add svm to the mix, which was added to mainline during the
2.6.24-rc process]
Signed-off-by: Amit Shah <amit.shah@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | drivers/kvm/svm.c | 1 | ||||
-rw-r--r-- | drivers/kvm/vmx.c | 1 | ||||
-rw-r--r-- | drivers/kvm/x86.c | 1 |
3 files changed, 1 insertions, 2 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 0d32304944fc..fb3721d88dbf 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -659,7 +659,6 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu) | |||
659 | wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]); | 659 | wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]); |
660 | 660 | ||
661 | rdtscll(vcpu->host_tsc); | 661 | rdtscll(vcpu->host_tsc); |
662 | kvm_put_guest_fpu(vcpu); | ||
663 | } | 662 | } |
664 | 663 | ||
665 | static void svm_vcpu_decache(struct kvm_vcpu *vcpu) | 664 | static void svm_vcpu_decache(struct kvm_vcpu *vcpu) |
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 7130f315afdf..0c082faaa6db 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -541,7 +541,6 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
541 | static void vmx_vcpu_put(struct kvm_vcpu *vcpu) | 541 | static void vmx_vcpu_put(struct kvm_vcpu *vcpu) |
542 | { | 542 | { |
543 | vmx_load_host_state(to_vmx(vcpu)); | 543 | vmx_load_host_state(to_vmx(vcpu)); |
544 | kvm_put_guest_fpu(vcpu); | ||
545 | } | 544 | } |
546 | 545 | ||
547 | static void vmx_fpu_activate(struct kvm_vcpu *vcpu) | 546 | static void vmx_fpu_activate(struct kvm_vcpu *vcpu) |
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index fdc7632d7620..9618fcba887e 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c | |||
@@ -678,6 +678,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
678 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) | 678 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) |
679 | { | 679 | { |
680 | kvm_x86_ops->vcpu_put(vcpu); | 680 | kvm_x86_ops->vcpu_put(vcpu); |
681 | kvm_put_guest_fpu(vcpu); | ||
681 | } | 682 | } |
682 | 683 | ||
683 | static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu) | 684 | static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu) |