linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature
@ 2022-11-19  7:48 Kai Ye
  2022-11-19  7:48 ` [PATCH v10 1/3] uacce: " Kai Ye
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Kai Ye @ 2022-11-19  7:48 UTC (permalink / raw)
  To: gregkh, herbert
  Cc: linux-crypto, linux-kernel, wangzhou1, liulongfang, yekai13

1、Add the uacce hardware error isolation interface. Hardware error 
   thresholds can be configured by sysfs node. User can get the hardware
   isolated state by sysfs node.
2、Defining the isolation strategy for uacce device by uacce sysfs node. 
   If the number of hardware errors exceeds the configured value, the 
   uacce device will not be available in user space.
3、The ACC VF device use the PF device isolation strategy.
   
changes v1->v2:
	- deleted dev_to_uacce api.
	- add vfs node doc. 
	- move uacce->ref to driver.
changes v2->v3:
	- deleted some redundant code.
	- use qm state instead of reference count.
	- add null pointer check.
	- isolate_strategy_read() instead of a copy.
changes v3->v4:
	- modify a comment
changes v4->v5:
	- use bool instead of atomic.
	- isolation frequency instead of isolation command.
changes v5->v6:
	- add is_visible in uacce.
	- add the description of the isolation strategy file node.
changes v6->v7
	- add an example for isolate_strategy in Documentation.
changes v7->v8
	- update the correct date.
changes v8->v9
    - move isolation strategy from qm to uacce.
changes v9->v10
	- Go back to the v8 version of the solution.
	- Modify some code according to suggestions.

Kai Ye (3):
  uacce: supports device isolation feature
  Documentation: add the device isolation feature sysfs nodes for uacce
  crypto: hisilicon/qm - define the device isolation strategy

 Documentation/ABI/testing/sysfs-driver-uacce |  18 ++
 drivers/crypto/hisilicon/qm.c                | 169 +++++++++++++++++--
 drivers/misc/uacce/uacce.c                   |  50 ++++++
 include/linux/hisi_acc_qm.h                  |  15 ++
 include/linux/uacce.h                        |  12 ++
 5 files changed, 249 insertions(+), 15 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v10 1/3] uacce: supports device isolation feature
  2022-11-19  7:48 [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
@ 2022-11-19  7:48 ` Kai Ye
  2022-11-19  7:48 ` [PATCH v10 2/3] Documentation: add the device isolation feature sysfs nodes for uacce Kai Ye
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Kai Ye @ 2022-11-19  7:48 UTC (permalink / raw)
  To: gregkh, herbert
  Cc: linux-crypto, linux-kernel, wangzhou1, liulongfang, yekai13

UACCE adds the hardware error isolation feature. To improve service
reliability, some uacce devices that frequently encounter hardware
errors are isolated. Therefore, this feature is added.

Users can configure the hardware error threshold by 'isolate_strategy'
sysfs node. The user space can get the device isolated state by 'isolate'
sysfs node. If the number of device errors exceeds the configured error
threshold, the device will be isolated. It means the uacce device is
unavailable.

Signed-off-by: Kai Ye <yekai13@huawei.com>
---
 drivers/misc/uacce/uacce.c | 50 ++++++++++++++++++++++++++++++++++++++
 include/linux/uacce.h      | 12 +++++++++
 2 files changed, 62 insertions(+)

diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
index b70a013139c7..946f7e4b364f 100644
--- a/drivers/misc/uacce/uacce.c
+++ b/drivers/misc/uacce/uacce.c
@@ -363,12 +363,52 @@ static ssize_t region_dus_size_show(struct device *dev,
 		       uacce->qf_pg_num[UACCE_QFRT_DUS] << PAGE_SHIFT);
 }
 
+static ssize_t isolate_show(struct device *dev,
+			    struct device_attribute *attr, char *buf)
+{
+	struct uacce_device *uacce = to_uacce_device(dev);
+
+	return sysfs_emit(buf, "%d\n", uacce->ops->get_isolate_state(uacce));
+}
+
+static ssize_t isolate_strategy_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+	struct uacce_device *uacce = to_uacce_device(dev);
+	u32 val;
+
+	val = uacce->ops->isolate_err_threshold_read(uacce);
+
+	return sysfs_emit(buf, "%u\n", val);
+}
+
+static ssize_t isolate_strategy_store(struct device *dev, struct device_attribute *attr,
+				   const char *buf, size_t count)
+{
+	struct uacce_device *uacce = to_uacce_device(dev);
+	unsigned long val;
+	int ret;
+
+	if (kstrtoul(buf, 0, &val) < 0)
+		return -EINVAL;
+
+	if (val > UACCE_MAX_ERR_THRESHOLD)
+		return -EINVAL;
+
+	ret = uacce->ops->isolate_err_threshold_write(uacce, val);
+	if (ret)
+		return ret;
+
+	return count;
+}
+
 static DEVICE_ATTR_RO(api);
 static DEVICE_ATTR_RO(flags);
 static DEVICE_ATTR_RO(available_instances);
 static DEVICE_ATTR_RO(algorithms);
 static DEVICE_ATTR_RO(region_mmio_size);
 static DEVICE_ATTR_RO(region_dus_size);
+static DEVICE_ATTR_RO(isolate);
+static DEVICE_ATTR_RW(isolate_strategy);
 
 static struct attribute *uacce_dev_attrs[] = {
 	&dev_attr_api.attr,
@@ -377,6 +417,8 @@ static struct attribute *uacce_dev_attrs[] = {
 	&dev_attr_algorithms.attr,
 	&dev_attr_region_mmio_size.attr,
 	&dev_attr_region_dus_size.attr,
+	&dev_attr_isolate.attr,
+	&dev_attr_isolate_strategy.attr,
 	NULL,
 };
 
@@ -392,6 +434,14 @@ static umode_t uacce_dev_is_visible(struct kobject *kobj,
 	    (!uacce->qf_pg_num[UACCE_QFRT_DUS])))
 		return 0;
 
+	if (attr == &dev_attr_isolate_strategy.attr &&
+	    (!uacce->ops->isolate_err_threshold_read &&
+	     !uacce->ops->isolate_err_threshold_write))
+		return 0;
+
+	if (attr == &dev_attr_isolate.attr && !uacce->ops->get_isolate_state)
+		return 0;
+
 	return attr->mode;
 }
 
diff --git a/include/linux/uacce.h b/include/linux/uacce.h
index 9ce88c28b0a8..0a81c3dfd26c 100644
--- a/include/linux/uacce.h
+++ b/include/linux/uacce.h
@@ -8,6 +8,7 @@
 #define UACCE_NAME		"uacce"
 #define UACCE_MAX_REGION	2
 #define UACCE_MAX_NAME_SIZE	64
+#define UACCE_MAX_ERR_THRESHOLD	65535
 
 struct uacce_queue;
 struct uacce_device;
@@ -30,6 +31,9 @@ struct uacce_qfile_region {
  * @is_q_updated: check whether the task is finished
  * @mmap: mmap addresses of queue to user space
  * @ioctl: ioctl for user space users of the queue
+ * @get_isolate_state: get the device state after set the isolate strategy
+ * @isolate_err_threshold_write: stored the isolate error threshold to the device
+ * @isolate_err_threshold_read: read the isolate error threshold value from the device
  */
 struct uacce_ops {
 	int (*get_available_instances)(struct uacce_device *uacce);
@@ -43,6 +47,9 @@ struct uacce_ops {
 		    struct uacce_qfile_region *qfr);
 	long (*ioctl)(struct uacce_queue *q, unsigned int cmd,
 		      unsigned long arg);
+	enum uacce_dev_state (*get_isolate_state)(struct uacce_device *uacce);
+	int (*isolate_err_threshold_write)(struct uacce_device *uacce, u32 num);
+	u32 (*isolate_err_threshold_read)(struct uacce_device *uacce);
 };
 
 /**
@@ -57,6 +64,11 @@ struct uacce_interface {
 	const struct uacce_ops *ops;
 };
 
+enum uacce_dev_state {
+	UACCE_DEV_NORMAL,
+	UACCE_DEV_ISOLATE,
+};
+
 enum uacce_q_state {
 	UACCE_Q_ZOMBIE = 0,
 	UACCE_Q_INIT,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v10 2/3] Documentation: add the device isolation feature sysfs nodes for uacce
  2022-11-19  7:48 [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
  2022-11-19  7:48 ` [PATCH v10 1/3] uacce: " Kai Ye
