History | View | Annotate | Download (7.8 kB)
sysbus: make SysBusDeviceClass::init optional
Make the SysBusDeviceClass::init optional, for devices whichgenuinely don't need to do anything here. In particular, simpledevices which can do all their initialization in theirinstance_init method don't need either a DeviceClass::realize...
sysbus: Remove sysbus_add_memory and sysbus_del_memory
Remove the sysbus_add_memory and sysbus_del_memory functions. Theseare trivial wrappers for mapping a memory region into the systemmemory space, and have no users now. Sysbus devices should never map...
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
hw: include hw header files with full paths
Done with this script:
cd hwfor i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'done | sed -i -f - `find . -type f`
This is so that paths remain valid as files are moved....
Fix guest OS hang when 64bit PCI bar present
This patch addresses the issue fully described here:http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg01804.html
Linux kernels prior to 2.6.36 do not disable the PCI device duringenumeration process. Since lower and higher parts of a 64bit BAR...
sysbus: Drop sysbus_from_qdev() cast macro
Replace by SYS_BUS_DEVICE() QOM cast macro using a scripted conversion.Avoids the old macro creeping into new code.
Resolve a Coding Style warning in openpic code.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
Make all static TypeInfos const
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register alltypes natively through QEMU Object Model), TypeInfo as used inthe common, non-iterative pattern is no longer amended with informationand should therefore be const....
monitor: move include files to include/monitor/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec: move include files to include/exec/
qdev: simplify (de)allocation of buses
All conditional deallocation can now be done with object_delete.Remove the @qom_allocated and @glib_allocated fields; replace the latterwith a direct assignment of the @free function pointer.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
scsi, pci, qdev, isa-bus, sysbus: don't let *_get_fw_dev_path return NULL
Use g_strdup rather than strdup, because the sole caller(qdev_get_fw_dev_path_helper) assumes it gets non-NULL, and dereferencesit. Besides, in that caller, the allocated buffer is already freed with...
qdev: Move SysBus initialization to sysbus.c
TYPE_SYSTEM_BUS will be local to hw/sysbus.c, so move existing referencesto main_system_bus and system_bus_info there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev: Convert busses to QEMU Object Model
This is far less interesting than it sounds. We simply add an Object to eachBusState and then register the types appropriately. Most of the interestingrefactoring will follow in the next patches.
Since we're changing fundamental type names (BusInfo -> BusClass), it all needs...
qdev: Connect busses with their parent devices
This makes SysBus part of the root hierarchy and all busses children oftheir respective parent DeviceState.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
qdev: kill off DeviceInfo
It is no longer used in the tree since everything is done natively throughQEMU Object Model.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.Converting subclasses independently of their base class is prohibitively hard.
Merge remote-tracking branch 'qemu-kvm/memory/page_desc' into staging
hw/sysbus.c: Remove unnecessary conditionals
Now that all sysbus MMIO regions are MemoryRegions, mmio[n].memoryis never NULL, and we can remove some unnecessary conditionals.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sysbus: add sysbus_address_space()
Given a bus device, retrieves the memory address space for its bus.
Signed-off-by: Avi Kivity <avi@redhat.com>
sysbus: remove sysbus_init_mmio_cb2
This function is not longer in use so remove it.
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()
sysbus: remove sysbus_init_mmio()
No longer used - replaced by sysbus_init_mmio_region().
sysbus: Supply missing va_end()
C99 7.15.1: Each invocation of the va_start and va_copy macros shallbe matched by a corresponding invocation of the va_end macro in thesame function.
Spotted by Coverity. Harmless on the (common) systems where va_end()...
sysbus: add helpers to add and delete memory regions to the system bus
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
sysbus: add sysbus_add_memory_overlap()
hw/sysbus: Add sysbus_mmio_get_region()
Add a sysbus_mmio_get_region() which allows users of sysbusdevices to turn a (SysBusDevice*, mmioidx) tuple into aMemoryRegion*. This enables some useful simplifications ofdevices which pass through another device's mmio region...
Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversingchanges made to 444dc48298c480e42e15a8fe676be737d8a6b2a1.
From Avi:
Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this...
sysbus: remove sysbus_init_mmio_cb()
This problem with this function is that it is not reversible - it isimpossible to know where things are registered and unregister themexactly. As there are no more users, we can remove it.
Signed-off-by: Avi Kivity <avi@redhat.com>...
sysbus: add a variant of sysbus_init_mmio_cb with an unmap callback
sysbus_init_mmio_cb() uses the destructive IO_MEM_UNASSIGNED to remove aregion. Provide an alternative that calls an unmap callback, so the removalmay be done non-destructively.
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
sysbus: add MemoryRegion based memory management API
Allow registering sysbus device memory using a MemoryRegion. Once all usersare converted, sysbus_init_mmio() and sysbus_init_mmio_cb() will be removed.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
Remove unused sysemu.h include directives
Remove unused sysemu.h include directives to speed up buildwith the following patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
sysbus: add creation function that may fail
sysbus: print number of irqs in dev_print
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Add get_fw_dev_path callback for system bus.
Prints out mmio or pio used to access child device.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
sysbus: fix address truncation
Fix address truncation in sysbus by using a wider type.
Reported-by: Artyom Tarasenko <atar4qemu@googlemail.com>Tested-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
Fix Sparse warnings: "Using plain integer as NULL pointer"
Update to a hopefully more future proof FSF address
qdev: replace bus_type enum with bus_info struct.
BusInfo is filled with name and size (pretty much like I did forDeviceInfo as well). There is also a function pointer to printbus-specific device information to the monitor. sysbus is hookedup there, I've also added a print function for PCI....
qdev: move name+size into DeviceInfo (v2)
Rationale: move device information from code to data structures.
v2: Adapt the drivers missed in the first version.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qdev: add monitor command to dump the tree.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Paul Brook <paul@codesourcery.com>
Record device property types
Record device property types, and provide a list of properties at deviceregistration time.
Add a "device" property type that holds a reference to annother device.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Add common BusState
Implement and use a common device bus state. The main side-effect isthat creating a bus and attaching it to a parent device are no longerseparate operations. For legacy code we allow a NULL parent, but thatshould go away eventually....
Basic qdev infrastructure.