diff options
author | Sheng Yang <sheng@linux.intel.com> | 2008-10-31 00:37:41 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:51:49 -0500 |
commit | 6eb55818c043b097c83828da8430fcb9a02fdb89 (patch) | |
tree | 8bdd77fa9fb110e50905093c746c3f70e62cb2ba /arch | |
parent | 853dafb62b386a3a75808483a120998e734eb6e1 (diff) |
KVM: Enable Function Level Reset for assigned device
Ideally, every assigned device should in a clear condition before and after
assignment, so that the former state of device won't affect later work.
Some devices provide a mechanism named Function Level Reset, which is
defined in PCI/PCI-e document. We should execute it before and after device
assignment.
(But sadly, the feature is new, and most device on the market now don't
support it. We are considering using D0/D3hot transmit to emulate it later,
but not that elegant and reliable as FLR itself.)
[Update: Reminded by Xiantao, execute FLR after we ensure that the device can
be assigned to the guest.]
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 38f79b6aaf1e..9a4a39cfe6ef 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -4148,8 +4148,8 @@ static void kvm_free_vcpus(struct kvm *kvm) | |||
4148 | 4148 | ||
4149 | void kvm_arch_destroy_vm(struct kvm *kvm) | 4149 | void kvm_arch_destroy_vm(struct kvm *kvm) |
4150 | { | 4150 | { |
4151 | kvm_iommu_unmap_guest(kvm); | ||
4152 | kvm_free_all_assigned_devices(kvm); | 4151 | kvm_free_all_assigned_devices(kvm); |
4152 | kvm_iommu_unmap_guest(kvm); | ||
4153 | kvm_free_pit(kvm); | 4153 | kvm_free_pit(kvm); |
4154 | kfree(kvm->arch.vpic); | 4154 | kfree(kvm->arch.vpic); |
4155 | kfree(kvm->arch.vioapic); | 4155 | kfree(kvm->arch.vioapic); |