| 9cb805fd | 20-Aug-2014 |
Alexey Kardashevskiy <aik@ozlabs.ru> |
cpus: Define callback for QEMU "nmi" command
This introduces an NMI (Non Maskable Interrupt) interface with a single nmi_monitor_handler() method. A machine or a device can implement it. This search
cpus: Define callback for QEMU "nmi" command
This introduces an NMI (Non Maskable Interrupt) interface with a single nmi_monitor_handler() method. A machine or a device can implement it. This searches for an QOM object with this interface and if it is implemented, calls it. The callback implements an action required to cause debug crash dump on in-kernel debugger invocation. The callback returns Error**.
This adds a nmi_monitor_handle() helper which walks through all objects to find the interface. The interface method is called for all found instances.
This adds support for it in qmp_inject_nmi(). Since no architecture supports it at the moment, there is no change in behaviour.
This changes inject-nmi command description for HMP and QMP.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| dd98b71f | 03-Jul-2014 |
Eduardo Habkost <ehabkost@redhat.com> |
qdev: Fix crash when using non-device class name on -global
This fixes the following crash:
$ qemu-system-x86_64 -global container.xxx=y hw/core/qdev-properties-system.c:399:qdev_add_one_gl
qdev: Fix crash when using non-device class name on -global
This fixes the following crash:
$ qemu-system-x86_64 -global container.xxx=y hw/core/qdev-properties-system.c:399:qdev_add_one_global: Object 0x7f7eff234100 is not an instance of type device Aborted (core dumped)
New behavior will be to just warn, just like when non-existing clas names are used:
$ qemu-system-x86_64 -global container.xxx=y qemu-system-x86_64: Warning: "-global container.xxx=y" not used
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Tested-by: Don Slutz <dslutz@verizon.com>
show more ...
|
| 615c4895 | 18-Jun-2014 |
Andreas Färber <afaerber@suse.de> |
irq: Slim conversion of qemu_irq to QOM
As a prequel to any big Pin refactoring plans, do an in-place conversion of qemu_irq to an Object, so that we can reference it in link<> properties.
Signed-o
irq: Slim conversion of qemu_irq to QOM
As a prequel to any big Pin refactoring plans, do an in-place conversion of qemu_irq to an Object, so that we can reference it in link<> properties.
Signed-off-by: Andreas Färber <afaerber@suse.de> [ PC Changes: * Removed array-alloctor ref counting logic (limit changes just to * single IRQ allocator) * Removed WIP marking from subject line ] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
| f173d57a | 18-Jun-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
irq: Allocate IRQs individually
Allocate each IRQ individually on array allocations. This prepares for QOMification of IRQs, where pointers to individual IRQs may be taken and handed around for usag
irq: Allocate IRQs individually
Allocate each IRQ individually on array allocations. This prepares for QOMification of IRQs, where pointers to individual IRQs may be taken and handed around for usage as QOM Links. The g_renew() scheme used here is too fragile and would break all existing links should an IRQ list be extended.
We now have to pass the IRQ count to qemu_free_irqs(). We have so few call sites however, so this change is reasonably trivial.
Cc: agarcia@igalia.com Cc: mst@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
| 5942a190 | 11-Jun-2014 |
Paolo Bonzini <pbonzini@redhat.com> |
qdev: recursively unrealize devices when unrealizing bus
When the patch was posted that became 5c21ce7 (qdev: Realize buses on device realization, 2014-03-12), it included recursive realization and
qdev: recursively unrealize devices when unrealizing bus
When the patch was posted that became 5c21ce7 (qdev: Realize buses on device realization, 2014-03-12), it included recursive realization and unrealization of devices when the bus's "realized" property was toggled.
However, due to the same old worries about recursive realization and prerequisites not being realized yet, those hunks were dropped when committing the patch. Unfortunately, this causes a use-after-free bug (easily reproduced by a PCI hot-unplug action).
Before the patch, device_unparent behaved as follows:
for each child bus unparent bus ----------------------------. | for each child device | | unparent device ---------------. | | | unrealize device | | | | call dc->unparent | | | '------------------------------- | '----------------------------------------' unrealize device
After the patch, it behaves as follows instead:
unrealize device --------------------. | for each child bus | | unrealize bus (A) | '------------------------------------' for each child bus unparent bus ----------------------. | for each child device | | unrealize device (B) | | call dc->unparent | '----------------------------------'
At the step marked (B) the device might use data from the bus that is not available anymore due to step (A).
To fix this, we need to unrealize devices before step (A). To sidestep concerns about recursive realization, only do recursive unrealization and leave the "value && !bus->realized" case as it is.
The resulting flow is:
for each child bus unrealize bus ---------------------. | for each child device | | unrealize device (B) | | call bc->unrealize (A) | '----------------------------------' unrealize device for each child bus unparent bus ----------------------. | for each child device | | unparent device | '----------------------------------'
where everything is "powered down" before it is unassembled.
Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
show more ...
|
| d012ffc1 | 02-Jun-2014 |
Igor Mammedov <imammedo@redhat.com> |
qdev: expose DeviceState.hotplugged field as a property
so that management could detect via QOM interface if device was hotplugged
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Peter
qdev: expose DeviceState.hotplugged field as a property
so that management could detect via QOM interface if device was hotplugged
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|