- 15 12月, 2011 11 次提交
-
-
由 Anthony Liguori 提交于
The full tree search was a bit unreasonable. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
We first add a 'peripheral' container to the root device that we add user created devices to. This provides all user created devices with a unique and isolated namespace. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
Links represent an ephemeral relationship between devices. They are meant to replace the qdev concept of busses by allowing more informal relationships between devices. Links are fairly limited in their usefulness without implementing QOM-style subclassing and interfaces. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
Child properties express a relationship of composition. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
There are two types of supported paths--absolute paths and partial paths. Absolute paths are derived from the root device and can follow child<> or link<> properties. Since they can follow link<> properties, they can be arbitrarily long. Absolute paths look like absolute filenames and are prefixed with a leading slash. Partial paths are look like relative filenames. They do not begin with a prefix. The matching rules for partial paths are subtle but designed to make specifying devices easy. At each level of the composition tree, the partial path is matched as an absolute path. The first match is not returned. At least two matches are searched for. A successful result is only returned if only one match is founded. If more than one match is found, a flag is returned to indicate that the match was ambiguous. At the end of the day, partial path support means that if you create a device called 'ide0', you can just say 'ide0' as the path name and it will Just Work. If we internally create a device called 'i440fx', you can just say 'i440fx' and it will Just Work and long as you don't do anything silly. A management tool should probably always use absolute paths since then they don't have to deal with the possibility of ambiguity. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
The canonical path is the path in the composition tree from the root to the device. This is effectively the name of the device. This is an incredibly unefficient implementation that will be optimized in a future patch. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
This is based on Jan's suggestion for how to do unique naming. The root device is the root of composition. All devices are reachable via child<> links from this device. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
Expose all legacy properties through the new QOM property mechanism. The qdev property types are exposed through the 'legacy<>' namespace. They are always visited as strings since they do their own string parsing. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
qdev properties are settable only during construction and static to classes. This isn't flexible enough for QOM. This patch introduces a property interface for qdev that provides dynamic properties that are tied to objects, instead of classes. These properties are Visitor based instead of string based too. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
To ensure that a device isn't removed from the graph until all of its links are broken. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 10 11月, 2011 1 次提交
-
-
由 Markus Armbruster 提交于
Spotted by Coverity. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 29 10月, 2011 1 次提交
-
-
由 Paolo Bonzini 提交于
SCSI buses will need to read the children list first-to-last. This requires using a QTAILQ, because hell breaks loose if you just try inserting at the tail (thus reversing the order of all existing visits from last-to-first to first-to-tail). Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 16 9月, 2011 1 次提交
-
-
由 Gerd Hoffmann 提交于
Make qdev_device_help print both device and bus properties. Helps libvirt to figure whenever bus properties such as PCI.multifunction are supported present or not. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 21 8月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 11 8月, 2011 1 次提交
-
-
由 Peter Maydell 提交于
If an attempt to create a qdev device on the default sysbus (by passing NULL as the bus to qdev_create) fails, print a useful error message rather than crashing trying to dereference a NULL pointer. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 05 8月, 2011 1 次提交
-
-
由 Isaku Yamahata 提交于
qbus_reset_all_fn was registered twice, so a lot of device reset functions were also called twice when QEMU started. Which was introduced by 80376c3f This patch fixes it by making the main_system_bus creation not register reset handler. Cc: Stefan Weil <weil@mail.berlios.de> Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Tested-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 29 7月, 2011 1 次提交
-
-
由 Jan Kiszka 提交于
Device models rely on the core invoking their reset handlers after init. We do this in the cold-plug case, but so far we miss this step after hot-plug. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 23 7月, 2011 1 次提交
-
-
由 Jan Kiszka 提交于
Drop the open-coded MAC assignment from net_init_nic and replace it with standard qemu_macaddr_default_if_unset which is also used by qdev. That avoid creating colliding MACs when instantiating NICs via different mechanisms. This change requires to store the MAC as MACAddr in NICInfo, and the remaining nd_table users need to be updated. Based on suggestion by Peter Maydell. CC: Markus Armbruster <armbru@redhat.com> CC: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 24 6月, 2011 1 次提交
-
-
由 Markus Armbruster 提交于
error_report() prepends location, and appends a newline. The message constructed from the arguments should not contain a newline. Fix the obvious offenders. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 22 6月, 2011 1 次提交
-
-
由 Peter Maydell 提交于
Diagnose the case where the user asked for a NIC via "-net nic" but the board didn't instantiate that NIC (for example where the user asked for two NICs but the board only supports one). Note that this diagnostic doesn't apply to NICs created through -device, because those are always instantiated. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 07 4月, 2011 1 次提交
-
-
由 Michael Tokarev 提交于
In previous life qdev_init_nofail() used to call hw_error() which did register dump and other scary things. Now it calls error_report() and does a regular exit(1). Fix the comment to match reality. Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 12 2月, 2011 1 次提交
-
-
由 Blue Swirl 提交于
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 31 1月, 2011 2 次提交
-
-
由 Markus Armbruster 提交于
Before commit 622b520f, index=12 meant bus=1,unit=5. Since the commit, it means bus=0,unit=12. The drive is created, but not the guest device. That's because the controllers we use with if=scsi drives (lsi53c895a and esp) support only 7 units, and scsi_bus_legacy_handle_cmdline() ignores drives with unit numbers exceeding that limit. Changing the mapping of index to bus, unit is a regression. Breaking -drive invocations that used to work just makes it worse. Revert the part of commit 622b520f that causes this, and clean up some. Note that the fix only affects if=scsi. You can still put more than 7 units on a SCSI bus with -device & friends. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
qdev_init_bdrv() doesn't belong into qdev.c; it's about drives, not qdevs. Rename to drive_get_next, move to blockdev.c, drop the bogus DeviceState argument, and return DriveInfo instead of BlockDriverState. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 05 1月, 2011 1 次提交
-
-
由 Alex Williamson 提交于
Create a trivial interface to track whether the machine has been modified since boot. Adding or removing devices will trigger this to return true. An example usage scenario for such an interface is the rtl8139 driver which includes a cpu_register_io_memory() value in it's migration stream. For the majority of migrations, where no hotplug has occured in the machine, this works correctly. Once the machine is modified, we can use this interface to detect that and include a subsection for the device to prevent migrations to rtl8139 versions with this bug. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 24 12月, 2010 1 次提交
-
-
由 Isaku Yamahata 提交于
This patch exports qdev_find_recursive() for later use. Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 22 12月, 2010 1 次提交
-
-
由 Stefan Weil 提交于
Every system should have some sort of main system bus, so sysbus_get_default should always return a valid bus. Without this patch, at least mipssim and malta no longer start but raise a null pointer access exception (caused by commit ec990eb6). Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 21 12月, 2010 1 次提交
-
-
由 Michael S. Tsirkin 提交于
qbus_reset_all is unused, remove it Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 20 12月, 2010 1 次提交
-
-
由 Isaku Yamahata 提交于
Stefan Weil reported the regression caused by ec990eb6 as follows > The second regression also occurs with MIPS malta. > Networking no longer works with the default pcnet nic. > > This is caused because the reset function for pcnet is no > longer called during system boot. The result in an invalid > mac address (all zero) and a non-working nic. > > For this second regression I still have no simple solution. > Of course mips_malta.c should be converted to qdev which > would fix both problems (but only for malta system emulation). The issue is, it is assumed that all qbuses, qdeves are under main_system_bus. But there are qbuses whose parent is NULL. So it is necessary to trigger reset for those qbuses. (On the other hand, if NULL is passed to qdev_create(), its parent bus is main_system_bus.) Ideally those buses should be moved under bus controller device which is qdev. But it's not done yet. So register qbus reset handler for qbus whose parent is NULL. Reported-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: N"Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 19 12月, 2010 1 次提交
-
-
由 Stefan Weil 提交于
Every system should have some sort of main system bus, so sysbus_get_default should always return a valid bus. Without this patch, at least mipssim and malta no longer start but raise a null pointer access exception (caused by commit ec990eb6). Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 12 12月, 2010 1 次提交
-
-
由 Gleb Natapov 提交于
If bootindex is specified on command line a string that describes device in firmware readable way is added into sorted list. Later this list will be passed into firmware to control boot order. Signed-off-by: NGleb Natapov <gleb@redhat.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 22 11月, 2010 4 次提交
-
-
由 Isaku Yamahata 提交于
Introduce a helper function which triggers reset from a given device. Will be used by pci bus emulation. Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Isaku Yamahata 提交于
and make it called via qbus_reset_all(). The qbus reset callback will be used by pci bus reset. Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Anthony Liguori 提交于
This patch changes the reset handling so that qdev has no knowledge of the global system reset. Instead, a new bus/device level function is introduced that allows all devices/buses on the bus/device to be reset using a depth first transversal. N.B. we have to expose the implicit system bus because we have various hacks that result in an implicit system bus existing. Instead, we ought to have an explicitly created system bus that we can trigger reset from. That's a topic for a future patch though. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Anthony Liguori 提交于
There are some cases where you want to walk the busses, in particular, when searching for a bus either by name or DeviceInfo. Paolo suggested that we model the return values on how GCC's walkers work which allows an actor to skip child transversal, or terminate walking with a positive value that's returned as the qbus_walk_children's result. Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 24 8月, 2010 1 次提交
-
-
由 Blue Swirl 提交于
Changing block.h or blockdev.h resulted in recompiling most objects. Move DriveInfo typedef and BlockInterfaceType enum definitions to qemu-common.h and rearrange blockdev.h use to decrease churn. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 23 8月, 2010 1 次提交
-
-
由 Gerd Hoffmann 提交于
Switch tree to lookup-by-name using qemu_find_opts(). Also hook up virtfs options so qemu_find_opts works for them too. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 06 7月, 2010 2 次提交
-
-
由 Alex Williamson 提交于
When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Markus Armbruster 提交于
Some of the failures are internal errors, and hw_error() is okay then. But the common way to fail is bad user input, e.g. -global isa-fdc.driveA=foo where drive foo has an unsupported rerror value. exit(1) instead. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-