diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index bbaf44e8f0d3..5ef2560075bf 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3157,8 +3157,7 @@ static void load_xsave(struct kvm_vcpu *vcpu, u8 *src) | |||
3157 | cpuid_count(XSTATE_CPUID, index, | 3157 | cpuid_count(XSTATE_CPUID, index, |
3158 | &size, &offset, &ecx, &edx); | 3158 | &size, &offset, &ecx, &edx); |
3159 | memcpy(dest, src + offset, size); | 3159 | memcpy(dest, src + offset, size); |
3160 | } else | 3160 | } |
3161 | WARN_ON_ONCE(1); | ||
3162 | 3161 | ||
3163 | valid -= feature; | 3162 | valid -= feature; |
3164 | } | 3163 | } |
@@ -7315,11 +7314,6 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, | |||
7315 | 7314 | ||
7316 | vcpu = kvm_x86_ops->vcpu_create(kvm, id); | 7315 | vcpu = kvm_x86_ops->vcpu_create(kvm, id); |
7317 | 7316 | ||
7318 | /* | ||
7319 | * Activate fpu unconditionally in case the guest needs eager FPU. It will be | ||
7320 | * deactivated soon if it doesn't. | ||
7321 | */ | ||
7322 | kvm_x86_ops->fpu_activate(vcpu); | ||
7323 | return vcpu; | 7317 | return vcpu; |
7324 | } | 7318 | } |
7325 | 7319 | ||
@@ -8218,6 +8212,24 @@ bool kvm_arch_can_inject_async_page_present(struct kvm_vcpu *vcpu) | |||
8218 | kvm_x86_ops->interrupt_allowed(vcpu); | 8212 | kvm_x86_ops->interrupt_allowed(vcpu); |
8219 | } | 8213 | } |
8220 | 8214 | ||
8215 | void kvm_arch_start_assignment(struct kvm *kvm) | ||
8216 | { | ||
8217 | atomic_inc(&kvm->arch.assigned_device_count); | ||
8218 | } | ||
8219 | EXPORT_SYMBOL_GPL(kvm_arch_start_assignment); | ||
8220 | |||
8221 | void kvm_arch_end_assignment(struct kvm *kvm) | ||
8222 | { | ||
8223 | atomic_dec(&kvm->arch.assigned_device_count); | ||
8224 | } | ||
8225 | EXPORT_SYMBOL_GPL(kvm_arch_end_assignment); | ||
8226 | |||
8227 | bool kvm_arch_has_assigned_device(struct kvm *kvm) | ||
8228 | { | ||
8229 | return atomic_read(&kvm->arch.assigned_device_count); | ||
8230 | } | ||
8231 | EXPORT_SYMBOL_GPL(kvm_arch_has_assigned_device); | ||
8232 | |||
8221 | void kvm_arch_register_noncoherent_dma(struct kvm *kvm) | 8233 | void kvm_arch_register_noncoherent_dma(struct kvm *kvm) |
8222 | { | 8234 | { |
8223 | atomic_inc(&kvm->arch.noncoherent_dma_count); | 8235 | atomic_inc(&kvm->arch.noncoherent_dma_count); |