From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 1/5] Revert "vfio: revert "iommu driver notify callback""
Date: Fri, 23 Oct 2026 19:53:39 +0300 [thread overview]
Message-ID: <20261023165343.503945-2-andrey.drobyshev@virtuozzo.com> (raw)
In-Reply-To: <20261023165343.503945-1-andrey.drobyshev@virtuozzo.com>
From: Anthony Yznaga <anthony.yznaga@oracle.com>
This reverts commit e592296cd6e15ddeebe4c8411365c550da65c8bf.
This is needed in order to re-enable support for using VFIO_UPDATE_VADDR
with vfio mediated devices which is needed to fully support Live Update.
Orabug: 35370252
Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Reviewed-by: Steve Sistare <steven.sistare@oracle.com>
https://virtuozzo.atlassian.net/browse/VSTOR-150595
(cherry picked from commit 698288d494ff9be37b208daf89ea163378a23253)
---
drivers/vfio/container.c | 5 +++++
drivers/vfio/vfio.h | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/drivers/vfio/container.c b/drivers/vfio/container.c
index d53d08f16973..849785b533ce 100644
--- a/drivers/vfio/container.c
+++ b/drivers/vfio/container.c
@@ -376,6 +376,11 @@ static int vfio_fops_open(struct inode *inode, struct file *filep)
static int vfio_fops_release(struct inode *inode, struct file *filep)
{
struct vfio_container *container = filep->private_data;
+ struct vfio_iommu_driver *driver = container->iommu_driver;
+
+ if (driver && driver->ops->notify)
+ driver->ops->notify(container->iommu_data,
+ VFIO_IOMMU_CONTAINER_CLOSE);
filep->private_data = NULL;
diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h
index 50128da18bca..a9adfe2242d8 100644
--- a/drivers/vfio/vfio.h
+++ b/drivers/vfio/vfio.h
@@ -196,6 +196,11 @@ static inline bool vfio_device_is_noiommu(struct vfio_device *vdev)
#endif /* CONFIG_VFIO_GROUP */
#if IS_ENABLED(CONFIG_VFIO_CONTAINER)
+/* events for the backend driver notify callback */
+enum vfio_iommu_notify_type {
+ VFIO_IOMMU_CONTAINER_CLOSE = 0,
+};
+
/**
* struct vfio_iommu_driver_ops - VFIO IOMMU driver callbacks
*/
@@ -226,6 +231,8 @@ struct vfio_iommu_driver_ops {
void *data, size_t count, bool write);
struct iommu_domain *(*group_iommu_domain)(void *iommu_data,
struct iommu_group *group);
+ void (*notify)(void *iommu_data,
+ enum vfio_iommu_notify_type event);
};
struct vfio_iommu_driver {
--
2.47.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-23 16:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 16:53 [Devel] [PATCH hci-8.1 0/5] Support VM migration with mdev vGPUs Andrey Drobyshev
2026-10-23 16:53 ` Andrey Drobyshev [this message]
2026-10-23 16:53 ` [Devel] [PATCH hci-8.1 2/5] Revert "vfio/type1: revert "implement notify callback"" Andrey Drobyshev
2026-10-23 16:53 ` [Devel] [PATCH hci-8.1 3/5] Revert "vfio/type1: revert "block on invalid vaddr"" Andrey Drobyshev
2026-10-23 16:53 ` [Devel] [PATCH hci-8.1 4/5] Revert "vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR" Andrey Drobyshev
2026-10-23 16:53 ` [Devel] [PATCH hci-8.1 5/5] mm: allow MADV_DOEXEC on a VFIO mapping not faulted in yet Andrey Drobyshev
2026-10-27 15:48 ` [Devel] [PATCH hci-8.1 0/5] Support VM migration with mdev vGPUs Andrey Drobyshev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261023165343.503945-2-andrey.drobyshev@virtuozzo.com \
--to=andrey.drobyshev@virtuozzo.com \
--cc=devel@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.