- 26 5月, 2016 24 次提交
-
-
由 Daniel P. Berrange 提交于
The MigrateState struct uses an array for storing migration parameters. This presumes that all future parameters will be integers too, which is not going to be the case. There is no functional reason why an array is used, if anything it makes the code less clear. The QAPI schema already defines a struct - MigrationParameters - capable of storing all the individual parameters, so just use that instead of an array. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-25-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Now that the memory buffer based QEMUFile impl is gone, there is no need for any backend to be accessing internals of the QEMUFile struct, so it can be moved back into qemu-file.c Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-24-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Now that the exec migration backend and savevm have converted to use the QIOChannel based QEMUFile, there is no user remaining for the stdio based QEMUFile impl and it can be deleted. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-23-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Now that the tcp, unix and fd migration backends have converted to use the QIOChannel based QEMUFile, there is no user remaining for the sockets based QEMUFile impl and it can be deleted. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-22-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Now that we don't have have a buffer based QemuFile implementation, the QEMUSizedBuffer code is also unused and can be deleted. A simpler buffer class also exists in util/buffer.c which other code can used as needed. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-21-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
The qemu_bufopen() method is no longer used, so the memory buffer based QEMUFile backend can be deleted entirely. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-20-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Convert the exec savevm code to use QIOChannel and QEMUFileChannel, instead of the stdio APIs. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-19-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
This converts the RDMA code to provide a subclass of QIOChannel that uses RDMA for the data transport. This implementation of RDMA does not correctly handle non-blocking mode. Reads might block if there was not already some pending data and writes will block until all data is sent. This flawed behaviour was already present in the existing impl, so appears to not be a critical problem at this time. It should be on the list of things to fix in the future though. The RDMA code would be much better off it it could be split up in a generic RDMA layer, a QIOChannel impl based on RMDA, and then the RMDA migration glue. This is left as a future exercise for the brave. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-18-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Convert the exec socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of the stdio popen APIs. It can be unconditionally built because the QIOChannelCommand class can report suitable error messages on platforms which can't fork processes. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-17-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Convert the fd socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built because the QIOChannel APIs it uses will take care to report suitable error messages if needed. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-16-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Drop the current TCP socket migration driver and extend the new generic socket driver to cope with the TCP address format Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-15-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
The unix.c file will be nearly the same as the tcp.c file, only differing in the initial SocketAddress creation code. Rename unix.c to socket.c and refactor it a little to prepare for merging the TCP code. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-14-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Convert the unix socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built, since the socket impl of QIOChannel will report a suitable error on platforms where UNIX sockets are unavailable. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-13-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
The post-copy code does some I/O to/from an intermediate in-memory buffer rather than direct to the underlying I/O channel. Switch this code to use QIOChannelBuffer instead of QEMUSizedBuffer. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-12-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently if an application initiates an outgoing migration, it may or may not, get an error reported back on failure. If the error occurs synchronously to the 'migrate' command execution, the client app will see the error message. This is the case for DNS lookup failures. If the error occurs asynchronously to the monitor command though, the error will be thrown away and the client left guessing about what went wrong. This is the case for failure to connect to the TCP server (eg due to wrong port, or firewall rules, or other similar errors). In the future we'll be adding more scope for errors to happen asynchronously with the TLS protocol handshake. TLS errors are hard to diagnose even when they are well reported, so discarding errors entirely will make it impossible to debug TLS connection problems. Management apps which do migration are already using 'query-migrate' / 'info migrate' to check up on progress of background migration operations and to see their end status. This is a fine place to also include the error message when things go wrong. This patch thus adds an 'error-desc' field to the MigrationInfo struct, which will be populated when the 'status' is set to 'failed': (qemu) migrate -d tcp:localhost:9001 (qemu) info migrate capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off x-postcopy-ram: off Migration status: failed (Error connecting to socket: Connection refused) total time: 0 milliseconds In the HMP, when doing non-detached migration, it is also possible to display this error message directly to the app. (qemu) migrate tcp:localhost:9001 Error connecting to socket: Connection refused Or with QMP { "execute": "query-migrate", "arguments": {} } { "return": { "status": "failed", "error-desc": "address resolution failed for myhost:9000: No address associated with hostname" } } Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-11-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently creating a QEMUFile instance from a QIOChannel is quite simple only requiring a single call to qemu_fopen_channel_input or qemu_fopen_channel_output depending on the end of migration connection. When QEMU gains TLS support, however, there will need to be a TLS negotiation done inbetween creation of the QIOChannel and creation of the final QEMUFile. Introduce some helper methods that will encapsulate this logic, isolating the migration protocol drivers from knowledge about TLS. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Acked-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-10-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Introduce a new QEMUFile implementation that is based on the QIOChannel objects. This impl is different from existing impls in that there is no file descriptor that can be made available, as some channels may be based on higher level protocols such as TLS. Although the QIOChannel based implementation can trivially provide a bi-directional stream, initially we have separate functions for opening input & output directions to fit with the expectation of the current QEMUFile interface. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-9-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Instead of relying on the default QEMUFile I/O blocking flag state, explicitly turn on blocking I/O for outgoing migration since it takes place in a background thread. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-8-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Remove the assumption that every QEMUFile implementation has a file descriptor available by introducing a new function in QEMUFileOps to change the blocking state of a QEMUFile. If not set, it will fallback to the original code using the get_fd method. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-7-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
The QEMUFileOps struct contains the I/O subsystem callbacks and the migration stage hooks. Split the hooks out into a separate QEMUFileHooks struct to make it easier to refactor the I/O side of QEMUFile without affecting the hooks. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-6-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
The QEMUFile writev_buffer / put_buffer functions are expected to write out the full set of requested data, blocking until complete. The qemu_fflush() caller does not expect to deal with partial writes. Clarify the function comments and add a sanity check to the code to catch mistaken implementations. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-5-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
Some of the test-vmstate.c test cases use a temporary file while others use a memory buffer. To facilitate the future removal of the qemu_bufopen() function, convert all the tests to use a temporary file. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-4-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
The QIOChannelBuffer's close implementation will free the internal data buffer. It failed to reset the pointer to NULL though, so when the object is later finalized it will free it a second time with predictable crash. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-3-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Daniel P. Berrange 提交于
The s390 skeys monitor command needs to write out a plain text file. Currently it is using the QEMUFile class for this, but work is ongoing to refactor QEMUFile and eliminate much code related to it. The only feature qemu_fopen() gives over fopen() is support for QEMU FD passing, but this can be achieved with qemu_open() + fdopen() too. Switching to regular stdio FILE APIs avoids the need to sprintf via an intermedia buffer which slightly simplifies the code. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1461751518-12128-2-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
- 24 5月, 2016 16 次提交
-
-
由 Peter Maydell 提交于
X86 queue, 2016-05-23 # gpg: Signature made Mon 23 May 2016 23:48:27 BST using RSA key ID 984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" * remotes/ehabkost/tags/x86-pull-request: target-i386: kvm: Eliminate kvm_msr_entry_set() target-i386: kvm: Simplify MSR setting functions target-i386: kvm: Simplify MSR array construction target-i386: kvm: Increase MSR_BUF_SIZE target-i386: kvm: Allocate kvm_msrs struct once per VCPU target-i386: Call cpu_exec_init() on realize target-i386: Move TCG initialization to realize time target-i386: Move TCG initialization check to tcg_x86_init() cpu: Eliminate cpudef_init(), cpudef_setup() target-i386: Set constant model_id for qemu64/qemu32/athlon pc: Set CPU model-id on compat_props for pc <= 2.4 osdep: Move default qemu_hw_version() value to a macro target-i386: kvm: Use X86XSaveArea struct for xsave save/load target-i386: Use xsave structs for ext_save_area target-i386: Define structs for layout of xsave area Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
migration fixes: - ensure src block devices continue fine after a failed migration - fail on migration blockers; helps 9p savevm/loadvm - move autoconverge commands out of experimental state - move the migration-specific qjson in migration/ # gpg: Signature made Mon 23 May 2016 18:15:09 BST using RSA key ID 657EF670 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" * remotes/amit-migration/tags/migration-2.7-1: migration: regain control of images when migration fails to complete savevm: fail if migration blockers are present migration: Promote improved autoconverge commands out of experimental state migration/qjson: Drop gratuitous use of QOM migration: Move qjson.[ch] to migration/ Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
rng: rename RndRandom to RndRandom # gpg: Signature made Mon 23 May 2016 16:44:58 BST using RSA key ID 657EF670 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" * remotes/amit-virtio-rng/tags/rng-2.7-1: rng-random: rename RndRandom to RngRandom Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
opencores_eth cleanups: - use mii.h - reduce stack usage in open_eth_start_xmit. # gpg: Signature made Mon 23 May 2016 20:14:20 BST using RSA key ID F83FA044 # gpg: Good signature from "Max Filippov <max.filippov@cogentembedded.com>" # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" * remotes/xtensa/tags/20160523-opencores_eth: hw/net/opencores_eth: Allocating Large sized arrays to heap hw/net/opencores_eth: use mii.h Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Eduardo Habkost 提交于
Inline the function inside kvm_msr_entry_add(). Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
Simplify kvm_put_tscdeadline_msr() and kvm_put_msr_feature_control() using kvm_msr_buf and the kvm_msr_entry_add() helper. Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
Add a helper function that appends new entries to the MSR buffer and checks for the buffer size limit. Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
We are dangerously close to the array limits in kvm_put_msrs() and kvm_get_msrs(): with the default mcg_cap configuration, we can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap to be changed, we can write up to 236 MSRs. Use 4096 bytes for the buffer, that can hold 255 kvm_msr_entry structs. Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
Instead of using 2400 bytes in the stack for 150 MSR entries in kvm_get_msrs() and kvm_put_msrs(), allocate a buffer once for each VCPU. Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
QOM instance_init functions are not supposed to have any side-effects, as new objects may be created at any moment for querying property information (see qmp_device_list_properties()). Calling cpu_exec_init() also affects QEMU's ability to handle errors during CPU creation, as some actions done by cpu_exec_init() can't be reverted. Move cpu_exec_init() call to realize so a simple object_new() won't trigger it, and so that it is called after some basic validation of CPU parameters. Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
QOM instance_init functions are not supposed to have any side-effects, as new objects may be created at any moment for querying property information (see qmp_device_list_properties()). Move TCG initialization to realize time so it won't be called when just doing object_new() on a X86CPU subclass. Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
Instead of requiring cpu.c to check if TCG was already initialized, simply let the function be called multiple times. Suggested-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
x86_cpudef_init() doesn't do anything anymore, cpudef_init(), cpudef_setup(), and x86_cpudef_init() can be finally removed. Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
Newer PC machines don't set hw_version, and older machines set model-id on compat_props explicitly, so we don't need the x86_cpudef_setup() code that sets model_id using qemu_hw_version() anymore. Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Zhou Jie 提交于
open_eth_start_xmit has a huge stack usage of 65536 bytes approx. Moving large arrays to heap to reduce stack usage. Reduce size of a buffer allocated on stack to 0x600 bytes, which is the maximal frame length when HUGEN bit is not set in MODER, only allocate buffer on heap when that is too small. Thus heap is not used in typical use case. Signed-off-by: NZhou Jie <zhoujie2011@cn.fujitsu.com> Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
Drop local definitions of MII registers and use constants from mii.h for registers and register bits. No functional changes. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-