libvirt/src/qemu
Jiri Denemark bf0bf4e783 qemu: Fix PCI address allocation
Patch version revamped by Eric Blake <eblake@redhat.com> of Jiri
Denemark <jdenemar@redhat.com> original patch

When attaching a PCI device which doesn't explicitly set its PCI
address, libvirt allocates the address automatically. The problem is
that when checking which PCI address is unused, we only check for those
with slot number higher than the highest slot number ever used.

Thus attaching/detaching such device several times in a row (31 is the
theoretical limit, less then 30 tries are enough in practise) makes any
further device attachment fail. Furthermore, attaching a device with
predefined PCI address to 0:0:31 immediately forbids attachment of any
PCI device without explicit address.

This patch changes the logic so that we always check all PCI addresses
before we say there is no PCI address available.

Modifications from v1: revert back to remembering the last slot
reserved, but allow wraparound to not be limited by the end.
In this way, slots are still assigned in the same order as
before the patch, rather than filling in the gaps closest to
0 and risking making windows guests mad.

* src/qemu/qemu_conf.c: fix pci reservation code to do a round-robbin
  check of all available PCI splot availability before failing.
2010-08-04 14:46:06 +02:00
..
libvirtd_qemu.aug Disable all disk probing in QEMU driver & add config option to re-enable 2010-07-19 18:25:13 +01:00
qemu_bridge_filter.c Remove conn parameter from virReportSystemError 2010-02-09 01:04:54 +01:00
qemu_bridge_filter.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu_conf.c qemu: Fix PCI address allocation 2010-08-04 14:46:06 +02:00
qemu_conf.h qemu: Allow setting boot menu on/off 2010-07-27 16:38:32 -04:00
qemu_driver.c qemu: don't lose error on setting monitor capabilities 2010-08-02 14:16:10 -06:00
qemu_driver.h Add tests for the new Qemu namespace XML. 2010-07-23 17:30:45 -04:00
qemu_monitor_json.c Qemu arbitrary monitor commands. 2010-07-23 17:30:24 -04:00
qemu_monitor_json.h Qemu arbitrary monitor commands. 2010-07-23 17:30:24 -04:00
qemu_monitor_text.c Qemu arbitrary monitor commands. 2010-07-23 17:30:24 -04:00
qemu_monitor_text.h Qemu arbitrary monitor commands. 2010-07-23 17:30:24 -04:00
qemu_monitor.c qemu: kill some dead stores 2010-07-30 11:33:26 -06:00
qemu_monitor.h Qemu arbitrary monitor commands. 2010-07-23 17:30:24 -04:00
qemu_security_dac.c Disable all disk probing in QEMU driver & add config option to re-enable 2010-07-19 18:25:13 +01:00
qemu_security_dac.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu_security_stacked.c Pass security driver object into all security driver callbacks 2010-07-19 18:25:13 +01:00
qemu_security_stacked.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu.conf Disable all disk probing in QEMU driver & add config option to re-enable 2010-07-19 18:25:13 +01:00
test_libvirtd_qemu.aug Disable all disk probing in QEMU driver & add config option to re-enable 2010-07-19 18:25:13 +01:00
THREADS.txt Release driver and domain lock when running monitor commands 2009-11-10 13:27:18 +00:00