QPC_QP_ST
hr_reg_write(context, QPC_QP_ST, new_state);
hr_reg_clear(qpc_mask, QPC_QP_ST);
state = hr_reg_read(&context, QPC_QP_ST);