[PATCH v5 0/3] Some optimizations related to sgx