lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82ce379f-73f4-0e57-ec32-e1ab1d3ef04d@linaro.org>
Date:   Tue, 14 Jun 2022 22:12:07 +0800
From:   Zhangfei Gao <zhangfei.gao@...aro.org>
To:     Kai Ye <yekai13@...wei.com>, gregkh@...uxfoundation.org,
        herbert@...dor.apana.org.au
Cc:     linuxarm@...wei.com, linux-kernel@...r.kernel.org,
        wangzhou1@...ilicon.com, linux-crypto@...r.kernel.org,
        linux-accelerators@...ts.ozlabs.org
Subject: Re: [PATCH v2 3/3] crypto: hisilicon/qm - defining the device
 isolation strategy



On 2022/6/14 下午8:29, Kai Ye via Linux-accelerators wrote:
> Define the device isolation strategy by the device driver. if the
> AER error frequency exceeds the value of setting for a certain
> period of time, The device will not be available in user space. The VF
> device use the PF device isolation strategy. All the hardware errors
> are processed by PF driver.
>
> Signed-off-by: Kai Ye <yekai13@...wei.com>
> ---
>   drivers/crypto/hisilicon/qm.c | 157 +++++++++++++++++++++++++++++++---
>   include/linux/hisi_acc_qm.h   |   9 ++
>   2 files changed, 152 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
> index ad83c194d664..47c41fa52693 100644
> --- a/drivers/crypto/hisilicon/qm.c
> +++ b/drivers/crypto/hisilicon/qm.c
> @@ -12,7 +12,6 @@
>   #include <linux/pm_runtime.h>
>   #include <linux/seq_file.h>
>   #include <linux/slab.h>
> -#include <linux/uacce.h>
>   #include <linux/uaccess.h>
>   #include <uapi/misc/uacce/hisi_qm.h>
>   #include <linux/hisi_acc_qm.h>
> @@ -417,6 +416,16 @@ struct hisi_qm_resource {
>   	struct list_head list;
>   };
>   
> +/**
> + * struct qm_hw_err - structure of describes the device err
> + * @list: hardware error list
> + * @tick_stamp: timestamp when the error occurred
> + */
> +struct qm_hw_err {
> +	struct list_head list;
> +	unsigned long long tick_stamp;
> +};
> +
>   struct hisi_qm_hw_ops {
>   	int (*get_vft)(struct hisi_qm *qm, u32 *base, u32 *number);
>   	void (*qm_db)(struct hisi_qm *qm, u16 qn,
> @@ -3278,6 +3287,7 @@ static int hisi_qm_uacce_get_queue(struct uacce_device *uacce,
>   	qp->event_cb = qm_qp_event_notifier;
>   	qp->pasid = arg;
>   	qp->is_in_kernel = false;
> +	atomic_inc(&qm->uacce_ref);
>   
>   	return 0;
>   }
> @@ -3285,7 +3295,9 @@ static int hisi_qm_uacce_get_queue(struct uacce_device *uacce,
>   static void hisi_qm_uacce_put_queue(struct uacce_queue *q)
>   {
>   	struct hisi_qp *qp = q->priv;
> +	struct hisi_qm *qm = qp->qm;
>   
> +	atomic_dec(&qm->uacce_ref);

Can we use qm state or qp state instead?

enum qm_state {
         QM_INIT = 0,
         QM_START,
         QM_CLOSE,
         QM_STOP,
};

enum qp_state {
         QP_INIT = 1,
         QP_START,
         QP_STOP,
         QP_CLOSE,
};

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