Displaying 20 results from an estimated 26 matches for "qemu_free".
2011 Jun 24
2
[PATCH v2] xen_disk: cope with missing xenstore "params" node
...* setup via qemu cmdline -> already setup for us */
@@ -704,6 +711,14 @@ static int blk_init(struct XenDevice *xendev)
xenstore_write_be_int(&blkdev->xendev, "sectors",
blkdev->file_size / blkdev->file_blk);
return 0;
+
+out_error:
+ qemu_free(blkdev->params);
+ qemu_free(blkdev->mode);
+ qemu_free(blkdev->type);
+ qemu_free(blkdev->dev);
+ qemu_free(blkdev->devtype);
+ return -1;
}
static int blk_connect(struct XenDevice *xendev)
--
1.7.2.3
_______________________________________________
Xen-devel ma...
2011 Jun 27
1
[PATCH v3] xen_disk: cope with missing xenstore "params" node
...* setup via qemu cmdline -> already setup for us */
@@ -704,6 +711,19 @@ static int blk_init(struct XenDevice *xendev)
xenstore_write_be_int(&blkdev->xendev, "sectors",
blkdev->file_size / blkdev->file_blk);
return 0;
+
+out_error:
+ qemu_free(blkdev->params);
+ blkdev->params = NULL;
+ qemu_free(blkdev->mode);
+ blkdev->mode = NULL;
+ qemu_free(blkdev->type);
+ blkdev->type = NULL;
+ qemu_free(blkdev->dev);
+ blkdev->dev = NULL;
+ qemu_free(blkdev->devtype);
+ blkdev->devtype = NU...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...dex = cpu_register_io_memory(0, msix_mmio_read,
+ msix_mmio_write, dev);
+ if (dev->msix_mmio_index == -1) {
+ ret = -EBUSY;
+ goto err_index;
+ }
+
+ dev->msix_irq_entries_nr = nentries;
+ return 0;
+
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ qemu_free(dev->msix_irq_entries);
+ dev->msix_irq_entries = NULL;
+err_entries:
+ pci_del_capability(dev, PCI_CAP_ID_MS...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...dex = cpu_register_io_memory(0, msix_mmio_read,
+ msix_mmio_write, dev);
+ if (dev->msix_mmio_index == -1) {
+ ret = -EBUSY;
+ goto err_index;
+ }
+
+ dev->msix_irq_entries_nr = nentries;
+ return 0;
+
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ qemu_free(dev->msix_irq_entries);
+ dev->msix_irq_entries = NULL;
+err_entries:
+ pci_del_capability(dev, PCI_CAP_ID_MS...
2009 Jun 21
1
[PATCHv6 05/12] qemu/pci: MSI-X support functions
...}
+
+ dev->msix_entries_nr = nentries;
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_present & QEMU_PCI_CAP_MSIX))
+...
2009 Jun 21
1
[PATCHv6 05/12] qemu/pci: MSI-X support functions
...}
+
+ dev->msix_entries_nr = nentries;
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_present & QEMU_PCI_CAP_MSIX))
+...
2009 Jun 02
0
[PATCHv2 05/13] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported &am...
2009 Jun 02
0
[PATCHv2 05/13] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported &am...
2009 Jun 18
0
[PATCHv5 05/13] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported & QEMU_PCI_CAP_MSIX))...
2009 Jun 18
0
[PATCHv5 05/13] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported & QEMU_PCI_CAP_MSIX))...
2009 Jun 10
0
[PATCHv4 05/13] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported & QEMU_PCI_CAP_MSIX))...
2009 Jun 10
0
[PATCHv4 05/13] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported & QEMU_PCI_CAP_MSIX))...
2009 May 25
1
[PATCH 05/11] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported &am...
2009 May 25
1
[PATCH 05/11] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported &am...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...ntries_nr = nentries;
+ dev->cap_supported |= QEMU_PCI_CAP_MSIX;
+ if (msix_disable)
+ return 0;
+ pci_add_capability(dev, PCI_CAP_ID_MSIX,
+ PCI_CAPABILITY_CONFIG_MSIX_LENGTH);
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ qemu_free(dev->msix_irq_entries);
+ dev->msix_irq_entries = NULL;
+err_entries:
+ pci_del_capability(dev, PCI_CAP_ID_MS...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...ntries_nr = nentries;
+ dev->cap_supported |= QEMU_PCI_CAP_MSIX;
+ if (msix_disable)
+ return 0;
+ pci_add_capability(dev, PCI_CAP_ID_MSIX,
+ PCI_CAPABILITY_CONFIG_MSIX_LENGTH);
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ qemu_free(dev->msix_irq_entries);
+ dev->msix_irq_entries = NULL;
+err_entries:
+ pci_del_capability(dev, PCI_CAP_ID_MS...
2009 Jun 05
1
[PATCHv3 05/13] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported &am...
2009 Jun 05
1
[PATCHv3 05/13] qemu: MSI-X support functions
...*/
+ if (msix_disable)
+ return 0;
+
+ ret = msix_add_config(dev, nentries, bar_nr, bar_size);
+ if (ret)
+ goto err_config;
+
+ dev->cap_present |= QEMU_PCI_CAP_MSIX;
+ return 0;
+
+err_config:
+ cpu_unregister_io_memory(dev->msix_mmio_index);
+err_index:
+ qemu_free(dev->msix_table_page);
+ dev->msix_table_page = NULL;
+err_page:
+ qemu_free(dev->msix_entry_used);
+ dev->msix_entry_used = NULL;
+err_used:
+ return ret;
+}
+
+/* Clean up resources for the device. */
+int msix_uninit(PCIDevice *dev)
+{
+ if (!(dev->cap_supported &am...
2009 May 20
9
[PATCH] qemu: msi irq allocation api
...0, trigger_mode);
+}
+
+static qemu_irq *ioapic_allocate_msi(int nentries)
+{
+ struct msi_state *state = qemu_mallocz(nentries * sizeof *state);
+ qemu_irq *irqs;
+ if (!state)
+ return NULL;
+ irqs = qemu_allocate_irqs(ioapic_send_msi, state, nentries);
+ if (!irqs)
+ qemu_free(state);
+ return irqs;
+}
+
+static void ioapic_free_msi(qemu_irq *irq)
+{
+ qemu_free(qemu_irq_get_opaque(irq[0]));
+ qemu_free_irqs(irq);
+}
+
+static int ioapic_update_msi(qemu_irq irq, uint64_t addr, uint32_t data,
+ int masked)
+{
+ struct msi_state *sta...
2009 May 20
9
[PATCH] qemu: msi irq allocation api
...0, trigger_mode);
+}
+
+static qemu_irq *ioapic_allocate_msi(int nentries)
+{
+ struct msi_state *state = qemu_mallocz(nentries * sizeof *state);
+ qemu_irq *irqs;
+ if (!state)
+ return NULL;
+ irqs = qemu_allocate_irqs(ioapic_send_msi, state, nentries);
+ if (!irqs)
+ qemu_free(state);
+ return irqs;
+}
+
+static void ioapic_free_msi(qemu_irq *irq)
+{
+ qemu_free(qemu_irq_get_opaque(irq[0]));
+ qemu_free_irqs(irq);
+}
+
+static int ioapic_update_msi(qemu_irq irq, uint64_t addr, uint32_t data,
+ int masked)
+{
+ struct msi_state *sta...