@ 2022-11-19  7:48 ` Kai Ye
  2022-11-19  7:48 ` [PATCH v10 3/3] crypto: hisilicon/qm - define the device isolation strategy Kai Ye
  2022-11-25  8:49 ` [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature yekai (A)
  3 siblings, 0 replies; 10+ messages in thread
From: Kai Ye @ 2022-11-19  7:48 UTC (permalink / raw)
  To: gregkh, herbert
  Cc: linux-crypto, linux-kernel, wangzhou1, liulongfang, yekai13

Update documentation describing sysfs node that could help to
configure hardware error threshold for users in the user space. And
describing sysfs node that could read the device isolated state.

Signed-off-by: Kai Ye <yekai13@huawei.com>
---
 Documentation/ABI/testing/sysfs-driver-uacce | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-driver-uacce b/Documentation/ABI/testing/sysfs-driver-uacce
index 08f2591138af..d3f0b8f3c589 100644
--- a/Documentation/ABI/testing/sysfs-driver-uacce
+++ b/Documentation/ABI/testing/sysfs-driver-uacce
@@ -19,6 +19,24 @@ Contact:        linux-accelerators@lists.ozlabs.org
 Description:    Available instances left of the device
                 Return -ENODEV if uacce_ops get_available_instances is not provided
 
+What:           /sys/class/uacce/<dev_name>/isolate_strategy
+Date:           Nov 2022
+KernelVersion:  6.1
+Contact:        linux-accelerators@lists.ozlabs.org
+Description:    (RW) A sysfs node that configure the error threshold for the hardware
+                isolation strategy. This size is a configured integer value, which is the
+                number of threshold for hardware errors occurred in one hour. The default is 0.
+                0 means never isolate the device. The maximum value is 65535. You can write
+                a number of threshold based on your hardware.
+
+What:           /sys/class/uacce/<dev_name>/isolate
+Date:           Nov 2022
+KernelVersion:  6.1
+Contact:        linux-accelerators@lists.ozlabs.org
+Description:    (R) A sysfs node that read the device isolated state. The value 1
+                means the device is unavailable. The 0 means the device is
+                available.
+
 What:           /sys/class/uacce/<dev_name>/algorithms
 Date:           Feb 2020
 KernelVersion:  5.7
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v10 3/3] crypto: hisilicon/qm - define the device isolation strategy
  2022-11-19  7:48 [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
  2022-11-19  7:48 ` [PATCH v10 1/3] uacce: " Kai Ye
  2022-11-19  7:48 ` [PATCH v10 2/3] Documentation: add the device isolation feature sysfs nodes for uacce Kai Ye
@ 2022-11-19  7:48 ` Kai Ye
  2022-12-11  6:16   ` Herbert Xu
  2022-11-25  8:49 ` [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature yekai (A)
  3 siblings, 1 reply; 10+ messages in thread
From: Kai Ye @ 2022-11-19  7:48 UTC (permalink / raw)
  To: gregkh, herbert
  Cc: linux-crypto, linux-kernel, wangzhou1, liulongfang, yekai13

Define the device isolation strategy by the device driver. The
user configures a hardware error threshold value by uacce interface.
If the number of hardware errors exceeds the value of setting error
threshold in one hour. 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@huawei.com>
---
 drivers/crypto/hisilicon/qm.c | 169 +++++++++++++++++++++++++++++++---
 include/linux/hisi_acc_qm.h   |  15 +++
 2 files changed, 169 insertions(+), 15 deletions(-)

diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 36d70b9f6117..0a0c984a4e7a 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -367,6 +367,16 @@ struct hisi_qm_resource {
 	struct list_head list;
 };
 
+/**
+ * struct qm_hw_err - Structure describing the device errors
+ * @list: hardware error list
+ * @timestamp: timestamp when the error occurred
+ */
+struct qm_hw_err {
+	struct list_head list;
+	unsigned long long timestamp;
+};
+
 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,
@@ -2469,6 +2479,113 @@ static long hisi_qm_uacce_ioctl(struct uacce_queue *q, unsigned int cmd,
 	return -EINVAL;
 }
 
+/**
+ * qm_hw_err_isolate() - Try to set the isolation status of the uacce device
+ * according to user's configuration of error threshold.
+ * @qm: the uacce device
+ */
+static int qm_hw_err_isolate(struct hisi_qm *qm)
+{
+	struct qm_hw_err *err, *tmp, *hw_err;
+	struct qm_err_isolate *isolate;
+	u32 count = 0;
+
+	isolate = &qm->isolate_data;
+
+#define SECONDS_PER_HOUR	3600
+
+	/* All the hw errs are processed by PF driver */
+	if (qm->uacce->is_vf || isolate->is_isolate || !isolate->err_threshold)
+		return 0;
+
+	hw_err = kzalloc(sizeof(*hw_err), GFP_KERNEL);
+	if (!hw_err)
+		return -ENOMEM;
+
+	/*
+	 * Time-stamp every slot AER error. Then check the AER error log when the
+	 * next device AER error occurred. if the device slot AER error count exceeds
+	 * the setting error threshold in one hour, the isolated state will be set
+	 * to true. And the AER error logs that exceed one hour will be cleared.
+	 */
+	mutex_lock(&isolate->isolate_lock);
+	hw_err->timestamp = jiffies;
+	list_for_each_entry_safe(err, tmp, &isolate->qm_hw_errs, list) {
+		if ((hw_err->timestamp - err->timestamp) / HZ >
+		    SECONDS_PER_HOUR) {
+			list_del(&err->list);
+			kfree(err);
+		} else {
+			count++;
+		}
+	}
+	list_add(&hw_err->list, &isolate->qm_hw_errs);
+	mutex_unlock(&isolate->isolate_lock);
+
+	if (count >= isolate->err_threshold)
+		isolate->is_isolate = true;
+
+	return 0;
+}
+
+static void qm_hw_err_destroy(struct hisi_qm *qm)
+{
+	struct qm_hw_err *err, *tmp;
+
+	mutex_lock(&qm->isolate_data.isolate_lock);
+	list_for_each_entry_safe(err, tmp, &qm->isolate_data.qm_hw_errs, list) {
+		list_del(&err->list);
+		kfree(err);
+	}
+	mutex_unlock(&qm->isolate_data.isolate_lock);
+}
+
+static enum uacce_dev_state hisi_qm_get_isolate_state(struct uacce_device *uacce)
+{
+	struct hisi_qm *qm = uacce->priv;
+	struct hisi_qm *pf_qm;
+
+	if (uacce->is_vf)
+		pf_qm = pci_get_drvdata(pci_physfn(qm->pdev));
+	else
+		pf_qm = qm;
+
+	return pf_qm->isolate_data.is_isolate ?
+			UACCE_DEV_ISOLATE : UACCE_DEV_NORMAL;
+}
+
+static int hisi_qm_isolate_threshold_write(struct uacce_device *uacce, u32 num)
+{
+	struct hisi_qm *qm = uacce->priv;
+
+	/* Must be set by PF */
+	if (uacce->is_vf)
+		return -EPERM;
+
+	if (qm->isolate_data.is_isolate)
+		return -EPERM;
+
+	qm->isolate_data.err_threshold = num;
+
+	/* After the policy is updated, need to reset the hardware err list */
+	qm_hw_err_destroy(qm);
+
+	return 0;
+}
+
+static u32 hisi_qm_isolate_threshold_read(struct uacce_device *uacce)
+{
+	struct hisi_qm *qm = uacce->priv;
+	struct hisi_qm *pf_qm;
+
+	if (uacce->is_vf) {
+		pf_qm = pci_get_drvdata(pci_physfn(qm->pdev));
+		return pf_qm->isolate_data.err_threshold;
+	}
+
+	return qm->isolate_data.err_threshold;
+}
+
 static const struct uacce_ops uacce_qm_ops = {
 	.get_available_instances = hisi_qm_get_available_instances,
 	.get_queue = hisi_qm_uacce_get_queue,
@@ -2478,8 +2595,22 @@ static const struct uacce_ops uacce_qm_ops = {
 	.mmap = hisi_qm_uacce_mmap,
 	.ioctl = hisi_qm_uacce_ioctl,
 	.is_q_updated = hisi_qm_is_q_updated,
+	.get_isolate_state = hisi_qm_get_isolate_state,
+	.isolate_err_threshold_write = hisi_qm_isolate_threshold_write,
+	.isolate_err_threshold_read = hisi_qm_isolate_threshold_read,
 };
 
+static void qm_remove_uacce(struct hisi_qm *qm)
+{
+	struct uacce_device *uacce = qm->uacce;
+
+	if (qm->use_sva) {
+		qm_hw_err_destroy(qm);
+		uacce_remove(uacce);
+		qm->uacce = NULL;
+	}
+}
+
 static int qm_alloc_uacce(struct hisi_qm *qm)
 {
 	struct pci_dev *pdev = qm->pdev;
@@ -2506,8 +2637,7 @@ static int qm_alloc_uacce(struct hisi_qm *qm)
 		qm->use_sva = true;
 	} else {
 		/* only consider sva case */
-		uacce_remove(uacce);
-		qm->uacce = NULL;
+		qm_remove_uacce(qm);
 		return -EINVAL;
 	}
 
@@ -2540,6 +2670,8 @@ static int qm_alloc_uacce(struct hisi_qm *qm)
 	uacce->qf_pg_num[UACCE_QFRT_DUS]  = dus_page_nr;
 
 	qm->uacce = uacce;
+	INIT_LIST_HEAD(&qm->isolate_data.qm_hw_errs);
+	mutex_init(&qm->isolate_data.isolate_lock);
 
 	return 0;
 }
@@ -4029,6 +4161,12 @@ static int qm_controller_reset_prepare(struct hisi_qm *qm)
 		return ret;
 	}
 
