| 07bee7f4 | 05-Jul-2016 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Tue 05 Jul 2016 16:46:14 BST # gpg: using RSA key 0x7F09B272C88F
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Tue 05 Jul 2016 16:46:14 BST # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* remotes/kevin/tags/for-upstream: (43 commits) block/qcow2: Don't use cpu_to_*w() block: Convert bdrv_co_preadv/pwritev to BdrvChild block: Convert bdrv_prwv_co() to BdrvChild block: Convert bdrv_pwrite_zeroes() to BdrvChild block: Convert bdrv_pwrite(v/_sync) to BdrvChild block: Convert bdrv_pread(v) to BdrvChild block: Convert bdrv_write() to BdrvChild block: Convert bdrv_read() to BdrvChild block: Use BlockBackend for I/O in bdrv_commit() block: Move bdrv_commit() to block/commit.c block: Convert bdrv_co_do_readv/writev to BdrvChild block: Convert bdrv_aio_writev() to BdrvChild block: Convert bdrv_aio_readv() to BdrvChild block: Convert bdrv_co_writev() to BdrvChild block: Convert bdrv_co_readv() to BdrvChild vhdx: Some more BlockBackend use in vhdx_create() blkreplay: Convert to byte-based I/O vvfat: Use BdrvChild for s->qcow block/qdev: Fix NULL access when using BB twice block: fix return code for partial write for Linux AIO ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 791b7d23 | 05-Jul-2016 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc, pci, virtio: new features, cleanups, fixes
iommus can not be added with -device. cleanups and fixes all over the place
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc, pci, virtio: new features, cleanups, fixes
iommus can not be added with -device. cleanups and fixes all over the place
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Tue 05 Jul 2016 11:18:32 BST # gpg: using RSA key 0x281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* remotes/mst/tags/for_upstream: (30 commits) vmw_pvscsi: remove unnecessary internal msi state flag e1000e: remove unnecessary internal msi state flag vmxnet3: remove unnecessary internal msi state flag mptsas: remove unnecessary internal msi state flag megasas: remove unnecessary megasas_use_msi() pci: Convert msi_init() to Error and fix callers to check it pci bridge dev: change msi property type megasas: change msi/msix property type mptsas: change msi property type intel-hda: change msi property type usb xhci: change msi/msix property type change pvscsi_init_msi() type to void tests: add APIC.cphp and DSDT.cphp blobs tests: acpi: add CPU hotplug testcase log: Permit -dfilter 0..0xffffffffffffffff range: Replace internal representation of Range range: Eliminate direct Range member access log: Clean up misuse of Range for -dfilter pci_register_bar: cleanup Revert "virtio-net: unbreak self announcement and guest offloads after migration" ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| a9d52a75 | 23-Jun-2016 |
Kevin Wolf <kwolf@redhat.com> |
block/qdev: Fix NULL access when using BB twice
BlockBackend has only a single pointer to its guest device, so it makes sure that only a single guest device is attached to it. device-add returns an
block/qdev: Fix NULL access when using BB twice
BlockBackend has only a single pointer to its guest device, so it makes sure that only a single guest device is attached to it. device-add returns an error if you try to attach a second device to a BB. In order to make the error message nicer, -device that manually connects to a if=none block device get a different message than -drive that implicitly creates a guest device. The if=... option is stored in DriveInfo.
However, since blockdev-add exists, not every BlockBackend has a DriveInfo any more. Check that it exists before we dereference it.
QMP reproducer resulting in a segfault:
{"execute":"blockdev-add","arguments":{"options":{"id":"disk","driver":"file","filename":"/tmp/test.img"}}} {"execute":"device_add","arguments":{"driver":"virtio-blk-pci","drive":"disk"}} {"execute":"device_add","arguments":{"driver":"virtio-blk-pci","drive":"disk"}}
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
| a7422959 | 04-Jul-2016 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
register: Add block initialise helper
Add a helper that will scan a static RegisterAccessInfo Array and populate a container MemoryRegion with registers as defined.
Signed-off-by: Peter Crosthwaite
register: Add block initialise helper
Add a helper that will scan a static RegisterAccessInfo Array and populate a container MemoryRegion with registers as defined.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: 347b810b2799e413c98d5bbeca97bcb1557946c3.1467053537.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 49e14ddb | 04-Jul-2016 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
register: QOMify
QOMify registers as a child of TYPE_DEVICE. This allows registers to define GPIOs.
Define an init helper that will do QOM initialisation.
Signed-off-by: Peter Crosthwaite <peter.c
register: QOMify
QOMify registers as a child of TYPE_DEVICE. This allows registers to define GPIOs.
Define an init helper that will do QOM initialisation.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 2545f71db26bf5586ca0c08a3e3cf1b217450552.1467053537.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 0b73c9bb | 04-Jul-2016 |
Alistair Francis <alistair.francis@xilinx.com> |
register: Add Memory API glue
Add memory io handlers that glue the register API to the memory API. Just translation functions at this stage. Although it does allow for devices to be created without
register: Add Memory API glue
Add memory io handlers that glue the register API to the memory API. Just translation functions at this stage. Although it does allow for devices to be created without all-in-one mmio r/w handlers.
This patch also adds the RegisterInfoArray struct, which allows all of the individual RegisterInfo structs to be grouped into a single memory region.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: f7704d8ac6ac0f469ed35401f8151a38bd01468b.1467053537.git.alistair.francis@xilinx.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 1599121b | 04-Jul-2016 |
Alistair Francis <alistair.francis@xilinx.com> |
register: Add Register API
This API provides some encapsulation of registers and factors out some common functionality to common code. Bits of device state (usually MMIO registers) often have all so
register: Add Register API
This API provides some encapsulation of registers and factors out some common functionality to common code. Bits of device state (usually MMIO registers) often have all sorts of access restrictions and semantics associated with them. This API allows you to define what those restrictions are on a bit-by-bit basis.
Helper functions are then used to access the register which observe the semantics defined by the RegisterAccessInfo struct.
Some features: Bits can be marked as read_only (ro field) Bits can be marked as write-1-clear (w1c field) Bits can be marked as reserved (rsvd field) Reset values can be defined (reset) Bits can be marked clear on read (cor) Pre and post action callbacks can be added to read and write ops Verbose debugging info can be enabled/disabled
Useful for defining device register spaces in a data driven way. Cuts down on a lot of the verbosity and repetition in the switch-case blocks in the standard foo_mmio_read/write functions.
Also useful for automated generation of device models from hardware design sources.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 40d62c7e1bf6e63bb4193ec46b15092a7d981e59.1467053537.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 10d01f73 | 27-Jun-2016 |
Marcel Apfelbaum <marcel@redhat.com> |
machine: remove iommu property
Since iommu devices can be created with '-device' there is no need to keep iommu as machine and mch property.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Revi
machine: remove iommu property
Since iommu devices can be created with '-device' there is no need to keep iommu as machine and mch property.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| f9a8b553 | 28-Jan-2016 |
Eduardo Habkost <ehabkost@redhat.com> |
qdev: Use GList for global properties
If the same GlobalProperty struct is registered twice, the list entry gets corrupted, making tqe_next points to itself, and qdev_prop_set_globals() gets stuck i
qdev: Use GList for global properties
If the same GlobalProperty struct is registered twice, the list entry gets corrupted, making tqe_next points to itself, and qdev_prop_set_globals() gets stuck in a loop. The bug can be easily reproduced by running:
$ qemu-system-x86_64 -rtc-td-hack -rtc-td-hack
Change global_props to use GList instead of queue.h, making the code simpler and able to deal with properties being registered twice.
Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| 41346263 | 11-May-2016 |
Igor Mammedov <imammedo@redhat.com> |
qdev: hotplug: Introduce HotplugHandler.pre_plug() callback
pre_plug callback is to be called before device.realize() is executed. This would allow to check/set device's properties from HotplugHandl
qdev: hotplug: Introduce HotplugHandler.pre_plug() callback
pre_plug callback is to be called before device.realize() is executed. This would allow to check/set device's properties from HotplugHandler.
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
show more ...
|
| 7474f1be | 10-May-2016 |
Peter Maydell <peter.maydell@linaro.org> |
qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices
If qdev_try_create() is passed NULL for the bus, it will automatically put the newly created device onto the defau
qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices
If qdev_try_create() is passed NULL for the bus, it will automatically put the newly created device onto the default system bus. However if the device is not actually a SysBusDevice then this will result in later crashes (for instance when running the monitor "info qtree" command) because code reasonably assumes that all devices on the system bus are system bus devices.
Generally the mistake is that the calling code should create the object with object_new(TYPE_FOO) rather than qdev_create(NULL, TYPE_FOO); see commit 6749695eaaf346c1 for an example of fixing this bug.
Assert in qdev_try_create() if the device isn't suitable to put on the system bus, so that this mistake results in failure earlier and more reliably.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
| d9d8d452 | 17-Apr-2016 |
Cao jin <caoj.fnst@cn.fujitsu.com> |
qdev: Clean up around properties
include: 1. remove unnecessary declaration of static function 2. fix inconsistency between comment and function name, and typo OOM->QOM 2. update comments of functio
qdev: Clean up around properties
include: 1. remove unnecessary declaration of static function 2. fix inconsistency between comment and function name, and typo OOM->QOM 2. update comments of functions, use uniform format(GTK-Doc style)
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
| 578c4b2f | 06-Jun-2016 |
Dmitry Osipenko <digetx@gmail.com> |
hw/ptimer: Introduce ptimer_get_limit
Currently ptimer users are used to store copy of the limit value, because ptimer doesn't provide facility to retrieve the limit. Let's provide it.
Signed-off-b
hw/ptimer: Introduce ptimer_get_limit
Currently ptimer users are used to store copy of the limit value, because ptimer doesn't provide facility to retrieve the limit. Let's provide it.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 8f1fa9f90d8dbf8086fb02f3b4835eaeb4089cf6.1464367869.git.digetx@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 869e92b5 | 06-Jun-2016 |
Dmitry Osipenko <digetx@gmail.com> |
hw/ptimer: Support "on the fly" timer mode switch
Allow switching between periodic <-> oneshot modes while timer is running.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Peter Cro
hw/ptimer: Support "on the fly" timer mode switch
Allow switching between periodic <-> oneshot modes while timer is running.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: f030be6e28fbd219e1e8d22297aee367bd9af5bb.1464367869.git.digetx@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 7ef6e3cf | 06-Jun-2016 |
Dmitry Osipenko <digetx@gmail.com> |
hw/ptimer: Update .delta on period/freq change
Delta value must be updated on period/freq change, otherwise running timer would be restarted (counter reloaded with old delta). Only m68k/mcf520x and
hw/ptimer: Update .delta on period/freq change
Delta value must be updated on period/freq change, otherwise running timer would be restarted (counter reloaded with old delta). Only m68k/mcf520x and arm/arm_timer devices are currently doing freq change correctly, i.e. stopping the timer. Perform delta update to fix affected devices and eliminate potential further mistakes.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 4987ef5fdc128bb9a744fd794d3f609135c6a39c.1464367869.git.digetx@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 5a50307b | 06-Jun-2016 |
Dmitry Osipenko <digetx@gmail.com> |
hw/ptimer: Perform counter wrap around if timer already expired
ptimer_get_count() might be called while QEMU timer already been expired. In that case ptimer would return counter = 0, which might be
hw/ptimer: Perform counter wrap around if timer already expired
ptimer_get_count() might be called while QEMU timer already been expired. In that case ptimer would return counter = 0, which might be undesirable in case of polled timer. Do counter wrap around for periodic timer to keep it distributed. In order to achieve more accurate emulation behaviour of certain hardware, don't perform wrap around when in icount mode and return counter = 0 in that case (that doesn't affect polled counter distribution).
Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 4ce381c7d24d85d165ff251d2875d16a4b6a5c04.1464367869.git.digetx@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| e91171e3 | 06-Jun-2016 |
Dmitry Osipenko <digetx@gmail.com> |
hw/ptimer: Fix issues caused by the adjusted timer limit value
Multiple issues here related to the timer with a adjusted .limit value:
1) ptimer_get_count() returns incorrect counter value for the
hw/ptimer: Fix issues caused by the adjusted timer limit value
Multiple issues here related to the timer with a adjusted .limit value:
1) ptimer_get_count() returns incorrect counter value for the disabled timer after loading the counter with a small value, because adjusted limit value is used instead of the original.
For instance: 1) ptimer_stop(t) 2) ptimer_set_period(t, 1) 3) ptimer_set_limit(t, 0, 1) 4) ptimer_get_count(t) <-- would return 10000 instead of 0
2) ptimer_get_count() might return incorrect value for the timer running with a adjusted limit value.
For instance: 1) ptimer_stop(t) 2) ptimer_set_period(t, 1) 3) ptimer_set_limit(t, 10, 1) 4) ptimer_run(t) 5) ptimer_get_count(t) <-- might return value > 10
3) Neither ptimer_set_period() nor ptimer_set_freq() are adjusting the limit value, so it is still possible to make timer timeout value arbitrary small.
For instance: 1) ptimer_set_period(t, 10000) 2) ptimer_set_limit(t, 1, 0) 3) ptimer_set_period(t, 1) <-- bypass limit correction
Fix all of the above issues by adjusting timer period instead of the limit. Perform the adjustment for periodic timer only. Use the delta value instead of the limit to make decision whether adjustment is required, as limit could be altered while timer is running, resulting in incorrect value returned by ptimer_get_count.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: cd141f74f5737480ec586b9c7d18cce1d69884e2.1464367869.git.digetx@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| a62c8911 | 13-Jul-2015 |
Andreas Färber <afaerber@suse.de> |
qdev: Start disentangling bus from device
Move bus type and related APIs to a separate file bus.c. This is a first step in breaking up qdev.c into more manageable chunks.
Reviewed-by: Peter Maydell
qdev: Start disentangling bus from device
Move bus type and related APIs to a separate file bus.c. This is a first step in breaking up qdev.c into more manageable chunks.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [AF: Rebased onto osdep.h] Signed-off-by: Andreas Färber <afaerber@suse.de> [PMM: added bus.o to link line for test-qdev-global-props] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| f7e981f2 | 20-May-2016 |
Bandan Das <bsd@redhat.com> |
nmi: remove x86 specific nmi handling
nmi_monitor_handle is wired to call the x86 nmi handler. So, we can directly use it at call sites.
Signed-off-by: Bandan Das <bsd@redhat.com> Message-Id: <1463
nmi: remove x86 specific nmi handling
nmi_monitor_handle is wired to call the x86 nmi handler. So, we can directly use it at call sites.
Signed-off-by: Bandan Das <bsd@redhat.com> Message-Id: <1463761717-26558-3-git-send-email-bsd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| bacc344c | 28-Jan-2016 |
Igor Mammedov <imammedo@redhat.com> |
machine: add properties to compat_props incrementaly
Switch to adding compat properties incrementaly instead of completly overwriting compat_props per machine type. That removes data duplication whi
machine: add properties to compat_props incrementaly
Switch to adding compat properties incrementaly instead of completly overwriting compat_props per machine type. That removes data duplication which we have due to nested [PC|SPAPR]_COMPAT_* macros.
It also allows to set default device properties from default foo_machine_options() hook, which will be used in following patch for putting VMGENID device as a function if ISA bridge on pc/q35 machines.
Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> [ehabkost: Fixed CCW_COMPAT_* and PC_COMPAT_0_* defines] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| cfc58cf3 | 19-Apr-2016 |
Eduardo Habkost <ehabkost@redhat.com> |
vl: Replace DT_NOGRAPHIC with machine option
All DisplayType values are just UI options that don't affect any hardware emulation code, except for DT_NOGRAPHIC. Replace DT_NOGRAPHIC with DT_NONE plus
vl: Replace DT_NOGRAPHIC with machine option
All DisplayType values are just UI options that don't affect any hardware emulation code, except for DT_NOGRAPHIC. Replace DT_NOGRAPHIC with DT_NONE plus a new "-machine graphics=on|off" option, so hardware emulation code don't need to use the display_type variable.
Cc: Michael Walle <michael@walle.cc> Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| 89a80e74 | 16-Mar-2016 |
Paolo Bonzini <pbonzini@redhat.com> |
hw: remove pio_addr_t
pio_addr_t is almost unused, because these days I/O ports are simply accessed through the address space. cpu_{in,out}[bwl] themselves are almost unused; monitor.c and xen-hvm.
hw: remove pio_addr_t
pio_addr_t is almost unused, because these days I/O ports are simply accessed through the address space. cpu_{in,out}[bwl] themselves are almost unused; monitor.c and xen-hvm.c could use address_space_read/write directly, since they have an integer size at hand. This leaves qtest as the only user of those functions.
On the other hand even portio_* functions use this type; the only interesting use of pio_addr_t thus is include/hw/sysbus.h. I guess I could move it there, but I don't see much benefit in that either. Using uint32_t is enough and avoids the need to include ioport.h everywhere.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 33c11879 | 15-Mar-2016 |
Paolo Bonzini <pbonzini@redhat.com> |
qemu-common: push cpu.h inclusion out of qemu-common.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
| bdd90227 | 15-Mar-2016 |
Paolo Bonzini <pbonzini@redhat.com> |
include: poison symbols in osdep.h
Ensure that all target-independent files ignore poisoned symbols, and fix the fallout.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
| ed2f3bc1 | 24-Feb-2016 |
Cao jin <caoj.fnst@cn.fujitsu.com> |
loader: fix potential memory leak
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> |