summaryrefslogtreecommitdiff
path: root/virt/kvm/assigned-dev.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-07-04 09:12:50 +0200
committerTakashi Iwai <tiwai@suse.de>2012-07-04 09:12:50 +0200
commitf68d891d85c8f9ab1af663ed3ceac18ad58dbabe (patch)
treed92db7af512307ab5282eb62f3dd1741ac71d21f /virt/kvm/assigned-dev.c
parent5780b627e24113323427c102175296ae43dfb9d7 (diff)
parent3fd877d32cac31292628fb8f443543fc1989b49b (diff)
Merge branch 'topic/hda-beep' into topic/hda
Diffstat (limited to 'virt/kvm/assigned-dev.c')
-rw-r--r--virt/kvm/assigned-dev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
index 01f572c10c71..b1e091ae2f37 100644
--- a/virt/kvm/assigned-dev.c
+++ b/virt/kvm/assigned-dev.c
@@ -635,7 +635,6 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm,
int r = 0, idx;
struct kvm_assigned_dev_kernel *match;
struct pci_dev *dev;
- u8 header_type;
if (!(assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU))
return -EINVAL;
@@ -668,8 +667,7 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm,
}
/* Don't allow bridges to be assigned */
- pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type);
- if ((header_type & PCI_HEADER_TYPE) != PCI_HEADER_TYPE_NORMAL) {
+ if (dev->hdr_type != PCI_HEADER_TYPE_NORMAL) {
r = -EPERM;
goto out_put;
}