Lines Matching refs:security_state
147 u32 security_state; member
579 if (mdata->security_state & CXL_PMEM_SEC_STATE_USER_PASS_SET) { in mock_sanitize()
583 if (mdata->security_state & CXL_PMEM_SEC_STATE_LOCKED) { in mock_sanitize()
600 if (mdata->security_state & CXL_PMEM_SEC_STATE_USER_PASS_SET) { in mock_secure_erase()
605 if (mdata->security_state & CXL_PMEM_SEC_STATE_LOCKED) { in mock_secure_erase()
622 memcpy(cmd->payload_out, &mdata->security_state, sizeof(u32)); in mock_get_security_state()
633 mdata->security_state |= CXL_PMEM_SEC_STATE_MASTER_PLIMIT; in master_plimit_check()
642 mdata->security_state |= CXL_PMEM_SEC_STATE_USER_PLIMIT; in user_plimit_check()
656 if (mdata->security_state & CXL_PMEM_SEC_STATE_FROZEN) { in mock_set_passphrase()
664 if (mdata->security_state & CXL_PMEM_SEC_STATE_MASTER_PLIMIT) { in mock_set_passphrase()
672 if (mdata->security_state & CXL_PMEM_SEC_STATE_USER_PASS_SET) { in mock_set_passphrase()
682 mdata->security_state |= CXL_PMEM_SEC_STATE_MASTER_PASS_SET; in mock_set_passphrase()
686 if (mdata->security_state & CXL_PMEM_SEC_STATE_USER_PLIMIT) { in mock_set_passphrase()
696 mdata->security_state |= CXL_PMEM_SEC_STATE_USER_PASS_SET; in mock_set_passphrase()
716 if (mdata->security_state & CXL_PMEM_SEC_STATE_FROZEN) { in mock_disable_passphrase()
724 if (mdata->security_state & CXL_PMEM_SEC_STATE_MASTER_PLIMIT) { in mock_disable_passphrase()
729 if (!(mdata->security_state & CXL_PMEM_SEC_STATE_MASTER_PASS_SET)) { in mock_disable_passphrase()
742 mdata->security_state &= ~CXL_PMEM_SEC_STATE_MASTER_PASS_SET; in mock_disable_passphrase()
746 if (mdata->security_state & CXL_PMEM_SEC_STATE_USER_PLIMIT) { in mock_disable_passphrase()
751 if (!(mdata->security_state & CXL_PMEM_SEC_STATE_USER_PASS_SET)) { in mock_disable_passphrase()
764 mdata->security_state &= ~(CXL_PMEM_SEC_STATE_USER_PASS_SET | in mock_disable_passphrase()
785 if (mdata->security_state & CXL_PMEM_SEC_STATE_FROZEN) in mock_freeze_security()
788 mdata->security_state |= CXL_PMEM_SEC_STATE_FROZEN; in mock_freeze_security()
801 if (mdata->security_state & CXL_PMEM_SEC_STATE_FROZEN) { in mock_unlock_security()
806 if (!(mdata->security_state & CXL_PMEM_SEC_STATE_USER_PASS_SET)) { in mock_unlock_security()
811 if (mdata->security_state & CXL_PMEM_SEC_STATE_USER_PLIMIT) { in mock_unlock_security()
816 if (!(mdata->security_state & CXL_PMEM_SEC_STATE_LOCKED)) { in mock_unlock_security()
823 mdata->security_state |= CXL_PMEM_SEC_STATE_USER_PLIMIT; in mock_unlock_security()
829 mdata->security_state &= ~CXL_PMEM_SEC_STATE_LOCKED; in mock_unlock_security()
845 if (mdata->security_state & CXL_PMEM_SEC_STATE_FROZEN) { in mock_passphrase_secure_erase()
850 if (mdata->security_state & CXL_PMEM_SEC_STATE_USER_PLIMIT && in mock_passphrase_secure_erase()
856 if (mdata->security_state & CXL_PMEM_SEC_STATE_MASTER_PLIMIT && in mock_passphrase_secure_erase()
871 if (mdata->security_state & CXL_PMEM_SEC_STATE_MASTER_PASS_SET) { in mock_passphrase_secure_erase()
880 mdata->security_state &= ~CXL_PMEM_SEC_STATE_USER_PASS_SET; in mock_passphrase_secure_erase()
882 mdata->security_state &= ~CXL_PMEM_SEC_STATE_LOCKED; in mock_passphrase_secure_erase()
902 if (mdata->security_state & CXL_PMEM_SEC_STATE_USER_PASS_SET) { in mock_passphrase_secure_erase()
910 mdata->security_state &= ~CXL_PMEM_SEC_STATE_USER_PASS_SET; in mock_passphrase_secure_erase()
1472 !!(mdata->security_state & CXL_PMEM_SEC_STATE_LOCKED)); in security_lock_show()
1487 if (!(mdata->security_state & CXL_PMEM_SEC_STATE_USER_PASS_SET)) in security_lock_store()
1489 mdata->security_state |= CXL_PMEM_SEC_STATE_LOCKED; in security_lock_store()
1490 mdata->security_state &= ~mask; in security_lock_store()