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: <5b93796745b277ab8a8b8981ce04456763a9bcaa.1693012755.git.jiangdongxu1@huawei.com>
Date:   Sat, 26 Aug 2023 09:23:31 +0800
From:   Jiang Dongxu <jiangdongxu1@...wei.com>
To:     <mst@...hat.com>, <jasowang@...hat.com>
CC:     jiangdongxu <jiangdongxu1@...wei.com>,
        <virtualization@...ts.linux-foundation.org>,
        <linux-kernel@...r.kernel.org>, <longpeng2@...wei.com>,
        <eric.fangyi@...wei.com>
Subject: [PATCH 1/2] vdpa: add log operations

From: jiangdongxu <jiangdongxu1@...wei.com>

Several new interfaces are introduced to allow vdpa
device logging guest memory during live migration and
return to the VMM.

The set_log_base interface is used to set the base
address for buffer storing bitmaps.

The set_log_size interface is used to set the size
of buffer used for storing bitmaps.

The log_sync interface is used to copy the bitmaps
from kernel space to user space of VMM.

These operations are optional. If they are not implemented,
these operations will return EOPNOTSUPP.

Signed-off-by: jiangdongxu <jiangdongxu1@...wei.com>
---
 include/linux/vdpa.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index db1b0eaef4eb..985eed4f05b3 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -327,6 +327,15 @@ struct vdpa_map_file {
  * @unbind_mm:			Unbind the device from the address space
  *				bound using the bind_mm callback. (optional)
  *				@vdev: vdpa device
+ * @set_log_base		Set base address for logging. (optional)
+ *				@vdev: vdpa device
+ *				@base: base address
+ * @set_log_size		Set buffer size for logging. (optional)
+ *				@vdev: vdpa device
+ *				@size: logging buffer size
+ * @log_sync			Synchronize logging buffer from kernel space to
+ *				user space. (optional)
+ *				@vdev: vdpa device
  * @free:			Free resources that belongs to vDPA (optional)
  *				@vdev: vdpa device
  */
@@ -396,6 +405,11 @@ struct vdpa_config_ops {
 	int (*bind_mm)(struct vdpa_device *vdev, struct mm_struct *mm);
 	void (*unbind_mm)(struct vdpa_device *vdev);
 
+	/* Log ops */
+	int (*set_log_base)(struct vdpa_device *vdev, uint64_t base);
+	int (*set_log_size)(struct vdpa_device *vdev, uint64_t size);
+	int (*log_sync)(struct vdpa_device *vdev);
+
 	/* Free device resources */
 	void (*free)(struct vdpa_device *vdev);
 };
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