- 07 7月, 2015 1 次提交
-
-
由 Eric Auger 提交于
Add a new connect_irq_notifier notifier in the SysBusDeviceClass. This notifier, if populated, is called after sysbus_connect_irq. This mechanism is used to setup VFIO signaling once VFIO platform devices get attached to their platform bus, on a machine init done notifier. Signed-off-by: NEric Auger <eric.auger@linaro.org> Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Tested-by: NVikram Sethi <vikrams@codeaurora.org> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
-
- 24 6月, 2015 1 次提交
-
-
由 Laszlo Ersek 提交于
The sysbus_get_fw_dev_path() function formats OpenFirmware device path nodes ("driver-name@unit-address") for sysbus devices. The first choice for "unit-address" is the base address of the device's first MMIO region. The second choice is its first IO port. However, if two sysbus devices with the same "driver-name" lack both MMIO and PIO resources, then there is no good way to distinguish them based on their OFW nodes, because in this case unit-address is omitted completely for both devices. An example is TYPE_PXB_HOST ("pxb-host"). For the sake of such devices, introduce the explicit_ofw_unit_address() "virtual member function". With this function, each sysbus device in the same SysBusDeviceClass can state its own address. Cc: Markus Armbruster <armbru@redhat.com> Cc: Marcel Apfelbaum <marcel@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: NLaszlo Ersek <lersek@redhat.com> Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com> Tested-by: NMarcel Apfelbaum <marcel@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 19 6月, 2015 1 次提交
-
-
由 Laszlo Ersek 提交于
This is done mainly for improving readability, and in preparation for the next patch, but Markus pointed out another bonus for the string being returned: "No arbitrary length limit. Before the patch, it's 39 characters, and the code breaks catastrophically when qdev_fw_name() is longer: the second snprintf() is called with its first argument pointing beyond path[], and its second argument underflowing to a huge size." Cc: qemu-stable@nongnu.org Signed-off-by: NLaszlo Ersek <lersek@redhat.com> Tested-by: NMarcel Apfelbaum <marcel@redhat.com> Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 10 3月, 2015 1 次提交
-
-
由 Gonglei 提交于
Signed-off-by: NGonglei <arei.gonglei@huawei.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 05 11月, 2014 4 次提交
-
-
由 Alexander Graf 提交于
Sysbus devices have a range of MMIO regions they expose. The exact number of regions is device specific and internal information to the device model. Expose whether a region exists via a public interface. That way our platform bus enumeration code can dynamically determine how many regions exist. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Alexander Graf 提交于
Sysbus devices can get their IRQ lines connected to other devices. It is possible to figure out which IRQ line a connection is on and whether a sysbus device even provides an IRQ connector at a specific offset. This patch exposes helpers to make this information publicly accessible. We will need it for the platform bus dynamic sysbus enumeration. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Alexander Graf 提交于
Now that we can properly map sysbus devices that haven't been connected to something forcefully by C code, we can allow the -device command line option to spawn them. For machines that don't implement dynamic sysbus assignment in their board files we add a new bool "has_dynamic_sysbus" to the machine class. When that property is false (default), we bail out when we see dynamically spawned sysbus devices, like we did before. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Alexander Graf 提交于
Sysbus devices can be spawned by C code or dynamically via the command line. In the latter case, we need to be able to find the dynamically created devices to do things with them. This patch adds a search helper that makes it easy to look for dynamically spawned sysbus devices. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 23 10月, 2014 1 次提交
-
-
由 Peter Crosthwaite 提交于
Re-implement the Sysbus GPIOs to use the existing TYPE_DEVICE GPIO named framework. A constant string name is chosen to avoid conflicts with existing unnamed GPIOs. This unifies GPIOs are IRQs for sysbus devices and allows removal of all Sysbus state for GPIOs. Any existing and future-added functionality for GPIOs is now also available for sysbus IRQs. Reviewed-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 18 8月, 2014 1 次提交
-
-
由 Paolo Bonzini 提交于
Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 23 12月, 2013 1 次提交
-
-
由 Markus Armbruster 提交于
device_add plugs devices into suitable bus. For "real" buses, that actually connects the device. For sysbus, the connections need to be made separately, and device_add can't do that. The device would be left unconnected, and could not possibly work. Quite a few, but not all sysbus devices already set cannot_instantiate_with_device_add_yet in their class init function. Set it in their abstract base's class init function sysbus_device_class_init(), and remove the now redundant assignments from device class init functions. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 14 10月, 2013 1 次提交
-
-
由 Marcel Apfelbaum 提交于
When memory regions overlap, priority can be used to specify which of them takes priority. By making the priority values signed rather than unsigned, we make it more convenient to implement a situation where one "background" region should appear only where no other region exists: rather than having to explicitly specify a high priority for all the other regions, we can let them take the default (zero) priority and specify a negative priority for the background region. Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMarcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 31 8月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
To be passed to object_initialize(). Since commit 39355c38 the argument is void*, so drop some superfluous (BusState *) casts or direct parent field usages. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 09 4月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 01 4月, 2013 2 次提交
-
-
由 Peter Maydell 提交于
Remove the sysbus_add_memory and sysbus_del_memory functions. These are trivial wrappers for mapping a memory region into the system memory space, and have no users now. Sysbus devices should never map their own memory regions anyway; the correct API for mapping an mmio region is for the creator of the device to use sysbus_mmio_map. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NAndreas Färber <afaerber@suse.de> Message-id: 1363358063-23973-6-git-send-email-peter.maydell@linaro.org Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Peter Maydell 提交于
Make the SysBusDeviceClass::init optional, for devices which genuinely don't need to do anything here. In particular, simple devices which can do all their initialization in their instance_init method don't need either a DeviceClass::realize or SysBusDeviceClass::init method. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Acked-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1363358063-23973-2-git-send-email-peter.maydell@linaro.org Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 01 3月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
Done with this script: cd hw for 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. Instead, files in hw/dataplane are referenced with the relative path. We know they are not going to move to include/, and they are the only include files that are in subdirectories _and_ move. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 27 2月, 2013 1 次提交
-
-
由 Alexey Korolev 提交于
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 during enumeration process. Since lower and higher parts of a 64bit BAR are programmed separately this leads to qemu receiving a request to occupy a completely wrong address region for a short period of time. We have found that the boot process screws up completely if kvm-apic range is overlapped even for a short period of time (it is fine for other regions though). This patch raises the priority of the kvm-apic memory region, so it is never pushed out by PCI devices. The patch is quite safe as it does not touch memory manager. Signed-off-by: NAlexey Korolev <akorolex@gmail.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 22 1月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
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: NAndreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 11 1月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Since 39bffca2 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 19 12月, 2012 2 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 27 11月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
All conditional deallocation can now be done with object_delete. Remove the @qom_allocated and @glib_allocated fields; replace the latter with a direct assignment of the @free function pointer. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 23 10月, 2012 1 次提交
-
-
由 Avi Kivity 提交于
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: NAvi Kivity <avi@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 05 10月, 2012 1 次提交
-
-
由 Jim Meyering 提交于
Use g_strdup rather than strdup, because the sole caller (qdev_get_fw_dev_path_helper) assumes it gets non-NULL, and dereferences it. Besides, in that caller, the allocated buffer is already freed with g_free, so it's better to allocate with a matching g_strdup. In one case, (scsi-bus.c) it was trivial, so I replaced an snprintf+ g_strdup combination with an equivalent g_strdup_printf use. Signed-off-by: NJim Meyering <meyering@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 18 6月, 2012 3 次提交
-
-
由 Anthony Liguori 提交于
This makes SysBus part of the root hierarchy and all busses children of their respective parent DeviceState. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Anthony Liguori 提交于
This is far less interesting than it sounds. We simply add an Object to each BusState and then register the types appropriately. Most of the interesting refactoring will follow in the next patches. Since we're changing fundamental type names (BusInfo -> BusClass), it all needs to convert at once. Fortunately, not a lot of code is affected. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> [AF: Made all new bus TypeInfos static const.] [AF: Made qbus_free() call object_delete(), required {qom,glib}_allocated] Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Paolo Bonzini 提交于
TYPE_SYSTEM_BUS will be local to hw/sysbus.c, so move existing references to main_system_bus and system_bus_info there. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 15 2月, 2012 1 次提交
-
-
由 Andreas Färber 提交于
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 where necessary and don't put a semicolon after the closing brace. Signed-off-by: NAndreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 04 2月, 2012 2 次提交
-
-
由 Anthony Liguori 提交于
It is no longer used in the tree since everything is done natively through QEMU Object Model. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 1月, 2012 1 次提交
-
-
由 Anthony Liguori 提交于
This converts three devices because apic and ioapic are subclasses of sysbus. Converting subclasses independently of their base class is prohibitively hard. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 21 12月, 2011 1 次提交
-
-
由 Peter Maydell 提交于
Now that all sysbus MMIO regions are MemoryRegions, mmio[n].memory is never NULL, and we can remove some unnecessary conditionals. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 20 12月, 2011 2 次提交
-
-
由 Avi Kivity 提交于
Given a bus device, retrieves the memory address space for its bus. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Benoît Canet 提交于
This function is not longer in use so remove it. Signed-off-by: NBenoît Canet <benoit.canet@gmail.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 11月, 2011 2 次提交
-
-
由 Avi Kivity 提交于
Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
No longer used - replaced by sysbus_init_mmio_region(). Signed-off-by: NAvi Kivity <avi@redhat.com>
-
- 01 11月, 2011 1 次提交
-
-
由 Markus Armbruster 提交于
C99 7.15.1: Each invocation of the va_start and va_copy macros shall be matched by a corresponding invocation of the va_end macro in the same function. Spotted by Coverity. Harmless on the (common) systems where va_end() does nothing. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 04 9月, 2011 2 次提交
-
-
由 Avi Kivity 提交于
Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAvi Kivity <avi@redhat.com>
-