Skip to content
Snippets Groups Projects
  • Jerome Forissier's avatar
    db215798
    qemu: do not force kernel CONFIG_PREEMPT=y · db215798
    Jerome Forissier authored
    
    Since Linux commit dcb3b06d9c34 ("tee: optee: replace might_sleep with
    cond_resched") in v5.11, setting CONFIG_PREEMPT=y in kconfigs/qemu.conf
    is not needed anymore. It was a workaround for the missing call to
    cond_resched() in the TEE driver. At that time, might_sleep() together
    with preemption enabled allowed to get rid of some RCU warning messages
    when running long operations in secure world such as large key generation
    (test case: "xtest -l 1 4007_rsa"). With cond_resched() the preemption
    settings do not matter anymore.
    
    As a result of this change, QEMUv8 is unmodified (CONFIG_PREEMPT=y is
    set by default in the kernel's arch/arm64/configs/defconfig), but 32-bit
    QEMU now has CONFIG_PREEMPT disabled. Both platforms are tested and
    4007_rsa runs as expected with no warning.
    
    Signed-off-by: default avatarJerome Forissier <jerome@forissier.org>
    Acked-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
    Acked-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>
    db215798
    History
    qemu: do not force kernel CONFIG_PREEMPT=y
    Jerome Forissier authored
    
    Since Linux commit dcb3b06d9c34 ("tee: optee: replace might_sleep with
    cond_resched") in v5.11, setting CONFIG_PREEMPT=y in kconfigs/qemu.conf
    is not needed anymore. It was a workaround for the missing call to
    cond_resched() in the TEE driver. At that time, might_sleep() together
    with preemption enabled allowed to get rid of some RCU warning messages
    when running long operations in secure world such as large key generation
    (test case: "xtest -l 1 4007_rsa"). With cond_resched() the preemption
    settings do not matter anymore.
    
    As a result of this change, QEMUv8 is unmodified (CONFIG_PREEMPT=y is
    set by default in the kernel's arch/arm64/configs/defconfig), but 32-bit
    QEMU now has CONFIG_PREEMPT disabled. Both platforms are tested and
    4007_rsa runs as expected with no warning.
    
    Signed-off-by: default avatarJerome Forissier <jerome@forissier.org>
    Acked-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
    Acked-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>