Re: [PATCH V3 1/5] vhost: factor out IOTLB
From: Jason Wang <hidden>
Date: 2020-02-20 05:40:08
Also in:
kvm, lkml, virtualization
On 2020/2/20 下午12:04, Randy Dunlap wrote:
On 2/19/20 7:56 PM, Jason Wang wrote:quoted
This patch factors out IOTLB into a dedicated module in order to be reused by other modules like vringh. User may choose to enable the automatic retiring by specifying VHOST_IOTLB_FLAG_RETIRE flag to fit for the case of vhost device IOTLB implementation. Signed-off-by: Jason Wang <redacted> --- MAINTAINERS | 1 + drivers/vhost/Kconfig | 7 ++ drivers/vhost/Makefile | 2 + drivers/vhost/net.c | 2 +- drivers/vhost/vhost.c | 221 +++++++++++------------------------- drivers/vhost/vhost.h | 36 ++---- drivers/vhost/vhost_iotlb.c | 171 ++++++++++++++++++++++++++++ include/linux/vhost_iotlb.h | 45 ++++++++ 8 files changed, 304 insertions(+), 181 deletions(-) create mode 100644 drivers/vhost/vhost_iotlb.c create mode 100644 include/linux/vhost_iotlb.hHi, Sorry if you have gone over this previously:
Thanks for the review, it's really helpful.
quoted
diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig index 3d03ccbd1adc..eef634ff9a6e 100644 --- a/drivers/vhost/Kconfig +++ b/drivers/vhost/Kconfig@@ -36,6 +36,7 @@ config VHOST_VSOCK config VHOST tristate + select VHOST_IOTLB ---help--- This option is selected by any driver which needs to access the core of vhost.@@ -54,3 +55,9 @@ config VHOST_CROSS_ENDIAN_LEGACY adds some overhead, it is disabled by default. If unsure, say "N". + +config VHOST_IOTLB + tristate + default m"default m" should not be needed. Just make whatever needs it select it.
Yes, will fix. Thanks
quoted
+ help + Generic IOTLB implementation for vhost and vringh.