- Sep 19, 2017
-
-
Eduardo Habkost authored
The new option can be used to indicate that the file contents can be destroyed and don't need to be flushed to disk when QEMU exits or when the memory backend object is removed. Internally, it will trigger a madvise(MADV_REMOVE) call when the memory backend is removed. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170824192315.5897-4-ehabkost@redhat.com> [ehabkost: fixup: improved documentation] Reviewed-by:
Daniel P. Berrange <berrange@redhat.com> Tested-by:
Zack Cornelius <zack.cornelius@kove.net> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com>
-
- Sep 04, 2017
-
-
Marc-André Lureau authored
Currently, a FOO_lookup is an array of strings terminated by a NULL sentinel. A future patch will generate enums with "holes". NULL-termination will cease to work then. To prepare for that, store the length in the FOO_lookup by wrapping it in a struct and adding a member for the length. The sentinel will be dropped next. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170822132255.23945-13-marcandre.lureau@redhat.com> [Basically redone] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-16-git-send-email-armbru@redhat.com> [Rebased]
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-14-git-send-email-armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
- Sep 01, 2017
-
-
Eduardo Habkost authored
The errp argument is ignored by all implementations of the method, and user_creatable_del() would break if any implementation set an error (because it calls error_setg(errp) if the function returns false). Remove the unused parameter. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170829220337.23427-1-ehabkost@redhat.com> Reviewed-by:
Gonglei <arei.gonglei@huawei.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com>
-
- Jul 14, 2017
-
-
Peter Maydell authored
Rename memory_region_init_ram() to memory_region_init_ram_nomigrate(). This leaves the way clear for us to provide a memory_region_init_ram() which does handle migration. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 1499438577-7674-4-git-send-email-peter.maydell@linaro.org
-
Anton Nefedov authored
Frontends should have an interface to setup the handler of a backend change. The interface will be used in the next commits Signed-off-by:
Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1499342940-56739-3-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 11, 2017
-
-
Daniel P. Berrangé authored
The content of the backends/trace-events file was entirely removed in commit 6b10e573 Author: Marc-André Lureau <marcandre.lureau@redhat.com> Date: Mon May 29 12:39:42 2017 +0400 char: move char devices to chardev/ Leaving the empty file around, causes tracetool to generate an empty .dtrace file which makes the dtrace compiler throw a syntax error. Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20170629162046.4135-1-berrange@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 20, 2017
-
-
Marc-André Lureau authored
Use the actual unsigned integer type name. The type name change impacts the following externally visible area: * vl.c's machine_help_func() puts it in help for -machine NAME,help. * QMP command qom-list exposes it in ObjectPropertyInfo member @type. * QMP command device-list-properties exposes it in DevicePropertyInfo member @type. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20170607163635.17635-15-marcandre.lureau@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Jun 02, 2017
-
-
Marc-André Lureau authored
Suggested by Paolo Bonzini during series review. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
This simplifies removing a backend for a frontend user (no need to retrieve the associated driver and separate delete call etc). NB: many frontends have questionable handling of ending a chardev. They should probably delete the backend to prevent broken reusage. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Move all the frontend struct and methods to a seperate unit. This avoids accidentally mixing backend and frontend calls, and helps with readabilty. Make qemu_chr_replay() a macro shared by both char and char-fe. Export qemu_chr_write(), and use a macro for qemu_chr_write_all() (nb: yes, CharBackend is for char frontend :) Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
So they are all in one place. The following patch will move serial & parallel declarations to the respective headers. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- Apr 20, 2017
-
-
Peter Xu authored
Use the new interface to boost readability. Signed-off-by:
Peter Xu <peterx@redhat.com> Message-Id: <1489151370-15453-3-git-send-email-peterx@redhat.com> Reviewed-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com>
-
Peter Xu authored
We were checking this against memory region size of host memory backend's mr field to see whether the mr has been inited. This is efficient but less elegant. Let's make a helper for it to avoid confusions, along with some notes. Suggested-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Xu <peterx@redhat.com> Message-Id: <1489151370-15453-2-git-send-email-peterx@redhat.com> Reviewed-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com>
-
- Mar 23, 2017
-
-
Halil Pasic authored
We already check for queues == 1 in cryptodev_builtin_init and when that is not true raise an error. But before that error is reported the assertion in cryptodev_builtin_cleanup kicks in (because object is being finalized and freed). Let's remove assert(queues == 1) form cryptodev_builtin_cleanup as it does only harm and no good. Reported-by:
Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by:
Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Gonglei <arei.gonglei@huawei.com>
-
Longpeng (Mike) authored
ECB mode cipher doesn't need IV, if we setiv for it then qemu crypto API would report "Expected IV size 0 not **", so we should setiv only when the cipher algos really need. Signed-off-by:
Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by:
Gonglei <arei.gonglei@huawei.com>
-
- Mar 21, 2017
-
-
Markus Armbruster authored
This reverts commit 1454d33f. The string input visitor regression fixed in the previous commit made visit_type_uint16List() fail on empty input. query_memdev() calls it via object_property_get_uint16List(). Because it doesn't expect it to fail, it passes &error_abort, and duly crashes. Commit 1454d33f "fixes" this crash by making host_memory_backend_get_host_nodes() return a list containing just MAX_NODES instead of the empty list. Papers over the regression, and leads to bogus "info memdev" output, as shown below; revert. I suspect that if we had bisected the crash back then, we would have found and fixed the actual bug instead of papering over it. To reproduce, run HMP command "info memdev" with $ qemu-system-x86_64 --nodefaults -S -display none -monitor stdio -object memory-backend-ram,id=mem1,size=4k With this commit, "info memdev" prints memory backend: mem1 size: 4096 merge: true dump: true prealloc: false policy: default host nodes: exactly like before commit 74f24cb6. Between commit 1454d33f and this commit, it prints memory backend: mem1 size: 4096 merge: true dump: true prealloc: false policy: default host nodes: 128 The last line is bogus. Between commit 74f24cb6 and 1454d33f, it crashes like this: Unexpected error in parse_str() at /work/armbru/tmp/qemu/qapi/string-input-visitor.c:126: Parameter 'null' expects an int64 value or range Aborted (core dumped) Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1490026424-11330-3-git-send-email-armbru@redhat.com> Reviewed-by:
Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Mar 14, 2017
-
-
Jitendra Kolhe authored
Using "-mem-prealloc" option for a large guest leads to higher guest start-up and migration time. This is because with "-mem-prealloc" option qemu tries to map every guest page (create address translations), and make sure the pages are available during runtime. virsh/libvirt by default, seems to use "-mem-prealloc" option in case the guest is configured to use huge pages. The patch tries to map all guest pages simultaneously by spawning multiple threads. Currently limiting the change to QEMU library functions on POSIX compliant host only, as we are not sure if the problem exists on win32. Below are some stats with "-mem-prealloc" option for guest configured to use huge pages. ------------------------------------------------------------------------ Idle Guest | Start-up time | Migration time ------------------------------------------------------------------------ Guest stats with 2M HugePage usage - single threaded (existing code) ------------------------------------------------------------------------ 64 Core - 4TB | 54m11.796s | 75m43.843s 64 Core - 1TB | 8m56.576s | 14m29.049s 64 Core - 256GB | 2m11.245s | 3m26.598s ------------------------------------------------------------------------ Guest stats with 2M HugePage usage - map guest pages using 8 threads ------------------------------------------------------------------------ 64 Core - 4TB | 5m1.027s | 34m10.565s 64 Core - 1TB | 1m10.366s | 8m28.188s 64 Core - 256GB | 0m19.040s | 2m10.148s ----------------------------------------------------------------------- Guest stats with 2M HugePage usage - map guest pages using 16 threads ----------------------------------------------------------------------- 64 Core - 4TB | 1m58.970s | 31m43.400s 64 Core - 1TB | 0m39.885s | 7m55.289s 64 Core - 256GB | 0m11.960s | 2m0.135s ----------------------------------------------------------------------- Changed in v2: - modify number of memset threads spawned to min(smp_cpus, 16). - removed 64GB memory restriction for spawning memset threads. Changed in v3: - limit number of threads spawned based on min(sysconf(_SC_NPROCESSORS_ONLN), 16, smp_cpus) - implement memset thread specific siglongjmp in SIGBUS signal_handler. Changed in v4 - remove sigsetjmp/siglongjmp and SIGBUS unblock/block for main thread as main thread no longer touches any pages. - simplify code my returning memset_thread_failed status from touch_all_pages. Signed-off-by:
Jitendra Kolhe <jitendra.kolhe@hpe.com> Message-Id: <1487907103-32350-1-git-send-email-jitendra.kolhe@hpe.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Feb 20, 2017
-
-
Anatoli Huseu1 authored
Add QEMU Wacom Penpartner serial tablet emulation. GSoC 2016 project. Signed-off-by:
Anatoli Huseu1 <avg.tolik@gmail.com> Various cleanups. Add line speed tracking. Implement ST and SP commands. Adapted to chardev QOMification. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Message-id: 1486391007-10116-1-git-send-email-kraxel@redhat.com
-
- Jan 31, 2017
-
-
Marc-André Lureau authored
The class kind is necessary to lookup the chardev name in qmp_chardev_add() after calling qemu_chr_new_from_opts() and to set the appropriate ChardevBackend (mainly to free the right fields). qemu_chr_new_from_opts() can be changed to use a non-qmp function using the chardev class typename. Introduce qemu_chardev_add() to be called from qemu_chr_new_from_opts() and remove the class chardev kind field. Set the backend->type in the parse callback (when non-common fields are added). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Marc-André Lureau authored
qemu_chr_new_from_opts() is modified to not need CharDriver backend[] array, but uses instead objectified qmp_query_chardev_backends() and char_get_class(). The alias field is moved outside in a ChardevAlias[], similar to QDevAlias for devices. "kind" and "parse" are moved to ChardevClass ("kind" is to be removed next) Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Jan 27, 2017
-
-
Marc-André Lureau authored
Turn Chardev into Object. qemu_chr_alloc() is replaced by the qemu_chardev_new() constructor. It will call qemu_char_open() to open/intialize the chardev with the ChardevCommon *backend settings. The CharDriver::create() callback is turned into a ChardevClass::open() which is called from the newly introduced qemu_chardev_open(). "chardev-gdb" and "chardev-hci" are internal chardev and aren't creatable directly with -chardev. Use a new internal flag to disable them. We may want to use TYPE_USER_CREATABLE interface instead, or perhaps allow -chardev usage. Although in general we keep typename and macros private, unless the type is being used by some other file, in this patch, all types and common helper macros for qemu-char.c are in char.h. This is to help transition now (some types must be declared early, while some aren't shared) and when splitting in several units. This is to be improved later. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Pick a uniform chardev type name. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Use a single allocation for CharDriverState, this avoids extra allocations & pointers, and is a step towards more object-oriented CharDriver. Gtk console is a bit peculiar, gd_vc_chr_set_echo() used to have a temporary VirtualConsole to save the echo bit. Instead now, we consider whether vcd->console is set or not, and restore the echo bit saved in VCDriverState when calling gd_vc_vte_init(). The casts added are temporary, they are replaced with QOM type-safe macros in a later patch in this series. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
This makes the code more declarative, and avoids duplicating the information on all instances. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
No need to allocate & copy fields, let's use static const struct instead. Add an alias field to the CharDriver structure to cover the cases where we previously registered a driver twice under two names. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jan 12, 2017
-
-
Igor Mammedov authored
Considering 'id' is mandatory for user_creatable objects/backends and user_creatable_add_type() always has it as an argument regardless of where from it is called CLI/monitor or QMP, Fix issue by adding 'id' property to hostmem backends and set it in user_creatable_add_type() for every object that implements 'id' property. Then later at query-memdev time get 'id' from object directly. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Message-Id: <1484052795-158195-4-git-send-email-imammedo@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com>
-
- Jan 10, 2017
-
-
Samuel Thibault authored
This moves the SDL bits for window ID from the baum driver to SDL, as well as fixing the build for non-X11. Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Message-id: 20161221003806.22412-3-samuel.thibault@ens-lyon.org Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Gonglei (Arei) authored
The ready flag should be set by the children of cryptodev backend interface. Warp the setter/getter functions for it. Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Gonglei (Arei) authored
This property is used to Tag the cryptodev backend is used by virtio-crypto or not. Making cryptodev can't be hot unplugged when it's in use. Cleanup resources when cryptodev is finalized. Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Dec 24, 2016
-
-
Longpeng (Mike) authored
This patch add 3des-ede support for cryptodev. However this is effective only when backend using libgcrypt/nettle, because cipher-builtin doesn't support 3des-ede yet. Signed-off-by:
Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by:
Gonglei <arei.gonglei@huawei.com>
-
Longpeng (Mike) authored
Single-DES is obsolete and it's broken/useless for decades, we should remove it in cryptodev, as suggested by Daniel. Guest who wants to use this obsolete cipher alg will use its built-in implementation instead. Signed-off-by:
Longpeng(Mike) <longpeng2@huawei.com> Reviewed-by:
Daniel P. Berrange <berrange@redhat.com> Signed-off-by:
Gonglei <arei.gonglei@huawei.com>
-
Longpeng (Mike) authored
This patch add xts(aes) support. Signed-off-by:
Longpeng(Mike) <longpeng2@huawei.com> Reviewed-by:
Gonglei <arei.gonglei@huawei.com> Signed-off-by:
Gonglei <arei.gonglei@huawei.com>
-
Longpeng (Mike) authored
As the key length of xts(aes) is different with other mode of aes, so we should check specially in cryptodev_builtin_get_aes_algo, if it is xts mode. Signed-off-by:
Longpeng(Mike) <longpeng2@huawei.com> Reviewed-by:
Gonglei <arei.gonglei@huawei.com> Signed-off-by:
Gonglei <arei.gonglei@huawei.com>
-
- Nov 01, 2016
-
-
Gonglei (Arei) authored
We use an opaque point to the VirtIOCryptoReq which can support different packets based on different algorithms. Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Oct 30, 2016
-
-
Gonglei (Arei) authored
The new cryptodev backend named cryptodev-builtin, which realized by QEMU cipher APIs. These APIs can be backed by either nettle or gcrypt. Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-