summaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-25 09:52:59 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-25 09:52:59 +0100
commitd1e16c1a61d68692dba346f4a841315343b085f4 (patch)
tree249ec07d1489769fe83b4ec507708455cc0c5138 /virt/kvm
parent1573ee81cb9ef24fa5acee6b7442e215e63ede2f (diff)
parent6b16351acbd415e66ba16bf7d473ece1574cf0bc (diff)
downloadop-kernel-dev-d1e16c1a61d68692dba346f4a841315343b085f4.zip
op-kernel-dev-d1e16c1a61d68692dba346f4a841315343b085f4.tar.gz
Merge tag 'v3.5-rc4' into for-3.6
Linux 3.5-rc4 contains some bug fixes which overlap with new features.
Diffstat (limited to 'virt/kvm')
-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 01f572c..b1e091a 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;
}
OpenPOWER on IntegriCloud