search for: mem_resourc

Displaying 10 results from an estimated 10 matches for "mem_resourc".

Did you mean: mem_resource
2012 Sep 26
3
[PATCH v3] xen/tools: Add 64 bits big bar support
...bar_sz_upper, mmio_total = 0; uint32_t vga_devfn = 256; uint16_t class, vendor_id, device_id; unsigned int bar, pin, link, isa_irq; + int64_t mmio_left; /* Resources assignable to PCI devices via BARs. */ struct resource { - uint32_t base, max; - } *resource, mem_resource, io_resource; + uint64_t base, max; + } *resource, mem_resource, high_mem_resource, io_resource; /* Create a list of device BARs in descending order of size. */ struct bars { - uint32_t devfn, bar_reg, bar_sz; + uint32_t is_64bar; + uint32_t devfn; +...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
..._master(pdev); > + > + ret = ifcvf_init_msix(adapter); > + if (ret) { > + IFC_ERR(adapter->dev, "Failed to initialize MSIX.\n"); > + goto free_msix; > + } > + > + vf = &adapter->vf; > + for (i = 0; i < IFCVF_PCI_MAX_RESOURCE; i++) { > + vf->mem_resource[i].phys_addr = pci_resource_start(pdev, i); > + vf->mem_resource[i].len = pci_resource_len(pdev, i); > + if (!vf->mem_resource[i].len) { > + vf->mem_resource[i].addr = NULL; > + continue; > + } > + > + vf->mem_resource[i].addr = pci_iomap_range(pdev, i, 0,...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...(pdev); > + ret = ifcvf_init_msix(adapter); > + > + if (ret) { > + IFC_ERR(adapter->dev, "Failed to initialize MSIX.\n"); > + goto free_msix; > + } > + > + vf = &adapter->vf; > + > + for (i = 0; i < IFCVF_PCI_MAX_RESOURCE; i++) { > + vf->mem_resource[i].phys_addr = pci_resource_start(pdev, i); > + vf->mem_resource[i].len = pci_resource_len(pdev, i); > + if (!vf->mem_resource[i].len) { > + vf->mem_resource[i].addr = NULL; > + continue; > + } > + > + vf->mem_resource[i].addr = pci_iomap_range(pdev, i, 0,...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...; > + } > + > + if (offset + length < offset) { Can this really happen? Both offset and length are u32. > + IFC_DBG(ifcvf->dev, "offset(%u) + length(%u) overflows\n", > + offset, length); > + return NULL; > + } > + > + if (offset + length > hw->mem_resource[cap->bar].len) { > + IFC_DBG(ifcvf->dev, > + "offset(%u) + len(%u) overflows bar%u to get capabilities.\n", > + offset, length, bar); > + return NULL; > + } > + > + return hw->mem_resource[bar].addr + offset; I don't see the initialization of mem_...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...%u to get capabilities.\n", bar); > + return NULL; > + } > + > + if (offset + length < offset) { > + IFC_DBG(ifcvf->dev, "offset(%u) + length(%u) overflows\n", > + offset, length); > + return NULL; > + } > + > + if (offset + length > hw->mem_resource[cap->bar].len) { > + IFC_DBG(ifcvf->dev, > + "offset(%u) + len(%u) overflows bar%u to get capabilities.\n", > + offset, length, bar); > + return NULL; > + } > + > + return hw->mem_resource[bar].addr + offset; > +} > + > +int ifcvf_read_config_...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...%u to get capabilities.\n", bar); > + return NULL; > + } > + > + if (offset + length < offset) { > + IFC_DBG(ifcvf->dev, "offset(%u) + length(%u) overflows\n", > + offset, length); > + return NULL; > + } > + > + if (offset + length > hw->mem_resource[cap->bar].len) { > + IFC_DBG(ifcvf->dev, > + "offset(%u) + len(%u) overflows bar%u to get capabilities.\n", > + offset, length, bar); > + return NULL; > + } > + > + return hw->mem_resource[bar].addr + offset; > +} > + > +int ifcvf_read_config_...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...%u to get capabilities.\n", bar); > + return NULL; > + } > + > + if (offset + length < offset) { > + IFC_DBG(ifcvf->dev, "offset(%u) + length(%u) overflows\n", > + offset, length); > + return NULL; > + } > + > + if (offset + length > hw->mem_resource[cap->bar].len) { > + IFC_DBG(ifcvf->dev, > + "offset(%u) + len(%u) overflows bar%u to get capabilities.\n", > + offset, length, bar); > + return NULL; > + } > + > + return hw->mem_resource[bar].addr + offset; > +} > + > +int ifcvf_read_config_...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...%u to get capabilities.\n", bar); > + return NULL; > + } > + > + if (offset + length < offset) { > + IFC_ERR(ifcvf->dev, "offset(%u) + length(%u) overflows\n", > + offset, length); > + return NULL; > + } > + > + if (offset + length > hw->mem_resource[cap->bar].len) { > + IFC_ERR(ifcvf->dev, > + "offset(%u) + len(%u) overflows bar%u to get capabilities.\n", > + offset, length, bar); > + return NULL; > + } > + > + return hw->mem_resource[bar].addr + offset; > +} > + > +int ifcvf_read_config_...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...t; +??? if (offset + length < offset) { >>> +??????? IFC_ERR(ifcvf->dev, "offset(%u) + length(%u) overflows\n", >>> +??????????? offset, length); >>> +??????? return NULL; >>> +??? } >>> + >>> +??? if (offset + length > hw->mem_resource[cap->bar].len) { >>> +??????? IFC_ERR(ifcvf->dev, >>> +??????????? "offset(%u) + len(%u) overflows bar%u to get >>> capabilities.\n", >>> +??????????? offset, length, bar); >>> +??????? return NULL; >>> +??? } >>> + &g...
2008 Jan 18
7
[Patch] Make memory hole for PCI Express bigger and prevent roll-over
Keir, Here''s a first patch to address the issue with rolling over to guest-physical address 0x00000000 when assigning address regions to PCI BARs during HVM boot. For now, this: - Makes the hole bigger: 0xC0000000-0xF5000000. This might be overkill...but it should only matter for 32-bit guest OSes assigned more than 3GB of RAM. - Prevents addresses from above 0xF50000000 from