Revision tags: v9.1.0 |
|
#
1ee5f645 |
| 08-Jul-2024 |
Peter Maydell <peter.maydell@linaro.org> |
include/hw/qdev-core.h: Correct and clarify gpio doc comments
The doc comments for the functions for named GPIO inputs and outputs had a couple of problems: * some copy-and-paste errors meant the q
include/hw/qdev-core.h: Correct and clarify gpio doc comments
The doc comments for the functions for named GPIO inputs and outputs had a couple of problems: * some copy-and-paste errors meant the qdev_connect_gpio_out_named() doc comment had references to input GPIOs that should be to output GPIOs * it wasn't very clear that named GPIOs are arrays and so the connect functions specify a single GPIO line by giving both the name of the array and the index within that array
Fix the copy-and-paste errors and slightly expand the text to say that functions are connecting one line in a named GPIO array, not a single named GPIO line.
Reported-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240708153312.3109380-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
667cdad0 |
| 02-May-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
qdev-core: remove DeviceListener from typedefs.h
It is needed in very few places, which already depend on other parts of qdev-core.h files. The benefit of having it in typedefs.h is small.
Reviewe
qdev-core: remove DeviceListener from typedefs.h
It is needed in very few places, which already depend on other parts of qdev-core.h files. The benefit of having it in typedefs.h is small.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
04accf43 |
| 31-Jan-2024 |
Mark Kanda <mark.kanda@oracle.com> |
oslib-posix: initialize backend memory objects in parallel
QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memor
oslib-posix: initialize backend memory objects in parallel
QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memory spanning multiple NUMA nodes) because the memory objects are initialized in series.
Allow the initialization to occur in parallel (asynchronously). In order to ensure optimal thread placement, asynchronous initialization requires prealloc context threads to be in use.
Signed-off-by: Mark Kanda <mark.kanda@oracle.com> Message-ID: <20240131165327.3154970-2-mark.kanda@oracle.com> Tested-by: Mario Casquero <mcasquer@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com>
show more ...
|
#
cb711a6d |
| 19-Jan-2024 |
Peter Maydell <peter.maydell@linaro.org> |
hw/core: Remove transitional infrastructure from BusClass
BusClass currently has transitional infrastructure to support subclasses which implement the legacy BusClass::reset method rather than the R
hw/core: Remove transitional infrastructure from BusClass
BusClass currently has transitional infrastructure to support subclasses which implement the legacy BusClass::reset method rather than the Resettable interface. We have now removed all the users of BusClass::reset in the tree, so we can remove the transitional infrastructure.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Cédric Le Goater <clg@redhat.com> Acked-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Tested-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-id: 20240119163512.3810301-6-peter.maydell@linaro.org
show more ...
|
#
956ef499 |
| 30-Jan-2024 |
Manos Pitsidianakis <manos.pitsidianakis@linaro.org> |
hw/core/qdev.c: add qdev_get_human_name()
Add a simple method to return some kind of human readable identifier for use in error messages.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-o
hw/core/qdev.c: add qdev_get_human_name()
Add a simple method to return some kind of human readable identifier for use in error messages.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Message-id: 8b566bfced98ae44be1fcc1f8e7215f0c3393aa1.1706598705.git.manos.pitsidianakis@linaro.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
Revision tags: v8.0.0 |
|
#
f703f1ef |
| 20-Mar-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
bulk: Do not declare function prototypes using 'extern' keyword
By default, C function prototypes declared in headers are visible, so there is no need to declare them as 'extern' functions. Remove t
bulk: Do not declare function prototypes using 'extern' keyword
By default, C function prototypes declared in headers are visible, so there is no need to declare them as 'extern' functions. Remove this redundancy in a single bulk commit; do not modify:
- meson.build (used to check function availability at runtime) - pc-bios/ - libdecnumber/ - tests/ - *.c
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230605175647.88395-5-philmd@linaro.org>
show more ...
|
#
c378e882 |
| 10-Jul-2023 |
Alex Bennée <alex.bennee@linaro.org> |
include/hw: document the device_class_set_parent_* fns
These are useful functions for when you want proper inheritance of functionality across realize/unrealize calls.
Signed-off-by: Alex Bennée <a
include/hw: document the device_class_set_parent_* fns
These are useful functions for when you want proper inheritance of functionality across realize/unrealize calls.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230710153522.3469097-3-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
e57fc3de |
| 10-Jul-2023 |
Alex Bennée <alex.bennee@linaro.org> |
include: attempt to document device_class_set_props
I'm still not sure how I achieve by use case of the parent class defining the following properties:
static Property vud_properties[] = {
include: attempt to document device_class_set_props
I'm still not sure how I achieve by use case of the parent class defining the following properties:
static Property vud_properties[] = { DEFINE_PROP_CHR("chardev", VHostUserDevice, chardev), DEFINE_PROP_UINT16("id", VHostUserDevice, id, 0), DEFINE_PROP_UINT32("num_vqs", VHostUserDevice, num_vqs, 1), DEFINE_PROP_END_OF_LIST(), };
But for the specialisation of the class I want the id to default to the actual device id, e.g.:
static Property vu_rng_properties[] = { DEFINE_PROP_UINT16("id", VHostUserDevice, id, VIRTIO_ID_RNG), DEFINE_PROP_UINT32("num_vqs", VHostUserDevice, num_vqs, 1), DEFINE_PROP_END_OF_LIST(), };
And so far the API for doing that isn't super clear.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230710153522.3469097-2-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
6aebb1f6 |
| 30-Jun-2023 |
Alex Bennée <alex.bennee@linaro.org> |
include/hw/qdev-core: fixup kerneldoc annotations
Fix up the kerneldoc markup and start documenting the various fields in QDEV related structures. This involved:
- moving overall description to a
include/hw/qdev-core: fixup kerneldoc annotations
Fix up the kerneldoc markup and start documenting the various fields in QDEV related structures. This involved:
- moving overall description to a DOC: comment at top - fixing various markup issues for types and structures - adding missing Return: statements - adding some typedefs to hide QLIST macros in headers
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230630180423.558337-25-alex.bennee@linaro.org>
show more ...
|
#
26462a70 |
| 16-May-2023 |
Stefan Hajnoczi <stefanha@redhat.com> |
hw/qdev: introduce qdev_is_realized() helper
Add a helper function to check whether the device is realized without requiring the Big QEMU Lock. The next patch adds a second caller. The goal is to av
hw/qdev: introduce qdev_is_realized() helper
Add a helper function to check whether the device is realized without requiring the Big QEMU Lock. The next patch adds a second caller. The goal is to avoid spreading DeviceState field accesses throughout the code.
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230516190238.8401-3-stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
#
a2e1753b |
| 27-Apr-2023 |
Alexander Bulekov <alxndr@bu.edu> |
memory: prevent dma-reentracy issues
Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. This flag is set/checked prior to calling a device's MemoryRegion handlers, and set when
memory: prevent dma-reentracy issues
Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. This flag is set/checked prior to calling a device's MemoryRegion handlers, and set when device code initiates DMA. The purpose of this flag is to prevent two types of DMA-based reentrancy issues:
1.) mmio -> dma -> mmio case 2.) bh -> dma write -> mmio case
These issues have led to problems such as stack-exhaustion and use-after-frees.
Summary of the problem from Peter Maydell: https://lore.kernel.org/qemu-devel/CAFEAcA_23vc7hE3iaM-JVA6W38LK4hJoWae5KcknhPRD5fPBZA@mail.gmail.com
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/62 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/540 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/541 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/556 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/557 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/827 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1282 Resolves: CVE-2023-0330
Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230427211013.2994127-2-alxndr@bu.edu> [thuth: Replace warn_report() with warn_report_once()] Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
ceefa0b7 |
| 02-Mar-2023 |
Igor Mammedov <imammedo@redhat.com> |
pci: fix 'hotplugglable' property behavior
Currently the property may flip its state during VM bring up or just doesn't work as the name implies.
In particular with PCIE root port that has 'hotplug
pci: fix 'hotplugglable' property behavior
Currently the property may flip its state during VM bring up or just doesn't work as the name implies.
In particular with PCIE root port that has 'hotplug={on|off}' property, and when it's turned off, one would expect 'hotpluggable' == false for any devices attached to it. Which is not the case since qbus_is_hotpluggable() used by the property just checks for presence of any hotplug_handler set on bus.
The problem is that name BusState::hotplug_handler from its inception is misnomer, as it handles not only hotplug but also in many cases coldplug as well (i.e. generic wiring interface), and it's fine to have hotplug_handler set on bus while it doesn't support hotplug (ex. pcie-slot with hotplug=off).
Another case of root port flipping 'hotpluggable' state when ACPI PCI hotplug is enabled in this case root port with 'hotplug=off' starts as hotpluggable and then later on, pcihp hotplug_handler clears hotplug_handler explicitly after checking root port's 'hotplug' property.
So root-port hotpluggablity check sort of works if pcihp is enabled but is broken if pcihp is disabled.
One way to deal with the issue is to ask hotplug_handler if bus it controls is hotpluggable or not. To do that add is_hotpluggable_bus() hook to HotplugHandler interface and use it in 'hotpluggable' property + teach pcie-slot to actually look into 'hotplug' property state before deciding if bus is hotpluggable.
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20230302161543.286002-13-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
2d2f2507 |
| 12-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus()
The structure is accessed read-only by qdev_get_parent_bus().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus()
The structure is accessed read-only by qdev_get_parent_bus().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230212224730.51438-2-philmd@linaro.org>
show more ...
|
#
c3141e21 |
| 16-Dec-2022 |
Peter Maydell <peter.maydell@linaro.org> |
hw: Remove device_legacy_reset()
The device_legacy_reset() function is now not used anywhere, so we can remove the implementation.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
#
e5e887c7 |
| 16-Dec-2022 |
Peter Maydell <peter.maydell@linaro.org> |
qdev: Remove qdev_reset_all() and qbus_reset_all()
Remove the qdev_reset_all() and qbus_reset_all() functions, now we have moved all the callers over to the new device_cold_reset() and bus_cold_rese
qdev: Remove qdev_reset_all() and qbus_reset_all()
Remove the qdev_reset_all() and qbus_reset_all() functions, now we have moved all the callers over to the new device_cold_reset() and bus_cold_reset() functions.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
Revision tags: v7.2.0 |
|
#
7a21bee2 |
| 07-Jul-2022 |
Daniel P. Berrangé <berrange@redhat.com> |
misc: fix commonly doubled up words
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220707163720.1421716-5-berrange@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linar
misc: fix commonly doubled up words
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220707163720.1421716-5-berrange@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
217c7f01 |
| 13-Jun-2022 |
Jagannathan Raman <jag.raman@oracle.com> |
qdev: unplug blocker for devices
Add blocker to prevent hot-unplug of devices
TYPE_VFIO_USER_SERVER, which is introduced shortly, attaches itself to a PCIDevice on which it depends. If the attached
qdev: unplug blocker for devices
Add blocker to prevent hot-unplug of devices
TYPE_VFIO_USER_SERVER, which is introduced shortly, attaches itself to a PCIDevice on which it depends. If the attached PCIDevice gets removed while the server in use, it could cause it crash. To prevent this, TYPE_VFIO_USER_SERVER adds an unplug blocker for the PCIDevice.
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: John G Johnson <john.g.johnson@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: c41ef80b7cc063314d629737bed2159e5713f2e0.1655151679.git.jag.raman@oracle.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
Revision tags: v7.0.0 |
|
#
5df69ab8 |
| 11-Jan-2022 |
Peter Maydell <peter.maydell@linaro.org> |
qdev-core.h: Fix wrongly named reference to TYPE_SPLIT_IRQ
Fix a comment in qdev-core.h where we incorrectly referred to TYPE_IRQ_SPLIT when we meant TYPE_SPLIT_IRQ.
Signed-off-by: Peter Maydell <p
qdev-core.h: Fix wrongly named reference to TYPE_SPLIT_IRQ
Fix a comment in qdev-core.h where we incorrectly referred to TYPE_IRQ_SPLIT when we meant TYPE_SPLIT_IRQ.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20220111172655.3546766-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
Revision tags: v6.2.0 |
|
#
2ebd9ce1 |
| 05-Nov-2021 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter
@pin is an input where we connect a device output. Rename it @input_pin to simplify the documentation.
Reviewed-by: Yanan Wang <wangya
hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter
@pin is an input where we connect a device output. Rename it @input_pin to simplify the documentation.
Reviewed-by: Yanan Wang <wangyanan55@huawei.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211218130437.1516929-5-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
#
1fbd004b |
| 05-Nov-2021 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
hw/qdev: Correct qdev_connect_gpio_out_named() documentation
qdev_connect_gpio_out_named() is described as qdev_connect_gpio_out(), and referring to itself in an endless loop, which is confusing. Fi
hw/qdev: Correct qdev_connect_gpio_out_named() documentation
qdev_connect_gpio_out_named() is described as qdev_connect_gpio_out(), and referring to itself in an endless loop, which is confusing. Fix.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Yanan Wang <wangyanan55@huawei.com> Message-Id: <20211218130437.1516929-4-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
#
14b0375b |
| 18-Dec-2021 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
hw/qdev: Correct qdev_init_gpio_out_named() documentation
qdev_init_gpio_out_named() is described as qdev_init_gpio_out(), and referring to itself in an endless loop, which is confusing. Fix.
Repor
hw/qdev: Correct qdev_init_gpio_out_named() documentation
qdev_init_gpio_out_named() is described as qdev_init_gpio_out(), and referring to itself in an endless loop, which is confusing. Fix.
Reported-by: Yanan Wang <wangyanan55@huawei.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Yanan Wang <wangyanan55@huawei.com> Message-Id: <20211218130437.1516929-3-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
#
694804ed |
| 18-Dec-2021 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
hw/qdev: Cosmetic around documentation
Add empty lines to have a clearer distinction between different functions declarations.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Y
hw/qdev: Cosmetic around documentation
Add empty lines to have a clearer distinction between different functions declarations.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Yanan Wang <wangyanan55@huawei.com> Message-Id: <20211218130437.1516929-2-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
#
18416c62 |
| 11-Nov-2021 |
Gerd Hoffmann <kraxel@redhat.com> |
pcie: expire pending delete
Add an expire time for pending delete, once the time is over allow pressing the attention button again.
This makes pcie hotplug behave more like acpi hotplug, where one
pcie: expire pending delete
Add an expire time for pending delete, once the time is over allow pressing the attention button again.
This makes pcie hotplug behave more like acpi hotplug, where one can try sending an 'device_del' monitor command again in case the guest didn't respond to the first attempt.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20211111130859.1171890-7-kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
b10cb627 |
| 27-Oct-2021 |
Paolo Bonzini <pbonzini@redhat.com> |
watchdog: add information from -watchdog help to -device help
List all watchdog devices in a separate category, and populate their descriptions.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
f3558b1b |
| 08-Oct-2021 |
Kevin Wolf <kwolf@redhat.com> |
qdev: Base object creation on QDict rather than QemuOpts
QDicts are both what QMP natively uses and what the keyval parser produces. Going through QemuOpts isn't useful for either one, so switch the
qdev: Base object creation on QDict rather than QemuOpts
QDicts are both what QMP natively uses and what the keyval parser produces. Going through QemuOpts isn't useful for either one, so switch the main device creation function to QDicts. By sharing more code with the -object/object-add code path, we can even reduce the code size a bit.
This commit doesn't remove the detour through QemuOpts from any code path yet, but it allows the following commits to do so.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20211008133442.141332-15-kwolf@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|