| 49d2e648 | 16-Dec-2014 |
Marcel Apfelbaum <marcel.a@redhat.com> |
machine: remove qemu_machine_opts global list
QEMU has support for options per machine, keeping a global list of options is no longer necessary.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com
machine: remove qemu_machine_opts global list
QEMU has support for options per machine, keeping a global list of options is no longer necessary.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Message-id: 1418217570-15517-2-git-send-email-marcel.a@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 23120b13 | 13-Oct-2014 |
Jason Wang <jasowang@redhat.com> |
net: don't use set/get_pointer() in set/get_netdev()
Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue support) tries to use set_pointer() and get_pointer() to set and get NICPeers wh
net: don't use set/get_pointer() in set/get_netdev()
Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue support) tries to use set_pointer() and get_pointer() to set and get NICPeers which is not a pointer defined in DEFINE_PROP_NETDEV. This trick works but result a unclean and fragile implementation (e.g print_netdev and parse_netdev).
This patch solves this issue by not using set/get_pinter() and set and get netdev directly in set_netdev() and get_netdev(). After this the parse_netdev() and print_netdev() were no longer used and dropped from the source.
[Renamed 'err' label to 'out' as suggested by Markus Armbruster. --Stefan]
Cc: Markus Armbruster <armbru@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
| 4ad60880 | 03-Dec-2014 |
Markus Armbruster <armbru@redhat.com> |
Drop superfluous conditionals around qemu_opts_del()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.c
Drop superfluous conditionals around qemu_opts_del()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
| 4cae4d5a | 26-Nov-2014 |
Marcel Apfelbaum <marcel.a@redhat.com> |
hmp: fix regression of HMP device_del auto-completion
The commits: - 6a1fa9f5 (monitor: add del completion for peripheral device) - 66e56b13 (qdev: add qdev_build_hotpluggable_device_list helper)
hmp: fix regression of HMP device_del auto-completion
The commits: - 6a1fa9f5 (monitor: add del completion for peripheral device) - 66e56b13 (qdev: add qdev_build_hotpluggable_device_list helper)
cause a QEMU crash when trying to use HMP device_del auto-completion. It can be easily reproduced by: <qemu-bin> -enable-kvm ~/images/fedora.qcow2 -monitor stdio -device virtio-net-pci,id=vnet
(qemu) device_del /home/mapfelba/git/upstream/qemu/hw/core/qdev.c:941:qdev_build_hotpluggable_device_list: Object 0x7f6ce04e4fe0 is not an instance of type device Aborted (core dumped)
The root cause is qdev_build_hotpluggable_device_list going recursively over all peripherals and their children assuming all are devices. It doesn't work since PCI devices have at least on child which is a memory region (bus master).
Solved by observing that all devices appear as direct children of /machine/peripheral container. No need of going recursively over all the children.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reported-by: Gal Hammer <ghammer@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 1417002601-20799-1-git-send-email-marcel.a@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| ad5b88b1 | 16-Nov-2014 |
Michael S. Tsirkin <mst@redhat.com> |
acpi-build: mark RAM dirty on table update
acpi build modifies internal FW CFG RAM on first access but we forgot to mark it dirty. If this RAM has been migrated already, it won't be migrated again,
acpi-build: mark RAM dirty on table update
acpi build modifies internal FW CFG RAM on first access but we forgot to mark it dirty. If this RAM has been migrated already, it won't be migrated again, returning corrupted tables to guest.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| ddd2eab7 | 15-Nov-2014 |
Gonglei <arei.gonglei@huawei.com> |
loader: fix NEGATIVE_RETURNS
lseek will return -1 on error, g_malloc0(size) and read(,,size) paramenters cannot be negative. We should add a check for return value of lseek().
Signed-off-by: Gongle
loader: fix NEGATIVE_RETURNS
lseek will return -1 on error, g_malloc0(size) and read(,,size) paramenters cannot be negative. We should add a check for return value of lseek().
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 7634fe3c | 24-Sep-2014 |
Alexander Graf <agraf@suse.de> |
sysbus: Add new platform bus helper device
We need to support spawning of sysbus devices dynamically via the command line. The easiest way to represent these dynamically spawned devices in the guest
sysbus: Add new platform bus helper device
We need to support spawning of sysbus devices dynamically via the command line. The easiest way to represent these dynamically spawned devices in the guest's memory and IRQ layout is by preallocating some space for dynamic sysbus devices.
This is what the "platform bus" device does. It is a sysbus device that exports a configurably sized MMIO region and a configurable number of IRQ lines. When this device encounters sysbus devices that have been dynamically created and not manually wired up, it dynamically connects them to its own pool of resources.
The machine model can then loop through all of these devices and create a guest configuration (device tree) to make them visible to the guest.
Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
| 471a9bc1 | 24-Sep-2014 |
Alexander Graf <agraf@suse.de> |
sysbus: Expose MMIO enumeration helper
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 w
sysbus: Expose MMIO enumeration helper
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: Alexander Graf <agraf@suse.de>
show more ...
|
| b7973186 | 24-Sep-2014 |
Alexander Graf <agraf@suse.de> |
sysbus: Expose IRQ enumeration helpers
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 e
sysbus: Expose IRQ enumeration helpers
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: Alexander Graf <agraf@suse.de>
show more ...
|
| 33cd52b5 | 01-Jul-2014 |
Alexander Graf <agraf@suse.de> |
sysbus: Make devices spawnable via -device
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
sysbus: Make devices spawnable via -device
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: Alexander Graf <agraf@suse.de>
show more ...
|
| eb572280 | 24-Sep-2014 |
Alexander Graf <agraf@suse.de> |
sysbus: Add dynamic sysbus device search
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 t
sysbus: Add dynamic sysbus device search
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: Alexander Graf <agraf@suse.de>
show more ...
|
| 25bda50a | 18-Oct-2014 |
Max Filippov <jcmvbkbc@gmail.com> |
hw/core/loader: implement address translation in uimage loader
Such address translation is needed when load address recorded in uImage is a virtual address. When the actual load address is requested
hw/core/loader: implement address translation in uimage loader
Such address translation is needed when load address recorded in uImage is a virtual address. When the actual load address is requested, return untranslated address: user that needs the translated address can always apply translation function to it and those that need it untranslated don't need to do the inverse translation.
Add translation function pointer and its parameter to uimage_load prototype. Update all existing users.
No user-visible functional changes.
Cc: qemu-stable@nongnu.org Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Alexander Graf <agraf@suse.de>
show more ...
|
| 08118672 | 30-Oct-2014 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
virtio-scsi fixes, the first part of dynamic sysbus devices, MAINTAINERS updates, and AVX512 support.
# gpg: Signature
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
virtio-scsi fixes, the first part of dynamic sysbus devices, MAINTAINERS updates, and AVX512 support.
# gpg: Signature made Mon 27 Oct 2014 15:12:13 GMT using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream: (28 commits) aio / timers: De-document -clock hw/scsi/virtio-scsi.c: fix the "type" use error in virtio_scsi_handle_ctrl virtio-scsi: sense in virtio_scsi_command_complete target-i386: add Intel AVX-512 support get_maintainer.pl: restrict cases where it falls back to --git get_maintainer.pl: move git loop under "if ($email) {" qtest: fix qtest log fd should be initialized before qtest chardev MAINTAINERS: avoid M entries that point to mailing lists MAINTAINERS: add some tests directories MAINTAINERS: Add more TCG files MAINTAINERS: add myself for X86 MAINTAINERS: add Samuel Thibault as usb-serial.c and baum.c maintainer MAINTAINERS: grab more files from Anthony's pile target-i386: warns users when CPU threads>1 for non-Intel CPUs sysbus: Use TYPE_DEVICE GPIO functionality qdev: gpio: Define qdev_pass_gpios() qdev: gpio: Remove qdev_init_gpio_out x1 restriction qdev: gpio: delete NamedGPIOList::out irq: Remove qemu_irq_intercept_out qtest/irq: Rework IRQ interception ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| b5917219 | 26-Sep-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
sysbus: Use TYPE_DEVICE GPIO functionality
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 unnam
sysbus: Use TYPE_DEVICE GPIO functionality
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: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 17a96a14 | 26-Sep-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
qdev: gpio: Define qdev_pass_gpios()
Allows a container to take ownership of GPIOs in a contained device and automatically connect them as GPIOs to the container.
This prepares for deprecation of t
qdev: gpio: Define qdev_pass_gpios()
Allows a container to take ownership of GPIOs in a contained device and automatically connect them as GPIOs to the container.
This prepares for deprecation of the SYSBUS IRQ functionality, which has this feature. We push it up to the device level instead of sysbus level. There's nothing sysbus specific about passing GPIOs to containers so its a legitimate device-level generic feature.
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| aef0869e | 26-Sep-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
qdev: gpio: Remove qdev_init_gpio_out x1 restriction
Previously this was restricted to a single call per-dev/per-name. With the conversion of the GPIO output state to QOM the implementation can now
qdev: gpio: Remove qdev_init_gpio_out x1 restriction
Previously this was restricted to a single call per-dev/per-name. With the conversion of the GPIO output state to QOM the implementation can now handle repeated calls. Remove the restriction.
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 15942b65 | 26-Sep-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
qdev: gpio: delete NamedGPIOList::out
All users of GPIO outputs are fully QOMified, using QOM properties to access the GPIO data. Delete.
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by:
qdev: gpio: delete NamedGPIOList::out
All users of GPIO outputs are fully QOMified, using QOM properties to access the GPIO data. Delete.
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| b58c3035 | 26-Sep-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
irq: Remove qemu_irq_intercept_out
No more users left and obsoleted by qdev_intercept_gpio_out.
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilin
irq: Remove qemu_irq_intercept_out
No more users left and obsoleted by qdev_intercept_gpio_out.
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 60a79016 | 26-Sep-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
qtest/irq: Rework IRQ interception
Change the qtest intercept handler to accept just the individual IRQ being intercepted as opaque. n is still expected to be correctly set as for the original inter
qtest/irq: Rework IRQ interception
Change the qtest intercept handler to accept just the individual IRQ being intercepted as opaque. n is still expected to be correctly set as for the original intercepted irq. qemu_intercept_irq_in is updated accordingly.
Then covert the qemu_irq_intercept_out call to use qdev intercept version. This stops qtest from having to mess with the raw IRQ pointers (still has to mess with names and counts but a step in the right direction).
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 0c24db2b | 26-Sep-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
qdev: gpio: Add API for intercepting a GPIO
To replace the old qemu_irq intercept API (which had users reaching into qdev private state for GPIOs).
Reviewed-by: Alexander Graf <agraf@suse.de> Signe
qdev: gpio: Add API for intercepting a GPIO
To replace the old qemu_irq intercept API (which had users reaching into qdev private state for GPIOs).
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 02757df2 | 26-Sep-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
qdev: gpio: Re-implement qdev_connect_gpio QOM style
Re-implement as a link setter. This should allow the QOM framework to keep track of ref counts properly etc.
We need to add a default parent for
qdev: gpio: Re-implement qdev_connect_gpio QOM style
Re-implement as a link setter. This should allow the QOM framework to keep track of ref counts properly etc.
We need to add a default parent for the connecting input incase it's coming from a non-qdev source. We simply parent the IRQ to the machine in this case.
Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 66e56b13 | 21-Oct-2014 |
Zhu Guihua <zhugh.fnst@cn.fujitsu.com> |
qdev: add qdev_build_hotpluggable_device_list helper
For peripheral device del completion, add a function to build a list for hotpluggable devices.
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.
qdev: add qdev_build_hotpluggable_device_list helper
For peripheral device del completion, add a function to build a list for hotpluggable devices.
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
show more ...
|
| 4be74634 | 07-Oct-2014 |
Markus Armbruster <armbru@redhat.com> |
hw: Convert from BlockDriverState to BlockBackend, mostly
Device models should access their block backends only through the block-backend.h API. Convert them, and drop direct includes of inappropri
hw: Convert from BlockDriverState to BlockBackend, mostly
Device models should access their block backends only through the block-backend.h API. Convert them, and drop direct includes of inappropriate headers.
Just four uses of BlockDriverState are left:
* The Xen paravirtual block device backend (xen_disk.c) opens images itself when set up via xenbus, bypassing blockdev.c. I figure it should go through qmp_blockdev_add() instead.
* Device model "usb-storage" prompts for keys. No other device model does, and this one probably shouldn't do it, either.
* ide_issue_trim_cb() uses bdrv_aio_discard() instead of blk_aio_discard() because it fishes its backend out of a BlockAIOCB, which has only the BlockDriverState.
* PC87312State has an unused BlockDriverState[] member.
The next two commits take care of the latter two.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
| 18b91a3e | 07-Oct-2014 |
Gonglei <arei.gonglei@huawei.com> |
qdev: Drop legacy_name from qdev properties
The legacy_name is useless now, better help information is provided by description field of property.
Cc: Markus Armbruster <armbru@redhat.com> Signed-of
qdev: Drop legacy_name from qdev properties
The legacy_name is useless now, better help information is provided by description field of property.
Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
| b8c9cd5c | 07-Oct-2014 |
Gonglei <arei.gonglei@huawei.com> |
qdev: Set the object property's description to the qdev property's.
Set all static qdev properties' descriptions to object property's description.
Cc: Markus Armbruster <armbru@redhat.com> Signed-o
qdev: Set the object property's description to the qdev property's.
Set all static qdev properties' descriptions to object property's description.
Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|