+	if (qm->use_sva) {
+		ret = qm_hw_err_isolate(qm);
+		if (ret)
+			pci_err(pdev, "failed to isolate hw err!\n");
+	}
+
 	ret = qm_wait_vf_prepare_finish(qm);
 	if (ret)
 		pci_err(pdev, "failed to stop by vfs in soft reset!\n");
@@ -4336,21 +4474,25 @@ static int qm_controller_reset(struct hisi_qm *qm)
 		qm->err_ini->show_last_dfx_regs(qm);
 
 	ret = qm_soft_reset(qm);
-	if (ret) {
-		pci_err(pdev, "Controller reset failed (%d)\n", ret);
-		qm_reset_bit_clear(qm);
-		return ret;
-	}
+	if (ret)
+		goto err_reset;
 
 	ret = qm_controller_reset_done(qm);
-	if (ret) {
-		qm_reset_bit_clear(qm);
-		return ret;
-	}
+	if (ret)
+		goto err_reset;
 
 	pci_info(pdev, "Controller reset complete\n");
 
 	return 0;
+
+err_reset:
+	pci_err(pdev, "Controller reset failed (%d)\n", ret);
+	qm_reset_bit_clear(qm);
+
+	/* if resetting fails, isolate the device */
+	if (qm->use_sva)
+		qm->isolate_data.is_isolate = true;
+	return ret;
 }
 
 /**
@@ -5271,10 +5413,7 @@ int hisi_qm_init(struct hisi_qm *qm)
 err_free_qm_memory:
 	hisi_qm_memory_uninit(qm);
 err_alloc_uacce:
-	if (qm->use_sva) {
-		uacce_remove(qm->uacce);
-		qm->uacce = NULL;
-	}
+	qm_remove_uacce(qm);
 err_irq_register:
 	qm_irqs_unregister(qm);
 err_pci_init:
diff --git a/include/linux/hisi_acc_qm.h b/include/linux/hisi_acc_qm.h
index 61f012d67f60..67f92f696784 100644
--- a/include/linux/hisi_acc_qm.h
+++ b/include/linux/hisi_acc_qm.h
@@ -272,6 +272,20 @@ struct hisi_qm_poll_data {
 	u16 *qp_finish_id;
 };
 
+/**
+ * struct qm_err_isolate
+ * @isolate_lock: protects device error log
+ * @err_threshold: user config error threshold which triggers isolation
+ * @is_isolate: device isolation state
+ * @uacce_hw_errs: index into qm device error list
+ */
+struct qm_err_isolate {
+	struct mutex isolate_lock;
+	u32 err_threshold;
+	bool is_isolate;
+	struct list_head qm_hw_errs;
+};
+
 struct hisi_qm {
 	enum qm_hw_ver ver;
 	enum qm_fun_type fun_type;
@@ -341,6 +355,7 @@ struct hisi_qm {
 	struct qm_shaper_factor *factor;
 	u32 mb_qos;
 	u32 type_rate;
+	struct qm_err_isolate isolate_data;
 };
 
 struct hisi_qp_status {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature
  2022-11-19  7:48 [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
                   ` (2 preceding siblings ...)
  2022-11-19  7:48 ` [PATCH v10 3/3] crypto: hisilicon/qm - define the device isolation strategy Kai Ye
@ 2022-11-25  8:49 ` yekai (A)
  2022-12-09  6:15   ` yekai (A)
  3 siblings, 1 reply; 10+ messages in thread
From: yekai (A) @ 2022-11-25  8:49 UTC (permalink / raw)
  To: gregkh, herbert; +Cc: linux-crypto, linux-kernel, wangzhou1, liulongfang



On 2022/11/19 15:48, Kai Ye wrote:
> 1、Add the uacce hardware error isolation interface. Hardware error 
>    thresholds can be configured by sysfs node. User can get the hardware
>    isolated state by sysfs node.
> 2、Defining the isolation strategy for uacce device by uacce sysfs node. 
>    If the number of hardware errors exceeds the configured value, the 
>    uacce device will not be available in user space.
> 3、The ACC VF device use the PF device isolation strategy.
>    
> changes v1->v2:
> 	- deleted dev_to_uacce api.
> 	- add vfs node doc. 
> 	- move uacce->ref to driver.
> changes v2->v3:
> 	- deleted some redundant code.
> 	- use qm state instead of reference count.
> 	- add null pointer check.
> 	- isolate_strategy_read() instead of a copy.
> changes v3->v4:
> 	- modify a comment
> changes v4->v5:
> 	- use bool instead of atomic.
> 	- isolation frequency instead of isolation command.
> changes v5->v6:
> 	- add is_visible in uacce.
> 	- add the description of the isolation strategy file node.
> changes v6->v7
> 	- add an example for isolate_strategy in Documentation.
> changes v7->v8
> 	- update the correct date.
> changes v8->v9
>     - move isolation strategy from qm to uacce.
> changes v9->v10
> 	- Go back to the v8 version of the solution.
> 	- Modify some code according to suggestions.
>
> Kai Ye (3):
>   uacce: supports device isolation feature
>   Documentation: add the device isolation feature sysfs nodes for uacce
>   crypto: hisilicon/qm - define the device isolation strategy
>
>  Documentation/ABI/testing/sysfs-driver-uacce |  18 ++
>  drivers/crypto/hisilicon/qm.c                | 169 +++++++++++++++++--
>  drivers/misc/uacce/uacce.c                   |  50 ++++++
>  include/linux/hisi_acc_qm.h                  |  15 ++
>  include/linux/uacce.h                        |  12 ++
>  5 files changed, 249 insertions(+), 15 deletions(-)
>
Hi Grek

Just a friendly ping.

Thanks
Kai

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature
  2022-11-25  8:49 ` [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature yekai (A)
@ 2022-12-09  6:15   ` yekai (A)
  2022-12-09 15:32     ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: yekai (A) @ 2022-12-09  6:15 UTC (permalink / raw)
  To: gregkh, herbert; +Cc: linux-crypto, linux-kernel, wangzhou1, liulongfang



On 2022/11/25 16:49, yekai (A) wrote:
>
> On 2022/11/19 15:48, Kai Ye wrote:
>> 1、Add the uacce hardware error isolation interface. Hardware error 
>>    thresholds can be configured by sysfs node. User can get the hardware
>>    isolated state by sysfs node.
>> 2、Defining the isolation strategy for uacce device by uacce sysfs node. 
>>    If the number of hardware errors exceeds the configured value, the 
>>    uacce device will not be available in user space.
>> 3、The ACC VF device use the PF device isolation strategy.
>>    
>> changes v1->v2:
>> 	- deleted dev_to_uacce api.
>> 	- add vfs node doc. 
>> 	- move uacce->ref to driver.
>> changes v2->v3:
>> 	- deleted some redundant code.
>> 	- use qm state instead of reference count.
>> 	- add null pointer check.
>> 	- isolate_strategy_read() instead of a copy.
>> changes v3->v4:
>> 	- modify a comment
>> changes v4->v5:
>> 	- use bool instead of atomic.
>> 	- isolation frequency instead of isolation command.
>> changes v5->v6:
>> 	- add is_visible in uacce.
>> 	- add the description of the isolation strategy file node.
>> changes v6->v7
>> 	- add an example for isolate_strategy in Documentation.
>> changes v7->v8
>> 	- update the correct date.
>> changes v8->v9
>>     - move isolation strategy from qm to uacce.
>> changes v9->v10
>> 	- Go back to the v8 version of the solution.
>> 	- Modify some code according to suggestions.
>>
>> Kai Ye (3):
>>   uacce: supports device isolation feature
>>   Documentation: add the device isolation feature sysfs nodes for uacce
>>   crypto: hisilicon/qm - define the device isolation strategy
>>
>>  Documentation/ABI/testing/sysfs-driver-uacce |  18 ++
>>  drivers/crypto/hisilicon/qm.c                | 169 +++++++++++++++++--
>>  drivers/misc/uacce/uacce.c                   |  50 ++++++
>>  include/linux/hisi_acc_qm.h                  |  15 ++
>>  include/linux/uacce.h                        |  12 ++
>>  5 files changed, 249 insertions(+), 15 deletions(-)
>>
> Hi Grek
>
> Just a friendly ping.
>
> Thanks
> Kai

Hi Greg KH

Could you help me to apply this patchset v10?

thanks
Kai


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature
  2022-12-09  6:15   ` yekai (A)
@ 2022-12-09 15:32     ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2022-12-09 15:32 UTC (permalink / raw)
  To: yekai (A); +Cc: herbert, linux-crypto, linux-kernel, wangzhou1, liulongfang

On Fri, Dec 09, 2022 at 02:15:07PM +0800, yekai (A) wrote:
> 
> 
> On 2022/11/25 16:49, yekai (A) wrote:
> >
> > On 2022/11/19 15:48, Kai Ye wrote:
> >> 1、Add the uacce hardware error isolation interface. Hardware error 
> >>    thresholds can be configured by sysfs node. User can get the hardware
> >>    isolated state by sysfs node.
> >> 2、Defining the isolation strategy for uacce device by uacce sysfs node. 
> >>    If the number of hardware errors exceeds the configured value, the 
> >>    uacce device will not be available in user space.
> >> 3、The ACC VF device use the PF device isolation strategy.
> >>    
> >> changes v1->v2:
> >> 	- deleted dev_to_uacce api.
> >> 	- add vfs node doc. 
> >> 	- move uacce->ref to driver.
> >> changes v2->v3:
> >> 	- deleted some redundant code.
> >> 	- use qm state instead of reference count.
> >> 	- add null pointer check.
> >> 	- isolate_strategy_read() instead of a copy.
> >> changes v3->v4:
> >> 	- modify a comment
> >> changes v4->v5:
> >> 	- use bool instead of atomic.
> >> 	- isolation frequency instead of isolation command.
> >> changes v5->v6:
> >> 	- add is_visible in uacce.
> >> 	- add the description of the isolation strategy file node.
> >> changes v6->v7
> >> 	- add an example for isolate_strategy in Documentation.
> >> changes v7->v8
> >> 	- update the correct date.
> >> changes v8->v9
> >>     - move isolation strategy from qm to uacce.
> >> changes v9->v10
> >> 	- Go back to the v8 version of the solution.
> >> 	- Modify some code according to suggestions.
> >>
> >> Kai Ye (3):
> >>   uacce: supports device isolation feature
> >>   Documentation: add the device isolation feature sysfs nodes for uacce
> >>   crypto: hisilicon/qm - define the device isolation strategy
> >>
> >>  Documentation/ABI/testing/sysfs-driver-uacce |  18 ++
> >>  drivers/crypto/hisilicon/qm.c                | 169 +++++++++++++++++--
> >>  drivers/misc/uacce/uacce.c                   |  50 ++++++
> >>  include/linux/hisi_acc_qm.h                  |  15 ++
> >>  include/linux/uacce.h                        |  12 ++
> >>  5 files changed, 249 insertions(+), 15 deletions(-)
> >>
> > Hi Grek
> >
> > Just a friendly ping.
> >
> > Thanks
> > Kai
> 
> Hi Greg KH
> 
> Could you help me to apply this patchset v10?

Sorry, it needs review from the crypto maintainers before I can take it.

Also, it looks to be too late for 6.2-rc1 at this point in time.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v10 3/3] crypto: hisilicon/qm - define the device isolation strategy
  2022-11-19  7:48 ` [PATCH v10 3/3] crypto: hisilicon/qm - define the device isolation strategy Kai Ye
@ 2022-12-11  6:16   ` Herbert Xu
  2023-01-10 11:57     ` yekai (A)
       [not found]     ` <e1bb7612-2763-5a00-0e53-bad22fa167cf@huawei.com>
  0 siblings, 2 replies; 10+ messages in thread
From: Herbert Xu @ 2022-12-11  6:16 UTC (permalink / raw)
  To: Kai Ye; +Cc: gregkh, linux-crypto, linux-kernel, wangzhou1, liulongfang

On Sat, Nov 19, 2022 at 07:48:17AM +0000, Kai Ye wrote:
> Define the device isolation strategy by the device driver. The
> user configures a hardware error threshold value by uacce interface.
> If the number of hardware errors exceeds the value of setting error
> threshold in one hour. 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@huawei.com>
> ---
>  drivers/crypto/hisilicon/qm.c | 169 +++++++++++++++++++++++++++++++---
>  include/linux/hisi_acc_qm.h   |  15 +++
>  2 files changed, 169 insertions(+), 15 deletions(-)

Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v10 3/3] crypto: hisilicon/qm - define the device isolation strategy
  2022-12-11  6:16   ` Herbert Xu
@ 2023-01-10 11:57     ` yekai (A)
       [not found]     ` <e1bb7612-2763-5a00-0e53-bad22fa167cf@huawei.com>
  1 sibling, 0 replies; 10+ messages in thread
From: yekai (A) @ 2023-01-10 11:57 UTC (permalink / raw)
  To: Herbert Xu; +Cc: gregkh, linux-crypto, linux-kernel, wangzhou1, liulongfang



On 2022/12/11 14:16, Herbert Xu wrote:
> On Sat, Nov 19, 2022 at 07:48:17AM +0000, Kai Ye wrote:
>> Define the device isolation strategy by the device driver. The
>> user configures a hardware error threshold value by uacce interface.
>> If the number of hardware errors exceeds the value of setting error
>> threshold in one hour. 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@huawei.com>
>> ---
>>  drivers/crypto/hisilicon/qm.c | 169 +++++++++++++++++++++++++++++++---
>>  include/linux/hisi_acc_qm.h   |  15 +++
>>  2 files changed, 169 insertions(+), 15 deletions(-)
> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>

Hi Greg KH

Could you help me to apply this patchset v10?

thanks
Kai

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v10 3/3] crypto: hisilicon/qm - define the device isolation strategy
       [not found]       ` <9e3aa5d6-951c-afcd-5544-2056d63a087a@huawei.com>
@ 2023-01-20 11:06         ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2023-01-20 11:06 UTC (permalink / raw)
  To: yekai (A); +Cc: Herbert Xu, linux-crypto, linux-kernel, wangzhou1, liulongfang

On Fri, Jan 20, 2023 at 10:13:50AM +0800, yekai (A) wrote:
> 
> 
> On 2023/1/12 17:26, yekai (A) wrote:
> >
> >
> >
> > On 2022/12/11 14:16, Herbert Xu wrote:
> >> On Sat, Nov 19, 2022 at 07:48:17AM +0000, Kai Ye wrote:
> >>> Define the device isolation strategy by the device driver. The
> >>> user configures a hardware error threshold value by uacce interface.
> >>> If the number of hardware errors exceeds the value of setting error
> >>> threshold in one hour. 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@huawei.com>
> >>> ---
> >>>  drivers/crypto/hisilicon/qm.c | 169 +++++++++++++++++++++++++++++++---
> >>>  include/linux/hisi_acc_qm.h   |  15 +++
> >>>  2 files changed, 169 insertions(+), 15 deletions(-)
> >> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
> >
> > Hi Greg KH
> >
> >  
> >
> > Could you help me to apply this patchset v10?
> >
> >  
> >
> > thanks
> >
> > Kai
> >
> >
> Hi Greg KH
> 
> Just a friendly ping. 
> Could you help me to apply this patchset v10?  Your prompt reply is much appreciated.

Sorry for the delay, I missed the crypto maintainer's review.  now
queued up.

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-20 11:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-19  7:48 [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
2022-11-19  7:48 ` [PATCH v10 1/3] uacce: " Kai Ye
2022-11-19  7:48 ` [PATCH v10 2/3] Documentation: add the device isolation feature sysfs nodes for uacce Kai Ye
2022-11-19  7:48 ` [PATCH v10 3/3] crypto: hisilicon/qm - define the device isolation strategy Kai Ye
2022-12-11  6:16   ` Herbert Xu
2023-01-10 11:57     ` yekai (A)
     [not found]     ` <e1bb7612-2763-5a00-0e53-bad22fa167cf@huawei.com>
     [not found]       ` <9e3aa5d6-951c-afcd-5544-2056d63a087a@huawei.com>
2023-01-20 11:06         ` Greg KH
2022-11-25  8:49 ` [PATCH v10 0/3] crypto: hisilicon - supports device isolation feature yekai (A)
2022-12-09  6:15   ` yekai (A)
2022-12-09 15:32     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).