search for: pci_func

Displaying 20 results from an estimated 54 matches for "pci_func".

2012 Nov 05
25
[PATCH] IOMMU: don't disable bus mastering on faults for devices used by Xen or Dom0
...S_PRIV(pdev->domain)) ) + pdev = NULL; + spin_unlock(&pcidevs_lock); + + if ( pdev ) + continue; + cword = pci_conf_read16(iommu->seg, PCI_BUS(bdf), PCI_SLOT(bdf), PCI_FUNC(bdf), PCI_COMMAND); --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -916,7 +916,8 @@ static void __do_iommu_page_fault(struct reg = cap_fault_reg_offset(iommu->cap); while (1) { - u8 fault_reaso...
2013 Sep 12
3
[PATCH 1/1 V3] x86/AMD-Vi: Add additional check for invalid special->handle
...t; ARRAY_SIZE(ioapic_sbdf) ) + { + AMD_IOMMU_DEBUG("IVHD: Command line override present for IO-APIC %#x " + "(IVRS: %#x devID %04x:%02x:%02x.%u)\n", + apic, handle, seg, PCI_BUS(bdf), + PCI_SLOT(bdf), PCI_FUNC(bdf)); + ret = 1; + } + + return ret; +} + static u16 __init parse_ivhd_device_special( const struct acpi_ivrs_device8c *special, u16 seg, u16 header_length, u16 block_length, struct amd_iommu *iommu) @@ -698,16 +725,18 @@ static u16 __init parse_ivhd_device_special(...
2012 Jan 25
4
Fwd: BUG in linux+v3.2.1/drivers/xen/xen-pciback/pci_stub.c
First, maintainer''s addresses (Ryan Wilson <hap9@epoch.ncsc.mil>, Chris Bookholt <hap10@epoch.ncsc.mil>) are wrong (users unknown to remote mailsystem), so posting to you: PCI bus format strings are wrong. "%04x:%02x:%02x.%d" should be used instead of "%04x:%02x:%02x.%1x" (in many places of linux+v3.2.1/drivers/xen/xen-pciback/pci_stub.c) --
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...(fault_reason, &fault_type); if (fault_type == INTR_REMAP) - printk(KERN_ERR "INTR-REMAP: Request device [[%02x:%02x.%d] " - "fault index %llx\n" - "INTR-REMAP:[fault reason %02d] %s\n", - (source_id >> 8), PCI_SLOT(source_id & 0xFF), - PCI_FUNC(source_id & 0xFF), addr >> 48, - fault_reason, reason); + pr_err("INTR-REMAP: Request device [[%02x:%02x.%d] fault index %llx\n" + "INTR-REMAP:[fault reason %02d] %s\n", + (source_id >> 8), PCI_SLOT(source_id & 0xFF), + PCI_FUNC(sou...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...(fault_reason, &fault_type); if (fault_type == INTR_REMAP) - printk(KERN_ERR "INTR-REMAP: Request device [[%02x:%02x.%d] " - "fault index %llx\n" - "INTR-REMAP:[fault reason %02d] %s\n", - (source_id >> 8), PCI_SLOT(source_id & 0xFF), - PCI_FUNC(source_id & 0xFF), addr >> 48, - fault_reason, reason); + pr_err("INTR-REMAP: Request device [[%02x:%02x.%d] fault index %llx\n" + "INTR-REMAP:[fault reason %02d] %s\n", + (source_id >> 8), PCI_SLOT(source_id & 0xFF), + PCI_FUNC(sou...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...(fault_reason, &fault_type); if (fault_type == INTR_REMAP) - printk(KERN_ERR "INTR-REMAP: Request device [[%02x:%02x.%d] " - "fault index %llx\n" - "INTR-REMAP:[fault reason %02d] %s\n", - (source_id >> 8), PCI_SLOT(source_id & 0xFF), - PCI_FUNC(source_id & 0xFF), addr >> 48, - fault_reason, reason); + pr_err("INTR-REMAP: Request device [[%02x:%02x.%d] fault index %llx\n" + "INTR-REMAP:[fault reason %02d] %s\n", + (source_id >> 8), PCI_SLOT(source_id & 0xFF), + PCI_FUNC(sou...
2018 Feb 23
0
[PATCH 5/7] vga_switcheroo: Use device link for HDA controller
...They might also be called from atomic context, I'm not sure, and the runtime PM callbacks may sleep by default (unless pm_runtime_irq_safe() was called). > > +static void quirk_gpu_hda(struct pci_dev *hda) > > +{ > > + struct pci_dev *gpu = NULL; > > + > > + if (PCI_FUNC(hda->devfn) != 1) > > + return; > > + > > + gpu = pci_get_domain_bus_and_slot(pci_domain_nr(hda->bus), > > Unnecessary initialization. Thanks for spotting this, it's a remnant of an earlier version of the patch which called pci_dev_put(gpu) in the (PCI_FUNC(hda-...
2010 Jun 18
2
[PATCH] hdt & gcc -Werror
...xe.c index 3a61bc0..29e760a 100644 --- a/com32/hdt/hdt-cli-pxe.c +++ b/com32/hdt/hdt-cli-pxe.c @@ -66,14 +66,14 @@ void main_show_pxe(int argc __unused, char **argv __unused, snprintf(buffer, sizeof(buffer), " PCI Bus pos. : %02x:%02x.%02x\n", p->pci_bus, p->pci_dev, p->pci_func); - more_printf(buffer); + more_printf("%s", buffer); } else { snprintf(buffer, sizeof(buffer), " Manufacturer : %s \n", p->pci_device->dev_info->vendor_name); - more_printf(buffer); + more_printf("%s", buffer); snprintf(buffer, sizeof(buffer), &q...
2011 Nov 27
5
[PATCH] qemu-xen: Intel GPU passthrough, fix OpRegion mapping.
The OpRegion shouldn''t be mapped 1:1 because the address in the host can''t be used in the guest directly. This patch traps read and write access to the opregion of the Intel GPU config space (offset 0xfc). To work correctly this patch needs a change in hvmloader. HVMloader will allocate 2 pages for the OpRegion and write this address on the config space of the Intel GPU. Qemu
2013 Aug 28
12
[PATCH V2] x86/AMD-Vi: Add additional check for invalid special->handle
...e_ivhd_device_special( return 0; } - AMD_IOMMU_DEBUG("IVHD Special: %04x:%02x:%02x.%u variety %#x handle %#x\n", + AMD_IOMMU_DEBUG("IVHD Special: %04x:%02x:%02x.%u variety %#x handle %#x used_id %#x\n", seg, PCI_BUS(bdf), PCI_SLOT(bdf), PCI_FUNC(bdf), - special->variety, special->handle); + special->variety, special->handle, special->used_id); add_ivrs_mapping_entry(bdf, bdf, special->header.data_setting, iommu); switch ( special->variety ) { case ACPI_IVHD_IO...
2016 May 21
3
[PATCH v5] vga_switcheroo: Add helper for deferred probing
...gt; #include <linux/module.h> #include <linux/pm_runtime.h> -#include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> #include <drm/drm_crtc_helper.h> @@ -1025,13 +1023,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (PCI_FUNC(pdev->devfn)) return -ENODEV; - /* - * apple-gmux is needed on dual GPU MacBook Pro - * to probe the panel if we're the inactive GPU. - */ - if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) && - apple_gmux_present() && pdev != vga_defaul...
2018 Feb 20
2
[PATCH 5/7] vga_switcheroo: Use device link for HDA controller
...> + * if it's hotplugged). Runtime PM is allowed by default on the HDA controller > + * to prevent it from permanently keeping the GPU awake. > + */ > +static void quirk_gpu_hda(struct pci_dev *hda) > +{ > + struct pci_dev *gpu = NULL; Unnecessary initialization. > + if (PCI_FUNC(hda->devfn) != 1) > + return; > + > + gpu = pci_get_domain_bus_and_slot(pci_domain_nr(hda->bus), > + hda->bus->number, > + PCI_DEVFN(PCI_SLOT(hda->devfn), 0)); > + if (!gpu || (gpu->class >> 16) != PCI_BASE_CLASS_DISPLAY) { > + pci_dev_put(...
2016 Oct 06
6
[PATCH v5 0/3] drm/nouveau: set DMA mask before mapping scratch page
This v4 is now a 3 piece series (since v4), after Alexandre pointed out that both GF 100 and NV50 are affected by the same issue, and that a related issue has been solved already for Tegra in commit 9d0394c6bed5 ("drm/nouveau/instmem/gk20a: set DMA mask early"). The issue that this series addresses is the fact that the Nouveau driver invokes the DMA API before setting the DMA mask. In
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...f->device = pf->iov->device; + vf->cfg_size = 4096; + vf->error_state = pci_channel_io_normal; + vf->pcie_type = PCI_EXP_TYPE_ENDPOINT; + vf->dma_mask = 0xffffffff; + + dev_set_name(&vf->dev, "%04x:%02x:%02x.%d", pci_domain_nr(pb), bus, + PCI_SLOT(devfn), PCI_FUNC(devfn)); + + pci_read_config_byte(vf, PCI_REVISION_ID, &vf->revision); + vf->class = pf->class; + vf->current_state = PCI_UNKNOWN; + vf->irq = 0; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = pf->iov->resource + i; + if (!res->parent) + continue; + size = r...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...f->device = pf->iov->device; + vf->cfg_size = 4096; + vf->error_state = pci_channel_io_normal; + vf->pcie_type = PCI_EXP_TYPE_ENDPOINT; + vf->dma_mask = 0xffffffff; + + dev_set_name(&vf->dev, "%04x:%02x:%02x.%d", pci_domain_nr(pb), bus, + PCI_SLOT(devfn), PCI_FUNC(devfn)); + + pci_read_config_byte(vf, PCI_REVISION_ID, &vf->revision); + vf->class = pf->class; + vf->current_state = PCI_UNKNOWN; + vf->irq = 0; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = pf->iov->resource + i; + if (!res->parent) + continue; + size = r...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...f->device = pf->iov->device; + vf->cfg_size = 4096; + vf->error_state = pci_channel_io_normal; + vf->pcie_type = PCI_EXP_TYPE_ENDPOINT; + vf->dma_mask = 0xffffffff; + + dev_set_name(&vf->dev, "%04x:%02x:%02x.%d", pci_domain_nr(pb), bus, + PCI_SLOT(devfn), PCI_FUNC(devfn)); + + pci_read_config_byte(vf, PCI_REVISION_ID, &vf->revision); + vf->class = pf->class; + vf->current_state = PCI_UNKNOWN; + vf->irq = 0; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = pf->iov->resource + i; + if (!res->parent) + continue; + size = r...
2016 May 23
0
[Intel-gfx] [PATCH v5] vga_switcheroo: Add helper for deferred probing
...; > #include <linux/pm_runtime.h> > -#include <linux/vgaarb.h> > #include <linux/vga_switcheroo.h> > #include <drm/drm_crtc_helper.h> > > @@ -1025,13 +1023,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > if (PCI_FUNC(pdev->devfn)) > return -ENODEV; > > - /* > - * apple-gmux is needed on dual GPU MacBook Pro > - * to probe the panel if we're the inactive GPU. > - */ > - if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) && > - apple_gmux...
2016 May 19
2
[PATCH v4] vga_switcheroo: Add helper for deferred probing
...gt; #include <linux/module.h> #include <linux/pm_runtime.h> -#include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> #include <drm/drm_crtc_helper.h> @@ -1030,13 +1028,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (PCI_FUNC(pdev->devfn)) return -ENODEV; - /* - * apple-gmux is needed on dual GPU MacBook Pro - * to probe the panel if we're the inactive GPU. - */ - if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) && - apple_gmux_present() && pdev != vga_defaul...
2013 Aug 30
3
[PATCH v7] interrupts: allow guest to set/clear MSI-X mask bit
...rintk(XENLOG_WARNING "MSI-X control bit is unmasked when" + " it is expected to be masked [%04x:%02x:%02x.%01x]\n", + entry->pdev->seg, entry->pdev->bus, + PCI_SLOT(entry->pdev->devfn), + PCI_FUNC(entry->pdev->devfn)); + + goto unlock; + } + + /* + * The mask bit is the only defined bit in the word. But we + * ought to preserve the reserved bits. Clearing the reserved + * bits can result in undefined behaviour (see PCI Local Bus + * Specification revision...
2008 Oct 29
34
iommu: mapping reserved region failed - Q35 - VT-D Issue
Xen 3.4 xen-unstable.hg from yesterday with debian etch on 64bit arch Intel/Lenovo Q35 Mainboard with VT-d enabled Bootoptions iommu=1 vtd=1 pci.backhide for a PCI-E nvidia graphiccard xm dmesg Error messages includes: [VT-D] iommu.c: 1694:d32767 iommu: mapping reserved region failed [VT-D] iommu.c: 1542:d0 intel_iommu_add_device: context mapping failed If i try to start my HVM by xm create