9af23989 | 11-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
Include less of the generated modular QAPI headers
In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects.
The previous comm
Include less of the generated modular QAPI headers
In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects.
The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h, qapi-types.h. Each of these headers still includes all its shards. Reduce compile time by including just the shards we actually need.
To illustrate the benefits: adding a type to qapi/migration.json now recompiles some 2300 instead of 4800 objects. The next commit will improve it further.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-24-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> [eblake: rebase to master] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|
0a9b9be9 | 01-Mar-2018 |
Gonglei <arei.gonglei@huawei.com> |
cryptodev-vhost-user: set the key length
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> |
efbfeb81 | 01-Mar-2018 |
Gonglei <arei.gonglei@huawei.com> |
cryptodev-vhost-user: add crypto session handler
Introduce two vhost-user meassges: VHOST_USER_CREATE_CRYPTO_SESSION and VHOST_USER_CLOSE_CRYPTO_SESSION. At this point, the QEMU side support crypto
cryptodev-vhost-user: add crypto session handler
Introduce two vhost-user meassges: VHOST_USER_CREATE_CRYPTO_SESSION and VHOST_USER_CLOSE_CRYPTO_SESSION. At this point, the QEMU side support crypto operation in cryptodev host-user backend.
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
5da73dab | 01-Mar-2018 |
Gonglei <arei.gonglei@huawei.com> |
cryptodev: add vhost support
Impliment the vhost-crypto's funtions, such as startup, stop and notification etc. Introduce an enum QCryptoCryptoDevBackendOptionsType in order to identify the cryptode
cryptodev: add vhost support
Impliment the vhost-crypto's funtions, such as startup, stop and notification etc. Introduce an enum QCryptoCryptoDevBackendOptionsType in order to identify the cryptodev vhost backend is vhost-user or vhost-kernel-module (If exist).
At this point, the cryptdoev-vhost-user works.
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
042cea27 | 01-Mar-2018 |
Gonglei <arei.gonglei@huawei.com> |
cryptodev: add vhost-user as a new cryptodev backend
Usage: -chardev socket,id=charcrypto0,path=/path/to/your/socket -object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0 -device virtio-
cryptodev: add vhost-user as a new cryptodev backend
Usage: -chardev socket,id=charcrypto0,path=/path/to/your/socket -object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
06329cce | 13-Dec-2017 |
Marcel Apfelbaum <marcel@redhat.com> |
mem: add share parameter to memory-backend-ram
Currently only file backed memory backend can be created with a "share" flag in order to allow sharing guest RAM with other processes in the host.
Add
mem: add share parameter to memory-backend-ram
Currently only file backed memory backend can be created with a "share" flag in order to allow sharing guest RAM with other processes in the host.
Add the "share" flag also to RAM Memory Backend in order to allow remapping parts of the guest RAM to different host virtual addresses. This is needed by the RDMA devices in order to remap non-contiguous QEMU virtual addresses to a contiguous virtual address range.
Moved the "share" flag to the Host Memory base class, modified phys_mem_alloc to include the new parameter and a new interface memory_region_init_ram_shared_nomigrate.
There are no functional changes if the new flag is not used.
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
show more ...
|
a82400cf | 01-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
Drop superfluous includes of qapi/qmp/qerror.h
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Drop superfluous includes of qapi/qmp/qerror.h
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-6-armbru@redhat.com>
show more ...
|
522ece32 | 01-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
Drop superfluous includes of qapi-types.h and test-qapi-types.h
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <ar
Drop superfluous includes of qapi-types.h and test-qapi-types.h
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-4-armbru@redhat.com>
show more ...
|
dbb9e0f4 | 01-Feb-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
Add memfd based hostmem
Add a new memory backend, similar to hostmem-file, except that it doesn't need to create files. It also enforces memory sealing.
This backend is mainly useful for sharing th
Add memfd based hostmem
Add a new memory backend, similar to hostmem-file, except that it doesn't need to create files. It also enforces memory sealing.
This backend is mainly useful for sharing the memory with other processes.
Note that Linux supports transparent huge-pages of shmem/memfd memory since 4.8. It is relatively easier to set up THP than a dedicate hugepage mount point by using "madvise" in /sys/kernel/mm/transparent_hugepage/shmem_enabled.
Since 4.14, memfd allows to set hugetlb requirement explicitly.
Pending for merge in 4.16 is memfd sealing support for hugetlb backed memory.
Usage: -object memory-backend-memfd,id=mem1,size=1G
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180201132757.23063-5-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
6a8a2354 | 29-Jan-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm: report backend request error
Use an Error** for request to let the caller handle error reporting.
This will also allow to inform the frontend of a backend error.
Signed-off-by: Marc-André Lur
tpm: report backend request error
Use an Error** for request to let the caller handle error reporting.
This will also allow to inform the frontend of a backend error.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
c4fb8561 | 29-Jan-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm: replace GThreadPool with AIO threadpool
The TPM backend uses a GThreadPool to handle IO in a seperate thread. However, GThreadPool isn't integrated with Qemu main loops, making it unnecessarily
tpm: replace GThreadPool with AIO threadpool
The TPM backend uses a GThreadPool to handle IO in a seperate thread. However, GThreadPool isn't integrated with Qemu main loops, making it unnecessarily complicated to deal with.
Qemu has a AIO threadpool, that is better integrated with loops and various IO functions, provides completion BH by default etc.
Remove the only user of GThreadPool from qemu, use AIO threadpool.
Note that the backend: - no longer accepts queing multiple requests (unneeded so far) - increase ref to itself when handling a command, for extra safety - tpm_backend_thread_end() is renamed tpm_backend_finish_sync() and will wait for completion of BH (request_completed), which will help migration handling.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
98376843 | 11-Dec-2017 |
Haozhong Zhang <haozhong.zhang@intel.com> |
hostmem-file: add "align" option
When mmap(2) the backend files, QEMU uses the host page size (getpagesize(2)) by default as the alignment of mapping address. However, some backends may require alig
hostmem-file: add "align" option
When mmap(2) the backend files, QEMU uses the host page size (getpagesize(2)) by default as the alignment of mapping address. However, some backends may require alignments different than the page size. For example, mmap a device DAX (e.g., /dev/dax0.0) on Linux kernel 4.13 to an address, which is 4K-aligned but not 2M-aligned, fails with a kernel message like
[617494.969768] dax dax0.0: qemu-system-x86: dax_mmap: fail, unaligned vma (0x7fa37c579000 - 0x7fa43c579000, 0x1fffff)
Because there is no common approach to get such alignment requirement, we add the 'align' option to 'memory-backend-file', so that users or management utils, which have enough knowledge about the backend, can specify a proper alignment via this option.
Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> Message-Id: <20171211072806.2812-2-haozhong.zhang@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> [ehabkost: fixed typo, fixed error_setg() format string] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
9375c44f | 04-Nov-2017 |
Stefan Berger <stefanb@linux.vnet.ibm.com> |
tpm: tpm_emulator: get and set buffer size of device
Convert the tpm_emulator backend to get the current buffer size of the external device and set it to the buffer size that the frontend (TIS) requ
tpm: tpm_emulator: get and set buffer size of device
Convert the tpm_emulator backend to get the current buffer size of the external device and set it to the buffer size that the frontend (TIS) requests.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|
b21e6aaf | 03-Nov-2017 |
Stefan Berger <stefanb@linux.vnet.ibm.com> |
tpm: Move getting TPM buffer size to backends
Rather than setting the size of the TPM buffer in the front-end, query the backend for the size of the buffer. In this patch we just move the hard-coded
tpm: Move getting TPM buffer size to backends
Rather than setting the size of the TPM buffer in the front-end, query the backend for the size of the buffer. In this patch we just move the hard-coded buffer size of 4096 to the backends.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|
ebca2df7 | 06-Nov-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm-be: update optional function pointers
QEMU code doesn't generally have assert() for mandatory callbacks/function pointers, probably because the crash is pretty obvious. Document the methods inst
tpm-be: update optional function pointers
QEMU code doesn't generally have assert() for mandatory callbacks/function pointers, probably because the crash is pretty obvious. Document the methods instead of going into the code.
Make get_tpm_options() mandatory to implement (since all backend implementation have it).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
3c3ef630 | 06-Nov-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm: remove unused opened code
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet
tpm: remove unused opened code
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
191adc94 | 06-Nov-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm-be: ask model to the TPM interface
No need to store the mode in the backend, or to let the frontend set it itself.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: St
tpm-be: ask model to the TPM interface
No need to store the mode in the backend, or to let the frontend set it itself.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
0bd6c8a9 | 06-Nov-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm-be: report error instead of front-end
Backend can give more accurate error description, and lift out the job from the frontend.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Re
tpm-be: report error instead of front-end
Backend can give more accurate error description, and lift out the job from the frontend.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
68999059 | 06-Nov-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm-be: call request_completed() out of thread
Lift from the backend implementation the responsability to call the request_completed() callback outside of thread context. This also simplify frontend
tpm-be: call request_completed() out of thread
Lift from the backend implementation the responsability to call the request_completed() callback outside of thread context. This also simplify frontend/interface work, as they no longer need to care whether the callback is called from a different thread.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
8a89c9ac | 06-Nov-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm-backend: store TPMIf interface, improve backend_init()
Store the TPM interface, the actual object may be different from TPMState. Keep a reference on the interface, and check the backend wasn't
tpm-backend: store TPMIf interface, improve backend_init()
Store the TPM interface, the actual object may be different from TPMState. Keep a reference on the interface, and check the backend wasn't already initialized.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
67af320c | 06-Nov-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm: move TpmIf in include/sysemu/tpm.h
This is a better location than hw/tpm, since we are going to use the interface from outside hw/tpm.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat
tpm: move TpmIf in include/sysemu/tpm.h
This is a better location than hw/tpm, since we are going to use the interface from outside hw/tpm.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
05a69998 | 09-Oct-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm: move recv_data_callback to TPM interface
Simplify the TPM backend setup, move callback to TPM interface.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berg
tpm: move recv_data_callback to TPM interface
Simplify the TPM backend setup, move callback to TPM interface.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
698f5daa | 09-Oct-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm: add a QOM TPM interface
This will simplify backend / interface objects relationship, so the frontend interface will simply have to implement the TPM QOM interface.
Signed-off-by: Marc-André Lu
tpm: add a QOM TPM interface
This will simplify backend / interface objects relationship, so the frontend interface will simply have to implement the TPM QOM interface.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
0e43b7e6 | 09-Oct-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm: add TPMBackendCmd to hold the request state
This simplifies a bit locality handling, and argument passing, and could pave the way to queuing requests (if that makes sense).
Signed-off-by: Marc
tpm: add TPMBackendCmd to hold the request state
This simplifies a bit locality handling, and argument passing, and could pave the way to queuing requests (if that makes sense).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
905e78ba | 09-Oct-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tpm: remove unused TPMBackendCmd
There is only handling of request so far in both backends.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.
tpm: remove unused TPMBackendCmd
There is only handling of request so far in both backends.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|