Skip to content
  • Marc-André Lureau's avatar
    c4fb8561
    tpm: replace GThreadPool with AIO threadpool · c4fb8561
    Marc-André Lureau authored
    
    
    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: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Reviewed-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
    Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
    c4fb8561
    tpm: replace GThreadPool with AIO threadpool
    Marc-André Lureau authored
    
    
    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: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Reviewed-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
    Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
Loading