search for: config_offset

Displaying 20 results from an estimated 23 matches for "config_offset".

2009 Jun 05
1
[PATCHv3 05/13] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 05
1
[PATCHv3 05/13] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 21
1
[PATCHv6 05/12] qemu/pci: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 21
1
[PATCHv6 05/12] qemu/pci: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 02
0
[PATCHv2 05/13] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 02
0
[PATCHv2 05/13] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 18
0
[PATCHv5 05/13] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 18
0
[PATCHv5 05/13] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 10
0
[PATCHv4 05/13] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 Jun 10
0
[PATCHv4 05/13] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 May 25
1
[PATCH 05/11] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 May 25
1
[PATCH 05/11] qemu: MSI-X support functions
...on top of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + int config_offset; + uint8_t *config; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */ + if (!bar_size) + new_size = MSIX_PAGE_SIZ...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...nfig space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size, + unsigned *new_size) +{ + unsigned config_offset = pdev->cap.start + pdev->cap.length; + uint8_t *config = pdev->config + config_offset; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...nfig space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size, + unsigned *new_size) +{ + unsigned config_offset = pdev->cap.start + pdev->cap.length; + uint8_t *config = pdev->config + config_offset; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space for MSI-X structures */...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...op of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + unsigned config_offset = pdev->cap.start + pdev->cap.length; + uint8_t *config = pdev->config + config_offset; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...op of it + * and fill MSI-X capability in the config space. + * Original bar size must be a power of 2 or 0. + * New bar size is returned. */ +static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries, + unsigned bar_nr, unsigned bar_size) +{ + unsigned config_offset = pdev->cap.start + pdev->cap.length; + uint8_t *config = pdev->config + config_offset; + uint32_t new_size; + + if (nentries < 1 || nentries > PCI_MSIX_FLAGS_QSIZE + 1) + return -EINVAL; + if (bar_size > 0x80000000) + return -ENOSPC; + + /* Add space...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...om this region at offset 0: > > int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) > { > int count = VHOST_VFIO_OP_HDR_SIZE + op->size; > struct vhost_vfio *vfio = dev->opaque; > int ret; > > ret = pwrite64(vfio->device_fd, op, count, vfio->config_offset); > if (ret != count) > return -1; > > return 0; > } > > int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfio_op *op) > { > int count = VHOST_VFIO_OP_HDR_SIZE + op->size; > struct vhost_vfio *vfio = dev->opaque; > uint64_t request = op->reque...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...message will be written to or read from this region at offset 0: int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op->size; struct vhost_vfio *vfio = dev->opaque; int ret; ret = pwrite64(vfio->device_fd, op, count, vfio->config_offset); if (ret != count) return -1; return 0; } int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op->size; struct vhost_vfio *vfio = dev->opaque; uint64_t request = op->request; int ret; ret = pread64(vfio->device_fd, op,...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...message will be written to or read from this region at offset 0: int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op->size; struct vhost_vfio *vfio = dev->opaque; int ret; ret = pwrite64(vfio->device_fd, op, count, vfio->config_offset); if (ret != count) return -1; return 0; } int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op->size; struct vhost_vfio *vfio = dev->opaque; uint64_t request = op->request; int ret; ret = pread64(vfio->device_fd, op,...
2020 May 11
0
[PATCH for QEMU v2] hw/vfio: Add VMD Passthrough Quirk
...CIDevice *vdev) > +{ > + VFIOQuirk *quirk; > + VFIOVMDQuirk *data; > + PCIDevice *pdev = &vdev->pdev; > + int ret; > + > + data = g_malloc0(sizeof(*data)); > + ret = pread(vdev->vbasedev.fd, data->membar_phys, 16, > + vdev->config_offset + PCI_BASE_ADDRESS_2); > + if (ret != 16) { > + error_report("VMD %s cannot read MEMBARs (%d)", > + vdev->vbasedev.name, ret); > + g_free(data); > + return -EFAULT; > + } > + > + quirk = vfio_quirk_alloc(1); >...