diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-07-20 03:42:59 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-07-20 03:42:59 -0400 |
commit | 9ff561fdf73493d757bbc74aa58627e1381650fb (patch) | |
tree | 4484d230662126b1ac94ea545ca5429c91e0a68b /virt/kvm/assigned-dev.c | |
parent | 7b98cf0cf4e8798b9e7435f966ed0d90a2a925de (diff) | |
parent | fdd85ec3eb8cc1b663678a3efa16ee59a32e0277 (diff) |
Merge branch 'common/pinctrl' into sh-latest
Diffstat (limited to 'virt/kvm/assigned-dev.c')
-rw-r--r-- | virt/kvm/assigned-dev.c | 4 |
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, | |||
635 | int r = 0, idx; | 635 | int r = 0, idx; |
636 | struct kvm_assigned_dev_kernel *match; | 636 | struct kvm_assigned_dev_kernel *match; |
637 | struct pci_dev *dev; | 637 | struct pci_dev *dev; |
638 | u8 header_type; | ||
639 | 638 | ||
640 | if (!(assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU)) | 639 | if (!(assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU)) |
641 | return -EINVAL; | 640 | return -EINVAL; |
@@ -668,8 +667,7 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm, | |||
668 | } | 667 | } |
669 | 668 | ||
670 | /* Don't allow bridges to be assigned */ | 669 | /* Don't allow bridges to be assigned */ |
671 | pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); | 670 | if (dev->hdr_type != PCI_HEADER_TYPE_NORMAL) { |
672 | if ((header_type & PCI_HEADER_TYPE) != PCI_HEADER_TYPE_NORMAL) { | ||
673 | r = -EPERM; | 671 | r = -EPERM; |
674 | goto out_put; | 672 | goto out_put; |
675 | } | 673 | } |