aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-14s390x/cpumodel: Fix realize() error API violationsMarkus Armbruster
get_max_cpu_model() dereferences @errp when kvm_s390_get_host_cpu_model() fails, apply_cpu_model() dereferences it when kvm_s390_apply_cpu_model() fails, and s390_realize_cpu_model() dereferences it when get_max_cpu_model() or check_compatibility() fail. That's wrong; see the big comment in error.h. All three introduced in commit 80560137cf "s390x/cpumodel: check and apply the CPU model". No caller actually passes null. Fix anyway: splice in a local Error *err, and error_propagate(). Cc: David Hildenbrand <david@redhat.com> Cc: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20191204093625.14836-14-armbru@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x/cpumodel: Fix feature property error API violationsMarkus Armbruster
s390x-cpu property setters set_feature() and set_feature_group() dereference @errp when the visitor fails. That's wrong; see the big comment in error.h. Introduced in commit 0754f60429 "s390x/cpumodel: expose features and feature groups as properties". No caller actually passes null. Fix anyway: splice in a local Error *err, and error_propagate(). Cc: David Hildenbrand <david@redhat.com> Cc: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20191204093625.14836-13-armbru@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x/event-facility: Fix realize() error API violationsMarkus Armbruster
sclp_events_bus_realize() dereferences @errp when object_property_set_bool() fails. That's wrong; see the big comment in error.h. Introduced in commit f6102c329c "s390/sclp: rework sclp event facility initialization + device realization". No caller actually passes null. Fix anyway: splice in a local Error *err, and error_propagate(). Cc: David Hildenbrand <david@redhat.com> Cc: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20191204093625.14836-12-armbru@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x: Fix cpu normal reset ri clearingJanosch Frank
As it turns out we need to clear the ri controls and PSW enablement bit to be architecture compliant. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20191203132813.2734-4-frankja@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x: kvm: Make kvm_sclp_service_call voidJanosch Frank
It defaults to returning 0 anyway and that return value is not necessary, as 0 is also the default rc that the caller would return. While doing that we can simplify the logic a bit and return early if we inject a PGM exception. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20191129091713.4582-1-frankja@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x: Beautify diag308 handlingJanosch Frank
Let's improve readability by: * Using constants for the subcodes * Moving parameter checking into a function * Removing subcode > 6 check as the default case catches that Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20191127175046.4911-6-frankja@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x: Move clear resetJanosch Frank
Let's also move the clear reset function into the reset handler. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Message-Id: <20191127175046.4911-5-frankja@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x: Move initial resetJanosch Frank
Let's move the intial reset into the reset handler and cleanup afterwards. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20191128083723.11937-1-frankja@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x: Move reset normal to shared reset handlerJanosch Frank
Let's start moving the cpu reset functions into a single function with a switch/case, so we can later use fallthroughs and share more code between resets. This patch introduces the reset function by renaming cpu_reset(). Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20191127175046.4911-3-frankja@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14s390x: Don't do a normal reset on the initial cpuJanosch Frank
The initiating cpu needs to be reset with an initial reset. While doing a normal reset followed by a initial reset is not wrong per se, the Ultravisor will only allow the correct reset to be performed. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20191127175046.4911-2-frankja@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-14hw: add compat machines for 5.0Cornelia Huck
Add 5.0 machine types for arm/i440fx/q35/s390x/spapr. For i440fx and q35, unversioned cpu models are still translated to -v1; I'll leave changing this (if desired) to the respective maintainers. Signed-off-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20191112104811.30323-1-cohuck@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
2019-12-14vfio-ccw: Fix error messageBoris Fiuczynski
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Message-Id: <20191128143015.5231-1-fiuczy@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-12-13Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell
staging Pull request # gpg: Signature made Fri 13 Dec 2019 14:32:11 GMT # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: iothread: document -object iothread on man page virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-13Merge remote-tracking branch 'remotes/dgilbert/tags/pull-virtiofs-20191213a' ↵Peter Maydell
into staging virtiofs pull 2019-12-13: Minor fixes and cleanups Cleanup from Marc-André and MSI-X fix from Stefan. # gpg: Signature made Fri 13 Dec 2019 11:53:49 GMT # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-virtiofs-20191213a: virtio-fs: fix MSI-X nvectors calculation vhost-user-fs: remove "vhostfd" property Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-13Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2019-12-12' into ↵Peter Maydell
staging - conversion of virtfs-proxy-helper from libcap to libcap-ng - removal of libcap-dev from docker, travis and gitlab CI - removal of deprecate "-virtfs_synth" option # gpg: Signature made Thu 12 Dec 2019 19:55:53 GMT # gpg: using RSA key B4828BAF943140CEF2A3491071D4D5E5822F73D6 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" [full] # gpg: aka "Gregory Kurz <gregory.kurz@free.fr>" [full] # gpg: aka "[jpeg image of size 3330]" [full] # Primary key fingerprint: B482 8BAF 9431 40CE F2A3 4910 71D4 D5E5 822F 73D6 * remotes/gkurz/tags/9p-next-2019-12-12: virtfs: Remove the deprecated "-virtfs_synth" option travis.yml: Drop libcap-dev ci: Use libcap-ng docker: remove libcap development packages virtfs-proxy-helper: switch from libcap to libcap-ng Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-13Open 5.0 development treePeter Maydell
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-13iothread: document -object iothread on man pageStefan Hajnoczi
Add -object iothread documentation to the man page, including references to the query-iothread QMP command and qom-set syntax for adjusting adaptive polling parameters at run-time. Reported-by: Zhenyu Ye <yezhenyu2@huawei.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20191025122236.29815-1-stefanha@redhat.com Message-Id: <20191025122236.29815-1-stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-12-13virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertisedEvgeny Yakovlev
Virtio spec 1.1 (and earlier), 5.2.5.2 Driver Requirements: Device Initialization: "Devices SHOULD always offer VIRTIO_BLK_F_FLUSH, and MUST offer it if they offer VIRTIO_BLK_F_CONFIG_WCE" Currently F_CONFIG_WCE and F_WCE are not connected to each other. Qemu will advertise F_CONFIG_WCE if config-wce argument is set for virtio-blk device. And F_WCE is advertised only if underlying block backend actually has it's caching enabled. Fix this by advertising F_WCE if F_CONFIG_WCE is also advertised. To preserve backwards compatibility with newer machine types make this behaviour governed by "x-enable-wce-if-config-wce" virtio-blk-device property and introduce hw_compat_4_2 with new property being off by default for all machine types <= 4.2 (but don't introduce 4.3 machine type itself yet). Signed-off-by: Evgeny Yakovlev <wrfsh@yandex-team.ru> Message-Id: <1572978137-189218-1-git-send-email-wrfsh@yandex-team.ru> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-12-13virtio-fs: fix MSI-X nvectors calculationStefan Hajnoczi
The following MSI-X vectors are required: * VIRTIO Configuration Change * hiprio virtqueue * requests virtqueues Fix the calculation to reserve enough MSI-X vectors. Otherwise guest drivers fall back to a sub-optional configuration where all virtqueues share a single vector. This change does not break live migration compatibility since vhost-user-fs-pci devices are not migratable yet. Reported-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20191209110759.35227-1-stefanha@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-12-13vhost-user-fs: remove "vhostfd" propertyMarc-André Lureau
The property doesn't make much sense for a vhost-user device. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20191116112016.14872-1-marcandre.lureau@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-12-12Update version for v4.2.0 releasev4.2.0Peter Maydell
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-10Update version for v4.2.0-rc5 releasev4.2.0-rc5Peter Maydell
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-09virtfs: Remove the deprecated "-virtfs_synth" optionThomas Huth
It's been marked as deprecated since QEMU v4.1, time to remove it now. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Greg Kurz <groug@kaod.org>
2019-12-09travis.yml: Drop libcap-devGreg Kurz
Commit 7e46261368d1 converted virtfs-proxy-helper to using libcap-ng. There aren't any users of libcap anymore. No need to install libcap-dev. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org>
2019-12-09ci: Use libcap-ngDr. David Alan Gilbert
We currently enable libcap-dev in build-clang to pick up the 9p proxy helper. Paolo's patch changes (commit 7e46261368d1) that to use libcap-ng, so switch to using it. This also means we'll be testing the scsi pr manager and the bridge helper. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> [groug, mention SHA1 that dropped libcap] Signed-off-by: Greg Kurz <groug@kaod.org>
2019-12-09docker: remove libcap development packagesPaolo Bonzini
Libcap was dropped from virtio-9p (commit 7e46261368d1), so remove it from the dockerfiles as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> [groug, mention SHA1 that dropped libcap] Signed-off-by: Greg Kurz <groug@kaod.org>
2019-12-09Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-12-09' into ↵Peter Maydell
staging bitmap fix for 4.2-rc5 - Fix a regression that broke bitmap deletion without a transaction, and causes a crash with transaction (only transaction is new to 4.2), when a qcow2 file contains persistent bitmaps from prior shutdown # gpg: Signature made Mon 09 Dec 2019 15:28:19 GMT # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2019-12-09: block/qcow2-bitmap: fix crash bug in qcow2_co_remove_persistent_dirty_bitmap Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-09block/qcow2-bitmap: fix crash bug in qcow2_co_remove_persistent_dirty_bitmapVladimir Sementsov-Ogievskiy
Here is double bug: First, return error but not set errp. This may lead to: qmp block-dirty-bitmap-remove may report success when actually failed block-dirty-bitmap-remove used in a transaction will crash, as qmp_transaction will think that it returned success and will call block_dirty_bitmap_remove_commit which will crash, as state->bitmap is NULL Second (like in anecdote), this case is not an error at all. As it is documented in the comment above bdrv_co_remove_persistent_dirty_bitmap definition, absence of bitmap is not an error, and similar case handled at start of qcow2_co_remove_persistent_dirty_bitmap, it returns 0 when there is no bitmaps at all. But when there are some bitmaps, but not the requested one, it return error with errp unset. Fix that. Trigger: 1. create persistent bitmap A 2. shutdown vm (bitmap A is synced) 3. start vm 4. create persistent bitmap B 5. remove bitmap B - it fails (and crashes if in transaction) Potential workaround (rather invasive to ask clients to implement it): 1. create persistent bitmap A 2. shutdown vm 3. start vm 4. create persistent bitmap B 5. remember, that we want to remove bitmap B after vm shutdown ... some other operations ... 6. vm shutdown 7. start vm in stopped mode, and remove all bitmaps marked for removing 8. stop vm Fixes: b56a1e31759b750 Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20191205193049.30666-1-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> [eblake: commit message tweaks] Signed-off-by: Eric Blake <eblake@redhat.com>
2019-12-09Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191209' ↵Peter Maydell
into staging ppc patch queue 2019-12-09 This is a last minute pull request for ppc-for-4.2. I know it's very late in freeze, but this does fix a regression: a bad interaction between the new qemu and SLOF device tree construction code means that SLOF will crash if PCI to PCI bridges are included in the system. This PR supersedes ppc-for-4.2-20191206. This one has only a more minimal change to the firmware addressed only at fixing this bug and not incorporating some other unrelated changes that happened in the meantime. # gpg: Signature made Mon 09 Dec 2019 04:52:19 GMT # gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full] # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full] # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full] # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown] # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-4.2-20191209: pseries: Update SLOF firmware image Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-09pseries: Update SLOF firmware imageAlexey Kardashevskiy
This fixes PCI bridge regression. Alexey Kardashevskiy (3): ibm,client-architecture-support: Fix stack handling fdt: Fix updating the tree at H_CAS version: update to 20191209 Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-12-06Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* fix for x86 KVM on older kernels (Yang Zhong) # gpg: Signature made Fri 06 Dec 2019 11:36:08 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # 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: target/i386: disable VMX features if nested=0 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-06target/i386: disable VMX features if nested=0Yang Zhong
If kvm does not support VMX feature by nested=0, the kvm_vmx_basic can't get the right value from MSR_IA32_VMX_BASIC register, which make qemu coredump when qemu do KVM_SET_MSRS. The coredump info: error: failed to set MSR 0x480 to 0x0 kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed. Signed-off-by: Yang Zhong <yang.zhong@intel.com> Message-Id: <20191206071111.12128-1-yang.zhong@intel.com> Reported-by: Catherine Ho <catherine.hecx@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-12-03Update version for v4.2.0-rc4 releasev4.2.0-rc4Peter Maydell
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-03Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* last HVF fix (Cameron) # gpg: Signature made Tue 03 Dec 2019 08:11:51 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # 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: hvf: correctly inject VMCS_INTR_T_HWINTR versus VMCS_INTR_T_SWINTR. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-03hvf: correctly inject VMCS_INTR_T_HWINTR versus VMCS_INTR_T_SWINTR.Cameron Esfahani
Previous implementation in hvf_inject_interrupts() would always inject VMCS_INTR_T_SWINTR even when VMCS_INTR_T_HWINTR was required. Now correctly determine when VMCS_INTR_T_HWINTR is appropriate versus VMCS_INTR_T_SWINTR. Make sure to clear ins_len and has_error_code when ins_len isn't valid and error_code isn't set. Signed-off-by: Cameron Esfahani <dirty@apple.com> Message-Id: <bf8d945ea1b423786d7802bbcf769517d1fd01f8.1575330463.git.dirty@apple.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-12-02Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2019-12-02' ↵Peter Maydell
into staging Error reporting patches for 2019-12-02 # gpg: Signature made Mon 02 Dec 2019 15:17:45 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2019-12-02: block/file-posix: Fix laio_init() error handling crash bug net/virtio: Fix failover error handling crash bugs net/virtio: Drop useless n->primary_dev not null checks Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-02block/file-posix: Fix laio_init() error handling crash bugMarkus Armbruster
raw_aio_attach_aio_context() passes uninitialized Error *local_err by reference to laio_init() via aio_setup_linux_aio(). When laio_init() fails, it passes it on to error_setg_errno(), tripping error_setv()'s assertion unless @local_err is null by dumb luck. Fix by initializing @local_err properly. Fixes: ed6e2161715c527330f936d44af4c547f25f687e Cc: Nishanth Aravamudan <naravamudan@digitalocean.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191130194240.10517-4-armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2019-12-02net/virtio: Fix failover error handling crash bugsMarkus Armbruster
Functions that take an Error ** parameter to pass an error to the caller expect the parameter to point to null. failover_replug_primary() violates this precondition in several places: * After qemu_opts_from_qdict() failed, *errp is no longer null. Passing it to error_setg() is wrong, and will trip the assertion in error_setv(). Messed up in commit 150ab54aa6 "net/virtio: fix re-plugging of primary device". Simply drop the error_setg(). * Passing @errp to qemu_opt_set_bool(), hotplug_handler_pre_plug(), and hotplug_handler_plug() is wrong. If one of the first two fails, *errp is no longer null. Risks tripping the same assertion. Moreover, continuing after such errors is unsafe. Messed up in commit 9711cd0dfc "net/virtio: add failover support". Fix by handling each error properly. failover_replug_primary() crashes when passed a null @errp. Also messed up in commit 9711cd0dfc. This bug can't bite as no caller actually passes null. Fix it anyway. Fixes: 9711cd0dfc3fa414f7f64935713c07134ae67971 Fixes: 150ab54aa6934583180f88a2bd540bc6fc4fbff3 Cc: Jens Freimann <jfreimann@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191130194240.10517-3-armbru@redhat.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com>
2019-12-02net/virtio: Drop useless n->primary_dev not null checksMarkus Armbruster
virtio_net_handle_migration_primary() returns early when it can't ensure n->primary_dev is non-null. Checking it again right after that early return is redundant. Drop. If n->primary_dev is null on entering failover_replug_primary(), @pdev will become null, and pdev->partially_hotplugged will crash. Checking n->primary_dev later is useless. It can't actually be null, because its caller virtio_net_handle_migration_primary() ensures it isn't. Drop the useless check. Cc: Jens Freimann <jfreimann@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191130194240.10517-2-armbru@redhat.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com>
2019-12-02virtfs-proxy-helper: switch from libcap to libcap-ngPaolo Bonzini
virtfs-proxy-helper is the only user of libcap; everyone else is using the simpler libcap-ng API. Switch and remove the configure code to detect libcap. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> [groug: - drop remaining -lcap from Makefile - fix error message in configure] Signed-off-by: Greg Kurz <groug@kaod.org>
2019-11-29.travis.yml: drop xcode9.4 from build matrixAlex Bennée
It's broken so it's no longer helping. The latest Xcode is covered by Cirrus. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191127132430.3681-1-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-29Merge remote-tracking branch ↵Peter Maydell
'remotes/huth-gitlab/tags/pull-request-2019-11-29' into staging A fix for regression in the s390-ccw bios # gpg: Signature made Fri 29 Nov 2019 09:26:51 GMT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2019-11-29: pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch pc-bios/s390-ccw: fix sclp_get_loadparm_ascii Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-29pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patchThomas Huth
This fixes various boot scenarios, e.g. the possibility to use "-boot menu=on". Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-11-29pc-bios/s390-ccw: fix sclp_get_loadparm_asciiClaudio Imbrenda
The existing s390 bios gets the LOADPARM information from the system using an SCLP call that specifies a buffer length too small to contain all the output. The recent fixes in the SCLP code have exposed this bug, since now the SCLP call will return an error (as per architecture) instead of writing partially and completing successfully. The solution is simply to specify the full page length as the SCCB length instead of a smaller size. Fixes: 832be0d8a3bb ("s390x: sclp: Report insufficient SCCB length") Fixes: 9a22473c70f3 ("pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info") Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <1574944437-31182-1-git-send-email-imbrenda@linux.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Tested-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-11-26Update version for v4.2.0-rc3 releasev4.2.0-rc3Peter Maydell
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26Merge remote-tracking branch ↵Peter Maydell
'remotes/stsquad/tags/pull-rc3-testing-261119-1' into staging A few vm-test updates - use Ubuntu 18.04 for i386 image - python3 for centos and docker - install locales for ubuntu # gpg: Signature made Tue 26 Nov 2019 11:31:26 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-rc3-testing-261119-1: tests/vm/ubuntu: update i386 image to 18.04 tests/vm/ubuntu: include language pack to silence locale warnings tests/vm/centos: fix centos build target Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* VMX feature fix (myself) * HVF fixes (Cameron) # gpg: Signature made Tue 26 Nov 2019 08:58:43 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # 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: hvf: more accurately match SDM when setting CR0 and PDPTE registers hvf: correctly handle REX prefix in relation to legacy prefixes hvf: remove TSC synchronization code because it isn't fully complete hvf: non-RAM, non-ROMD memory ranges are now correctly mapped in target/i386: add two missing VMX features for Skylake and CascadeLake Server Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26Merge remote-tracking branch ↵Peter Maydell
'remotes/pmaydell/tags/pull-target-arm-20191126' into staging target-arm queue: * handle FTYPE flag correctly in v7M exception return for v7M CPUs with an FPU (v8M CPUs were already correct) * versal: Add the CRP as unimplemented * Fix ISR_EL1 tracking when executing at EL2 * Honor HCR_EL2.TID3 trapping requirements # gpg: Signature made Tue 26 Nov 2019 14:11:50 GMT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20191126: target/arm: Honor HCR_EL2.TID3 trapping requirements target/arm: Fix ISR_EL1 tracking when executing at EL2 hw/arm: versal: Add the CRP as unimplemented target/arm: Fix handling of cortex-m FTYPE flag in EXCRET Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-11-26' ↵Peter Maydell
into staging Block patches for 4.2.0-rc3: - Fix for shared storage migration with persistent dirty bitmaps # gpg: Signature made Tue 26 Nov 2019 13:27:32 GMT # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2019-11-26: iotests: add new test cases to bitmap migration block/qcow2-bitmap: fix bitmap migration Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191126' ↵Peter Maydell
into staging ppc patch queue for 2019-11-26 Here's the first 4.2 hard freeze pull request from me. This has: * A fix for some testcases that cause errors on older host kernels (e.g. RHEL7), with our new default configuration of VSMT mode * Changes to make VFIO devices interact properly with change of irq chip caused by PAPR feature negotiation. This is more involved than I would like, but it's a problem in real use cases and I can't see an easier way to handle it. * Fix an error with ms6522 counters for the g3beige machine * Fix a coverity warning # gpg: Signature made Tue 26 Nov 2019 05:52:16 GMT # gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full] # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full] # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full] # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown] # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-4.2-20191126: ppc/spapr_events: fix potential NULL pointer dereference in rtas_event_log_dequeue mos6522: update counters when timer interrupts are off spapr: Work around spurious warnings from vfio INTx initialization spapr: Handle irq backend changes with VFIO PCI devices vfio/pci: Respond to KVM irqchip change notifier vfio/pci: Split vfio_intx_update() kvm: Introduce KVM irqchip change notifier pseries: fix migration-test and pxe-test Signed-off-by: Peter Maydell <peter.maydell@linaro.org>