search for: cap_present

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

2009 Jun 05
1
[PATCHv3 03/13] qemu: add routines to manage PCI capabilities
...+++++++++++++++++++++------ hw/pci.h | 18 +++++++++++- 2 files changed, 106 insertions(+), 10 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 361d741..ed011b5 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -130,12 +130,13 @@ void pci_device_save(PCIDevice *s, QEMUFile *f) int version = s->cap_present ? 3 : 2; int i; - qemu_put_be32(f, version); /* PCI device version */ + /* PCI device version and capabilities */ + qemu_put_be32(f, version); + if (version >= 3) + qemu_put_be32(f, s->cap_present); qemu_put_buffer(f, s->config, 256); for (i = 0; i <...
2009 Jun 05
1
[PATCHv3 03/13] qemu: add routines to manage PCI capabilities
...+++++++++++++++++++++------ hw/pci.h | 18 +++++++++++- 2 files changed, 106 insertions(+), 10 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 361d741..ed011b5 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -130,12 +130,13 @@ void pci_device_save(PCIDevice *s, QEMUFile *f) int version = s->cap_present ? 3 : 2; int i; - qemu_put_be32(f, version); /* PCI device version */ + /* PCI device version and capabilities */ + qemu_put_be32(f, version); + if (version >= 3) + qemu_put_be32(f, s->cap_present); qemu_put_buffer(f, s->config, 256); for (i = 0; i <...
2009 May 25
2
[PATCH 03/11] qemu: add routines to manage PCI capabilities
...+++++++++++++++++++++------ hw/pci.h | 18 +++++++++++- 2 files changed, 106 insertions(+), 10 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 5dcfb4e..6bc3819 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -130,12 +130,13 @@ void pci_device_save(PCIDevice *s, QEMUFile *f) int version = s->cap_present ? 3 : 2; int i; - qemu_put_be32(f, version); /* PCI device version */ + /* PCI device version and capabilities */ + qemu_put_be32(f, version); + if (version >= 3) + qemu_put_be32(f, s->cap_present); qemu_put_buffer(f, s->config, 256); for (i = 0; i <...
2009 May 25
2
[PATCH 03/11] qemu: add routines to manage PCI capabilities
...+++++++++++++++++++++------ hw/pci.h | 18 +++++++++++- 2 files changed, 106 insertions(+), 10 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 5dcfb4e..6bc3819 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -130,12 +130,13 @@ void pci_device_save(PCIDevice *s, QEMUFile *f) int version = s->cap_present ? 3 : 2; int i; - qemu_put_be32(f, version); /* PCI device version */ + /* PCI device version and capabilities */ + qemu_put_be32(f, version); + if (version >= 3) + qemu_put_be32(f, s->cap_present); qemu_put_buffer(f, s->config, 256); for (i = 0; i <...
2009 Jun 21
1
[PATCHv6 05/12] qemu/pci: MSI-X support functions
...msix_mmio_write, dev); + if (dev->msix_mmio_index == -1) { + ret = -EBUSY; + goto err_index; + } + + 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; +} + +...
2009 Jun 21
1
[PATCHv6 05/12] qemu/pci: MSI-X support functions
...msix_mmio_write, dev); + if (dev->msix_mmio_index == -1) { + ret = -EBUSY; + goto err_index; + } + + 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; +} + +...
2009 Jun 02
0
[PATCHv2 05/13] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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: +...
2009 Jun 02
0
[PATCHv2 05/13] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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: +...
2009 Jun 18
0
[PATCHv5 05/13] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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; +} + +...
2009 Jun 18
0
[PATCHv5 05/13] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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; +} + +...
2009 Jun 10
0
[PATCHv4 05/13] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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; +} + +...
2009 Jun 10
0
[PATCHv4 05/13] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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; +} + +...
2009 May 25
1
[PATCH 05/11] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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: +...
2009 May 25
1
[PATCH 05/11] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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: +...
2009 Jun 05
1
[PATCHv3 05/13] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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: +...
2009 Jun 05
1
[PATCHv3 05/13] qemu: MSI-X support functions
...dev->cap_supported |= QEMU_PCI_CAP_MSIX; + /* If disabled, stop here. User can later load confiuration with MSI-X + * enabled. */ + 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: +...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...= -EBUSY; + goto err_index; + } + + dev->msix_irq_entries_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_entrie...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...= -EBUSY; + goto err_index; + } + + dev->msix_irq_entries_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_entrie...
2015 May 12
0
KVM VHOST-BLK is not working
...he codes I got from: QEMU - git://github.com/asias/qemu.git KERNEL - git://github.com/asias/linux.git The VM I am booting is compiled with MSIX config options. I am seeing a failure in the QEMU function msix_enabled during the initialization of the block device While the first expression (dev->cap_present & QEMU_PCI_CAP_MSIX) is successful, the second one (dev->config[dev->msix_cap + MSIX_CONTROL_OFFSET] & MSIX_ENABLE_MASK) is failing. I could not see a msix_init function from hw/block/virtio-blk.c whereas there is one for VHOST-NET from vmxnet3_init_msix. I will appreciat...
2015 May 12
0
KVM VHOST-BLK is not working
...he codes I got from: QEMU - git://github.com/asias/qemu.git KERNEL - git://github.com/asias/linux.git The VM I am booting is compiled with MSIX config options. I am seeing a failure in the QEMU function msix_enabled during the initialization of the block device While the first expression (dev->cap_present & QEMU_PCI_CAP_MSIX) is successful, the second one (dev->config[dev->msix_cap + MSIX_CONTROL_OFFSET] & MSIX_ENABLE_MASK) is failing. I could not see a msix_init function from hw/block/virtio-blk.c whereas there is one for VHOST-NET from vmxnet3_init_msix. I will appreciat...