- May 30, 2017
-
-
Stefan Hajnoczi authored
# gpg: Signature made Fri 26 May 2017 08:22:27 PM BST # gpg: using RSA key 0xBDBE7B27C0DE3057 # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>" # gpg: aka "Jeffrey Cody <jeff@codyprime.org>" # gpg: aka "Jeffrey Cody <codyprime@gmail.com>" # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98 D624 BDBE 7B27 C0DE 3057 * jtc/tags/block-pull-request: block/gluster: glfs_lseek() workaround blockjob: use deferred_to_main_loop to indicate the coroutine has ended blockjob: reorganize block_job_completed_txn_abort blockjob: strengthen a bit test-blockjob-txn blockjob: group BlockJob transaction functions together blockjob: introduce block_job_cancel_async, check iostatus invariants blockjob: move iostatus reset inside block_job_user_resume blockjob: separate monitor and blockjob APIs blockjob: introduce block_job_pause/resume_all blockjob: introduce block_job_early_fail blockjob: remove iostatus_reset callback blockjob: remove unnecessary check Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
ppc patch queue 2017-05-25 Assorted accumulated patches. These are nearly all bugfixes at one level or another - some for longstanding problems, others for some regressions caused by more recent cleanups. This includes preliminary patches towards fixing migration for Radix Page Table guests under POWER9 and also fixing some migration regressions due to the re-organization of the interrupt controller code. Not all the pieces are there yet, so those still won't quite work, but the preliminary changes make sense on their own. # gpg: Signature made Thu 25 May 2017 04:50:00 AM BST # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * dgibson/tags/ppc-for-2.10-20170525: xics: add unrealize handler hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release hw/ppc: migrating the DRC state of hotplugged devices hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState spapr: add pre_plug function for memory pseries: Restore support for total vcpus not a multiple of threads-per-core for old machine types pseries: Split CAS PVR negotiation out into a separate function spapr: fix error reporting in xics_system_init() spapr_cpu_core: drop reference on ICP object during CPU realization hw/ppc/spapr_events.c: removing 'exception' from sPAPREventLogEntry spapr: ensure core_slot isn't NULL in spapr_core_unplug() xics_kvm: cache already enabled vCPU ids spapr: Consolidate HPT freeing code into a routine spapr-cpu-core: release ICP object when realization fails spapr: sanitize error handling in spapr_ics_create() ppc/xics: simplify prototype of xics_spapr_init() target/ppc: reset reservation in do_rfi() Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
QAPI patches for 2017-05-23 # gpg: Signature made Tue 23 May 2017 12:33:32 PM BST # gpg: using RSA key 0x3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * armbru/tags/pull-qapi-2017-05-23: qapi-schema: Remove obsolete note from ObjectTypeInfo block: Use QDict helpers for --force-share shutdown: Expose bool cause in SHUTDOWN and RESET events shutdown: Add source information to SHUTDOWN and RESET shutdown: Preserve shutdown cause through replay shutdown: Prepare for use of an enum in reset/shutdown_request shutdown: Simplify shutdown_signal sockets: Plug memory leak in socket_address_flatten() scripts/qmp/qom-set: fix the value argument passed to srv.command() Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
Silence "make check" warnings on NUMA test # gpg: Signature made Tue 23 May 2017 11:44:24 AM BST # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * ehabkost/tags/numa-pull-request: numa: Silence incomplete mapping warning under qtest Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- May 25, 2017
-
-
Greg Kurz authored
Now that ICPState objects get finalized on CPU unplug, we should unregister reset handlers as well to avoid a QEMU crash at machine reset time. Signed-off-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Daniel Henrique Barboza authored
When a LMB hot unplug starts, the current DRC LMB status is stored at spapr->pending_dimm_unplugs QTAILQ. This queue isn't migrated, thus if a migration occurs in the middle of a LMB unplug the spapr_lmb_release callback will lost track of the LMB unplug progress. This patch implements a new recover function spapr_recover_pending_dimm_state that is used inside spapr_lmb_release to recover this DRC LMB release status that is lost during the migration. Signed-off-by:
Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> [dwg: Minor stylistic changes, simplify error handling] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Daniel Henrique Barboza authored
In pseries, a firmware abstraction called Dynamic Reconfiguration Connector (DRC) is used to assign a particular dynamic resource to the guest and provide an interface to manage configuration/removal of the resource associated with it. In other words, DRC is the 'plugged state' of a device. Before this patch, DRC wasn't being migrated. This causes post-migration problems due to DRC state mismatch between source and target. The DRC state of a device X in the source might change, while in the target the DRC state of X is still fresh. When migrating the guest, X will not have the same hotplugged state as it did in the source. This means that we can't hot unplug X in the target after migration is completed because its DRC state is not consistent. https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1677552 is one bug that is caused by this DRC state mismatch between source and target. To migrate the DRC state, we defined the VMStateDescription struct for spapr_drc to enable the transmission of spapr_drc state in migration. Not all the elements in the DRC state are migrated - only those that can be modified by guest actions or device add/remove operations: - 'isolation_state', 'allocation_state' and 'indicator_state' are involved in the DR state transition diagram from PAPR+ 2.7, 13.4; - 'configured', 'signalled', 'awaiting_release' and 'awaiting_allocation' are needed in attaching and detaching devices; - 'indicator_state' provides users with hardware state information. These are the DRC elements that are migrated. In this patch the DRC state is migrated for PCI, LMB and CPU connector types. At this moment there is no support to migrate DRC for the PHB (PCI Host Bridge) type. In the 'realize' function the DRC is registered using vmstate_register, similar to what hw/ppc/spapr_iommu.c does in 'spapr_tce_table_realize'. This approach works because DRCs are bus-less and do not sit on a BusClass that implements bc->get_dev_path, so as a fallback the VMSD gets identified via "spapr_drc"/get_index(drc). Signed-off-by:
Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Daniel Henrique Barboza authored
The pointer drc->detach_cb is being used as a way of informing the detach() function inside spapr_drc.c which cb to execute. This information can also be retrieved simply by checking drc->type and choosing the right callback based on it. In this context, detach_cb is redundant information that must be managed. After the previous spapr_lmb_release change, no detach_cb_opaques are being used by any of the three callbacks functions. This is yet another information that is now unused and, on top of that, can't be migrated either. This patch makes the following changes: - removal of detach_cb_opaque. the 'opaque' argument was removed from the callbacks and from the detach() function of sPAPRConnectorClass. The attribute detach_cb_opaque of sPAPRConnector was removed. - removal of detach_cb from the detach() call. The function pointer detach_cb of sPAPRConnector was removed. detach() now uses a switch(drc->type) to execute the apropriate callback. To achieve this, spapr_core_release, spapr_lmb_release and spapr_phb_remove_pci_device_cb callbacks were made public to be visible inside detach(). Signed-off-by:
Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
The LMB DRC release callback, spapr_lmb_release(), uses an opaque parameter, a sPAPRDIMMState struct that stores the current LMBs that are allocated to a DIMM (nr_lmbs). After each call to this callback, the nr_lmbs is decremented by one and, when it reaches zero, the callback proceeds with the qdev calls to hot unplug the LMB. Using drc->detach_cb_opaque is problematic because it can't be migrated in the future DRC migration work. This patch makes the following changes to eliminate the usage of this opaque callback inside spapr_lmb_release: - sPAPRDIMMState was moved from spapr.c and added to spapr.h. A new attribute called 'addr' was added to it. This is used as an unique identifier to associate a sPAPRDIMMState to a PCDIMM element. - sPAPRMachineState now hosts a new QTAILQ called 'pending_dimm_unplugs'. This queue of sPAPRDIMMState elements will store the DIMM state of DIMMs that are currently going under an unplug process. - spapr_lmb_release() will now retrieve the nr_lmbs value by getting the correspondent sPAPRDIMMState. A helper function called spapr_dimm_get_address was created to fetch the address of a PCDIMM device inside spapr_lmb_release. When nr_lmbs reaches zero and the callback proceeds with the qdev hot unplug calls, the sPAPRDIMMState struct is removed from spapr->pending_dimm_unplugs. After these changes, the opaque argument for spapr_lmb_release is now unused and is passed as NULL inside spapr_del_lmbs. This and the other opaque arguments can now be safely removed from the code. As an additional cleanup made by this patch, the spapr_del_lmbs function was merged with spapr_memory_unplug_request. The former was being called only by the latter and both were small enough to fit one single function. Signed-off-by:
Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> [dwg: Minor stylistic cleanups] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- May 24, 2017
-
-
Jeff Cody authored
On current released versions of glusterfs, glfs_lseek() will sometimes return invalid values for SEEK_DATA or SEEK_HOLE. For SEEK_DATA and SEEK_HOLE, the returned value should be >= the passed offset, or < 0 in the case of error: LSEEK(2): off_t lseek(int fd, off_t offset, int whence); [...] SEEK_HOLE Adjust the file offset to the next hole in the file greater than or equal to offset. If offset points into the middle of a hole, then the file offset is set to offset. If there is no hole past offset, then the file offset is adjusted to the end of the file (i.e., there is an implicit hole at the end of any file). [...] RETURN VALUE Upon successful completion, lseek() returns the resulting offset location as measured in bytes from the beginning of the file. On error, the value (off_t) -1 is returned and errno is set to indicate the error However, occasionally glfs_lseek() for SEEK_HOLE/DATA will return a value less than the passed offset, yet greater than zero. For instance, here are example values observed from this call: offs = glfs_lseek(s->fd, start, SEEK_HOLE); if (offs < 0) { return -errno; /* D1 and (H3 or H4) */ } start == 7608336384 offs == 7607877632 This causes QEMU to abort on the assert test. When this value is returned, errno is also 0. This is a reported and known bug to glusterfs: https://bugzilla.redhat.com/show_bug.cgi?id=1425293 Although this is being fixed in gluster, we still should work around it in QEMU, given that multiple released versions of gluster behave this way. This patch treats the return case of (offs < start) the same as if an error value other than ENXIO is returned; we will assume we learned nothing, and there are no holes in the file. Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Niels de Vos <ndevos@redhat.com> Message-id: 87c0140e9407c08f6e74b04131b610f2e27c014c.1495560397.git.jcody@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
All block jobs are using block_job_defer_to_main_loop as the final step just before the coroutine terminates. At this point, block_job_enter should do nothing, but currently it restarts the freed coroutine. Now, the job->co states should probably be changed to an enum (e.g. BEFORE_START, STARTED, YIELDED, COMPLETED) subsuming block_job_started, job->deferred_to_main_loop and job->busy. For now, this patch eliminates the problematic reenter by removing the reset of job->deferred_to_main_loop (which served no purpose, as far as I could see) and checking the flag in block_job_enter. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20170508141310.8674-12-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
This splits the part that touches job states from the part that invokes callbacks. It will make the code simpler to understand once job states will be protected by a different mutex than the AioContext lock. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20170508141310.8674-11-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
Unlike test-blockjob-txn, QMP releases the reference to the transaction before the jobs finish. Thus, qemu-iotest 124 showed a failure while working on the next patch that the unit tests did not have. Make the test a little nastier. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20170508141310.8674-10-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
Yet another pure code movement patch, preparing for the next change. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20170508141310.8674-9-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
The new functions helps respecting the invariant that the coroutine is entered with false user_resume, zero pause count and no error recorded in the iostatus. Resetting the iostatus is now common to all of block_job_cancel_async, block_job_user_resume and block_job_iostatus_reset, albeit with slight differences: - block_job_cancel_async resets the iostatus, and resumes the job if there was an error, but the coroutine is not restarted immediately. For example the caller may continue with a call to block_job_finish_sync. - block_job_user_resume resets the iostatus. It wants to resume the job unconditionally, even if there was no error. - block_job_iostatus_reset doesn't resume the job at all. Maybe that's a bug but it should be fixed separately. block_job_iostatus_reset does the least common denominator, so add some checking but otherwise leave it as the entry point for resetting the iostatus. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20170508141310.8674-8-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
Outside blockjob.c, the block_job_iostatus_reset function is used once in the monitor and once in BlockBackend. When we introduce the block job mutex, block_job_iostatus_reset's client is going to be the block layer (for which blockjob.c will take the block job mutex) rather than the monitor (which will take the block job mutex by itself). The monitor's call to block_job_iostatus_reset from the monitor comes just before the sole call to block_job_user_resume, so reset the iostatus directly from block_job_iostatus_reset. This will avoid the need to introduce separate block_job_iostatus_reset and block_job_iostatus_reset_locked APIs. After making this change, move the function together with the others that were moved in the previous patch. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Message-id: 20170508141310.8674-7-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
We have two different headers for block job operations, blockjob.h and blockjob_int.h. The former contains APIs called by the monitor, the latter contains APIs called by the block job drivers and the block layer itself. Keep the two APIs separate in the blockjob.c file too. This will be useful when transitioning away from the AioContext lock, because there will be locking policies for the two categories, too---the monitor will have to call new block_job_lock/unlock APIs, while blockjob APIs will take care of this for the users. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20170508141310.8674-6-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
Remove use of block_job_pause/resume from outside blockjob.c, thus making them static. The new functions are used by the block layer, so place them in blockjob_int.h. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Message-id: 20170508141310.8674-5-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
Outside blockjob.c, block_job_unref is only used when a block job fails to start, and block_job_ref is not used at all. The reference counting thus is pretty well hidden. Introduce a separate function to be used by block jobs; because block_job_ref and block_job_unref now become static, move them earlier in blockjob.c. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Message-id: 20170508141310.8674-4-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
This is unused since commit 66a0fae4 ("blockjob: Don't touch BDS iostatus", 2016-05-19). Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Message-id: 20170508141310.8674-3-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Paolo Bonzini authored
!job is always checked prior to the call, drop it from here. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Message-id: 20170508141310.8674-2-pbonzini@redhat.com Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Stefan Hajnoczi authored
s390x updates: - support for vfio-ccw to passthrough channel devices - allow ccw bios to boot from scsi generic devices - bugfix for initial reset # gpg: Signature made Tue 23 May 2017 12:02:24 PM BST # gpg: using RSA key 0xDECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" # gpg: aka "Cornelia Huck <cohuck@kernel.org>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * cohuck/tags/s390x-20170523: (21 commits) s390/kvm: do not reset riccb on initial cpu reset MAINTAINERS: Add vfio-ccw maintainer vfio/ccw: update sense data if a unit check is pending s390x/css: ccw translation infrastructure s390x/css: introduce and realize ccw-request callback vfio/ccw: get irqs info and set the eventfd fd vfio/ccw: get io region info vfio/ccw: vfio based subchannel passthrough driver s390x/css: device support for s390-ccw passthrough s390x/css: realize css_create_sch s390x/css: realize css_sch_build_schib s390x/css: add s390-squash-mcss machine option linux-headers: update pc-bios/s390-ccw.img: rebuild image pc-bios/s390-ccw: Build a reasonable max_sectors limit pc-bios/s390-ccw: Get Block Limits VPD device data pc-bios/s390-ccw: Get list of supported VPD pages pc-bios/s390-ccw: Refactor scsi_inquiry function pc-bios/s390-ccw: Break up virtio-scsi read into multiples pc-bios/s390-ccw: Move SCSI block factor to outer read ... Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Laurent Vivier authored
This allows to manage errors before the memory has started to be hotplugged. We already have the function for the CPU cores. Signed-off-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Greg Kurz <groug@kaod.org> [dwg: Fixed a couple of style nits] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
As of pseries-2.7 and later, we require the total number of guest vcpus to be a multiple of the threads-per-core. pseries-2.6 and earlier machine types, however, are supposed to allow this for the sake of migration from old qemu versions which allowed this. Unfortunately, 8149e299 "pseries: Enforce homogeneous threads-per-core" broke this by not considering the old machine type case. This fixes it by only applying the check when the machine type supports hotpluggable cpus. By not-entirely-coincidence, that corresponds to the same time when we started enforcing total threads being a multiple of threads-per-core. Fixes: 8149e299 Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Greg Kurz <groug@kaod.org> Tested-by:
Greg Kurz <groug@kaod.org>
-
David Gibson authored
Guests of the qemu machine type go through a feature negotiation process known as "client architecture support" (CAS) during early boot. This does a number of things, one of which is finding a CPU compatibility mode which can be supported by both guest and host. In fact the CPU negotiation is probably the single most complex part of the CAS process, so this splits it out into a helper function. We've recently made some mistakes in maintaining backward compatibility for old machine types here. Splitting this out will also make it easier to fix this. This also adds a possibly useful error message if the negotiation fails (i.e. if there isn't a CPU mode that's suitable for both guest and host). Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Greg Kurz <groug@kaod.org>
-
Greg Kurz authored
If the user explicitely asked for kernel-irqchip support and "xics-kvm" initialization fails, we shouldn't fallback to emulated "xics" as we do now. It is also awkward to print an error message when we have an errp pointer argument. Let's use the errp argument to report the error and let the caller decide. This simplifies the code as we don't need a local Error * here. Signed-off-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
When a piece of code allocates an object, it implicitely gets a reference on it. If it then makes that object a child property of another object, it should drop its own reference at some point otherwise the child object can never be finalized. The current code hence leaks one ICP object per CPU when hot-removing a core. Failing to add a newly allocated ICP object to the CPU is a bug. While here, let's ensure QEMU aborts if this ever happens. Signed-off-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Daniel Henrique Barboza authored
Currenty we do not have any RTAS event that is reported by the event-scan interface. The existing events, RTAS_LOG_TYPE_EPOW and RTAS_LOG_TYPE_HOTPLUG, are being reported by the check-exception interface and, as such, marked as 'exception=true'. Commit 79853e18, 'spapr_events: event-scan RTAS interface', added the event_scan interface because the guest kernel requires it to initialize other required interfaces. It is acting since then as a stub because no events that would be reported by it were added since then. However, the existence of the 'exception' boolean adds an unnecessary load in the future migration of the pending_events, sPAPREventLogEntry QTAILQ that hosts the pending RTAS events. To make the code cleaner and ease the future migration changes, this patch makes the following changes: - remove the 'exception' boolean that filter these events. There is nothing to filter since all events are reported by check-exception; - functions rtas_event_log_queue, rtas_event_log_dequeue and rtas_event_log_contains don't receive the 'exception' boolean as parameter; - event_scan function was simplified. It was calling 'rtas_event_log_dequeue(mask, false)' that was always returning 'NULL' because we have no events that are created with exception=false, thus in the end it would execute a jump to 'out_no_events' all the time. The function now assumes that this will always be the case and all the remaining logic were deleted. In the future, when or if we add new RTAS events that should be reported with the event_scan interface, we can refer to the changes made in this patch to add the event_scan logic back. Signed-off-by:
Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
If we go that far on the path of hot-removing a core and we find out that the core-id is invalid, then we have a serious bug. Let's make it explicit with an assert() instead of dereferencing a NULL pointer. This fixes Coverity issue CID 1375404. Signed-off-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
Since commit a45863bd ("xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled"), we were able to re-hotplug a vCPU that had been hot- unplugged ealier, thanks to a boolean flag in ICPState that we set when enabling KVM_CAP_IRQ_XICS. This could work because the lifecycle of all ICPState objects was the same as the machine. Commit 5bc8d26d ("spapr: allocate the ICPState object from under sPAPRCPUCore") broke this assumption and now we always pass a freshly allocated ICPState object (ie, with the flag unset) to icp_kvm_cpu_setup(). This cause re-hotplug to fail with: Unable to connect CPU8 to kernel XICS: Device or resource busy Let's fix this by caching all the vCPU ids for which KVM_CAP_IRQ_XICS was enabled. This also drops the now useless boolean flag from ICPState. Reported-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Greg Kurz <groug@kaod.org> Tested-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bharata B Rao authored
Consolidate the code that frees HPT into a separate routine spapr_free_hpt() as the same chunk of code is called from two places. Signed-off-by:
Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
While here we introduce a single error path to avoid code duplication. Signed-off-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
The spapr_ics_create() function handles errors in a rather convoluted way, with two local Error * variables. Moreover, failing to parent the ICS object to the machine should be considered as a bug but it is currently ignored. This patch addresses both issues. Signed-off-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
This function only does hypercall and RTAS-call registration, and thus never returns an error. This patch adapt the prototype to reflect that. Signed-off-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Nikunj A Dadhania authored
For transitioning back to userspace after the interrupt. Suggested-by:
Richard Henderson <rth@twiddle.net> Signed-off-by:
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- May 23, 2017
-
-
Stefan Hajnoczi authored
# gpg: Signature made Tue 23 May 2017 03:27:37 AM BST # gpg: using RSA key 0xEF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * jasowang/tags/net-pull-request: e1000e: Fix ICR "Other" causes clear logic net/filter-rewriter: Remove unused option in filter-rewriter net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle net/filter-mirror.c: Remove duplicate check code. hmp / net: Mark host_net_add/remove as deprecated COLO-compare: Improve tcp compare trace event readability virtio-net: fix wild pointer when remove virtio-net queues net/dump: Issue a warning for the deprecated "-net dump" net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Eduardo Habkost authored
The "This command is experimental" note in ObjectTypeInfo is obsolete since 2012. Commit 51920820 removed the warning from the qom-list-types command documentation, but we forgot to remove the warning from ObjectTypeInfo. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170516205351.12101-1-ehabkost@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Eric Blake authored
Fam's addition of --force-share in commits 459571f7 and 335e9937 were developed prior to the addition of QDict scalar insertion macros, but merged after the general cleanup in commit 46f5ac20. Patch created mechanically by rerunning: spatch --sp-file scripts/coccinelle/qobject.cocci \ --macro-file scripts/cocci-macro-file.h --dir . --in-place Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <20170515195439.17677-1-eblake@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Eric Blake authored
Libvirt would like to be able to distinguish between a SHUTDOWN event triggered solely by guest request and one triggered by a SIGTERM or other action on the host. While qemu_kill_report() was already able to give different output to stderr based on whether a shutdown was triggered by a host signal (but NOT by a host UI event, such as clicking the X on the window), that information was then lost to management. The previous patches improved things to use an enum throughout all callsites, so now we have something ready to expose through QMP. Note that for now, the decision was to expose ONLY a boolean, rather than promoting ShutdownCause to a QAPI enum; this is because libvirt has not expressed an interest in anything finer-grained. We can still add additional details, in a backwards-compatible manner, if a need later arises (if the addition happens before 2.10, we can replace the bool with an enum; otherwise, the enum will have to be in addition to the bool); this patch merely adds a helper shutdown_caused_by_guest() to map the internal enum into the external boolean. Update expected iotest outputs to match the new data (complete coverage of the affected tests is obtained by -raw, -qcow2, and -nbd). Here is output from 'virsh qemu-monitor-event --loop' with the patch installed: event SHUTDOWN at 1492639680.731251 for domain fedora_13: {"guest":true} event STOP at 1492639680.732116 for domain fedora_13: <null> event SHUTDOWN at 1492639680.732830 for domain fedora_13: {"guest":false} Note that libvirt runs qemu with -no-shutdown: the first SHUTDOWN event was triggered by an action I took directly in the guest (shutdown -h), at which point qemu stops the vcpus and waits for libvirt to do any final cleanups; the second SHUTDOWN event is the result of libvirt sending SIGTERM now that it has completed cleanup. Libvirt is already smart enough to only feed the first qemu SHUTDOWN event to the end user (remember, virsh qemu-monitor-event is a low-level debugging interface that is explicitly unsupported by libvirt, so it sees things that normal end users do not); changing qemu to emit SHUTDOWN only once is outside the scope of this series. See also https://bugzilla.redhat.com/1384007 Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <20170515214114.15442-6-eblake@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Eric Blake authored
Time to wire up all the call sites that request a shutdown or reset to use the enum added in the previous patch. It would have been less churn to keep the common case with no arguments as meaning guest-triggered, and only modified the host-triggered code paths, via a wrapper function, but then we'd still have to audit that I didn't miss any host-triggered spots; changing the signature forces us to double-check that I correctly categorized all callers. Since command line options can change whether a guest reset request causes an actual reset vs. a shutdown, it's easy to also add the information to reset requests. Signed-off-by:
Eric Blake <eblake@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts] Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part] Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts] Message-Id: <20170515214114.15442-5-eblake@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-