search for: pci_write_config_dword

Displaying 20 results from an estimated 80 matches for "pci_write_config_dword".

2009 Apr 03
0
[PATCH] PCI: sync up the SR-IOV changes between Dom0 and upstream kernels
..._MASK) == - PCI_BASE_ADDRESS_MEM_TYPE_64) - goto found; - - return; -found: - start = pci_resource_start(dev, i); - size = pci_resource_len(dev, i); + start = pci_resource_start(dev, 1); + size = pci_resource_len(dev, 1); if (!start || size != 0x400000 || start & (size - 1)) return; - pci_write_config_dword(dev, 0x10 + i * 4, 0); - pci_resource_start(dev, i) = 0; - pci_resource_end(dev, i) = size - 1; - pci_write_config_dword(dev, 0x184, start); - pci_write_config_dword(dev, 0x190, start + size / 2); + pci_resource_flags(dev, 1) = 0; + pci_write_config_dword(dev, PCI_BASE_ADDRESS_1, 0); + pci_write_co...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...common + offsetof(struct virtio_pci_cap, > + offset), > + &offset); > + > + /* Program cfg capability for dword access into common cfg. */ > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.bar), > + bar); > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.length), > + 0x4); > + > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.offset), > + offset...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...common + offsetof(struct virtio_pci_cap, > + offset), > + &offset); > + > + /* Program cfg capability for dword access into common cfg. */ > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.bar), > + bar); > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.length), > + 0x4); > + > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.offset), > + offset...
2008 Oct 08
8
[PATCH] dom0 linux: Reassign memory resources to device for pci passthrough.
...O Base/Limit */ + pcibios_resource_to_bus(dev, &region, res); + if (res->flags & IORESOURCE_MEM && + !(res->flags & IORESOURCE_PREFETCH)) { + l = (region.start >> 16) & 0xfff0; + l |= region.end & 0xfff00000; + } else { + l = 0x0000fff0; + } + pci_write_config_dword(dev, PCI_MEMORY_BASE, l); + + break; + + case 9 : /* Prefetchable MMIO Base/Limit */ + /* Clear out the upper 32 bits of PREF limit. + * If PCI_PREF_BASE_UPPER32 was non-zero, this temporarily + * disables PREF range, which is ok. + */ + pci_write_config_dword(dev, PCI_PREF_LIMIT_UPPER32,...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...common + offsetof(struct virtio_pci_cap, > + offset), > + &offset); > + > + /* Program cfg capability for dword access into common cfg. */ > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.bar), > + bar); > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.length), > + 0x4); > + > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.offset), > + offset...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...common + offsetof(struct virtio_pci_cap, > + offset), > + &offset); > + > + /* Program cfg capability for dword access into common cfg. */ > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.bar), > + bar); > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.length), > + 0x4); > + > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.offset), > + offset...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...; > > + &offset); > > > + > > > + /* Program cfg capability for dword access into common cfg. */ > > > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > + cap.bar), > > > + bar); > > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > + cap.length), > > > + 0x4); > > > + > > > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap,...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...; > > + &offset); > > > + > > > + /* Program cfg capability for dword access into common cfg. */ > > > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > + cap.bar), > > > + bar); > > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > + cap.length), > > > + 0x4); > > > + > > > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap,...
2016 Apr 18
0
[PATCH RFC 3/3] vfio: add virtio pci quirk
...&bar); + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, + offset), + &offset); + + /* Program cfg capability for dword access into common cfg. */ + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.bar), + bar); + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.length), + 0x4); + + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.offset), + offset + offsetof(struct virtio_pci_commo...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...&bar); + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, + offset), + &offset); + + /* Program cfg capability for dword access into common cfg. */ + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.bar), + bar); + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.length), + 0x4); + + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.offset), + offset + offsetof(struct virtio_pci_commo...
2016 Aug 30
6
[PATCH v2 0/2] vfio: blacklist legacy virtio devices
Legacy virtio devices always bypassed an IOMMU, so using them with vfio was never safe. This adds a quirk detecting these and disabling VFIO unless the noiommu mode is used. At the moment, this only applies to virtio-pci devices. The patch might make sense on stable as well. Michael S. Tsirkin (2): vfio: report group noiommu status vfio: add virtio pci quirk
2016 Aug 30
6
[PATCH v2 0/2] vfio: blacklist legacy virtio devices
Legacy virtio devices always bypassed an IOMMU, so using them with vfio was never safe. This adds a quirk detecting these and disabling VFIO unless the noiommu mode is used. At the moment, this only applies to virtio-pci devices. The patch might make sense on stable as well. Michael S. Tsirkin (2): vfio: report group noiommu status vfio: add virtio pci quirk
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [1/4]
...RESS_0 + 4 * resno; - } else if (resno == PCI_ROM_RESOURCE) { - if (!(res->flags & IORESOURCE_ROM_ENABLE)) - return; - new |= PCI_ROM_ADDRESS_ENABLE; - reg = dev->rom_base_reg; - } else { - /* Hmm, non-standard resource. */ - - return; /* kill uninitialised var warning */ - } - - pci_write_config_dword(dev, reg, new); - pci_read_config_dword(dev, reg, &check); + pci_write_config_dword(dev, pos, new); + pci_read_config_dword(dev, pos, &check); if ((new ^ check) & mask) { - dev_err(&dev->dev, "BAR %d: error updating (%#08x != %#08x)\n", - resno, new, check); + d...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [1/4]
...RESS_0 + 4 * resno; - } else if (resno == PCI_ROM_RESOURCE) { - if (!(res->flags & IORESOURCE_ROM_ENABLE)) - return; - new |= PCI_ROM_ADDRESS_ENABLE; - reg = dev->rom_base_reg; - } else { - /* Hmm, non-standard resource. */ - - return; /* kill uninitialised var warning */ - } - - pci_write_config_dword(dev, reg, new); - pci_read_config_dword(dev, reg, &check); + pci_write_config_dword(dev, pos, new); + pci_read_config_dword(dev, pos, &check); if ((new ^ check) & mask) { - dev_err(&dev->dev, "BAR %d: error updating (%#08x != %#08x)\n", - resno, new, check); + d...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [1/4]
...RESS_0 + 4 * resno; - } else if (resno == PCI_ROM_RESOURCE) { - if (!(res->flags & IORESOURCE_ROM_ENABLE)) - return; - new |= PCI_ROM_ADDRESS_ENABLE; - reg = dev->rom_base_reg; - } else { - /* Hmm, non-standard resource. */ - - return; /* kill uninitialised var warning */ - } - - pci_write_config_dword(dev, reg, new); - pci_read_config_dword(dev, reg, &check); + pci_write_config_dword(dev, pos, new); + pci_read_config_dword(dev, pos, &check); if ((new ^ check) & mask) { - dev_err(&dev->dev, "BAR %d: error updating (%#08x != %#08x)\n", - resno, new, check); + d...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
..., > > + offset), > > + &offset); > > + > > + /* Program cfg capability for dword access into common cfg. */ > > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > + cap.bar), > > + bar); > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > + cap.length), > > + 0x4); > > + > > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > + cap.o...
2023 Mar 16
2
[PATCH] PCI: stop spamming info in quirk_nvidia_hda
.....b10c77bbe4716 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5549,7 +5549,7 @@ static void quirk_nvidia_hda(struct pci_dev *gpu) if (val & BIT(25)) return; - pci_info(gpu, "Enabling HDA controller\n"); + pci_dbg(gpu, "Enabling HDA controller\n"); pci_write_config_dword(gpu, 0x488, val | BIT(25)); /* The GPU becomes a multi-function device when the HDA is enabled */ -- 2.39.2
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
This is an attempt to allow enabling IOMMU for DMA. Design: - new feature bit IOMMU_PLATFORM which means host won't bypass IOMMU - virtio core uses DMA API if it sees IOMMU_PLATFORM - add quirk for vfio to disable device unless IOMMU_PLATFORM is set or the no-iommu mode is enabled - while I'm not sure how it will be used, it seems like a good idea to also have
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
This is an attempt to allow enabling IOMMU for DMA. Design: - new feature bit IOMMU_PLATFORM which means host won't bypass IOMMU - virtio core uses DMA API if it sees IOMMU_PLATFORM - add quirk for vfio to disable device unless IOMMU_PLATFORM is set or the no-iommu mode is enabled - while I'm not sure how it will be used, it seems like a good idea to also have
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...et); > > > > + > > > > + /* Program cfg capability for dword access into common cfg. */ > > > > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > > + cap.bar), > > > > + bar); > > > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > > + cap.length), > > > > + 0x4); > > > > + > > > > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > > > > + pci_write_config_dword(dev, cfg + offsetof(s...