.
Fixes: 95fc87b44104 (vfio: Selective dirty page tracking if IOMMU backed
device pins pages)
Signed-off-by: Yan Zhao
---
drivers/vfio/vfio.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 5e6e0511b5aa..2f0fa272ebf2 100644
--- a/drivers/vfio
Signed-off-by: Yan Zhao
---
drivers/vfio/vfio_iommu_type1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index 5fbf0c1f7433..d0438388feeb 100644
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b/drivers/vfio/vfio_iom
when error occurs, need to put vfio group after a successful get.
Fixes: 95fc87b44104 (vfio: Selective dirty page tracking if IOMMU backed
device pins pages)
Signed-off-by: Yan Zhao
---
drivers/vfio/vfio.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/vfio
On Tue, Sep 15, 2020 at 01:30:11PM -0600, Alex Williamson wrote:
> On Tue, 15 Sep 2020 13:03:01 -0600
> Alex Williamson wrote:
>
> > On Tue, 15 Sep 2020 08:30:42 +0800
> > Yan Zhao wrote:
> >
> > > vfio_pin_pages() and vfio_group_pin_pages() are used purely
On Tue, Sep 15, 2020 at 11:06:01AM +0200, Cornelia Huck wrote:
> On Tue, 15 Sep 2020 08:28:35 +0800
> Yan Zhao wrote:
>
> > when error occurs, need to put vfio group after a successful get.
> >
> > Fixes: 95fc87b44104 (vfio: Selective dirty page tracking if IOMMU b
to only
singleton groups such that the IOMMU backend can consider dirty page
scope only at the group level. Implement the same requirement for the
vfio_group_pin_pages() interface.
Fixes: 95fc87b44104 ("vfio: Selective dirty page tracking if IOMMU backed
device pins pages")
Signed-off-by
when error occurs, need to put vfio group after a successful get.
Fixes: 95fc87b44104 ("vfio: Selective dirty page tracking if IOMMU backed
device pins pages")
Reviewed-by: Cornelia Huck
Signed-off-by: Yan Zhao
---
v2: updated the format of the Fixes: line. (Cornelia)
---
dr
;)
Signed-off-by: Yan Zhao
---
v2: updated the format of the Fixes: line.
---
drivers/vfio/vfio_iommu_type1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index 5fbf0c1f7433..d0438388feeb 100644
--- a/dr
On Fri, May 29, 2020 at 03:45:47PM -0600, Alex Williamson wrote:
> On Sun, 17 May 2020 22:52:45 -0400
> Yan Zhao wrote:
>
> > This is a virtual irq type.
> > vendor driver triggers this irq when it wants to notify userspace to
> > remap PCI BARs.
> >
>
On Mon, Jun 01, 2020 at 10:43:07AM -0600, Alex Williamson wrote:
> On Mon, 1 Jun 2020 02:57:26 -0400
> Yan Zhao wrote:
>
> > On Fri, May 29, 2020 at 03:45:47PM -0600, Alex Williamson wrote:
> > > On Sun, 17 May 2020 22:52:45 -0400
> > > Yan Zhao wrote:
>
On Wed, Jun 03, 2020 at 10:10:58PM -0600, Alex Williamson wrote:
> On Wed, 3 Jun 2020 22:42:28 -0400
> Yan Zhao wrote:
>
> > On Wed, Jun 03, 2020 at 05:04:52PM -0600, Alex Williamson wrote:
> > > On Tue, 2 Jun 2020 21:40:58 -0400
> > > Yan Zhao wrote:
> >
On Thu, Jun 04, 2020 at 05:01:06PM +0200, Cornelia Huck wrote:
> On Sun, 17 May 2020 22:45:10 -0400
> Yan Zhao wrote:
>
> > vendor modules call macro module_vfio_pci_register_vendor_handler to
> > generate module_init and module_exit.
> > It is necessary to ensure that
On Thu, Jun 04, 2020 at 05:25:15PM +0200, Cornelia Huck wrote:
> On Sun, 17 May 2020 22:49:44 -0400
> Yan Zhao wrote:
>
> > This allows a simpler VFIO_DEVICE_GET_INFO ioctl in vendor driver
> >
> > Cc: Kevin Tian
> > Signed-off-by: Yan Zhao
> &g
On Tue, Apr 28, 2020 at 10:14:37PM +0800, Dr. David Alan Gilbert wrote:
> * Yan Zhao (yan.y.z...@intel.com) wrote:
> > On Mon, Apr 27, 2020 at 11:37:43PM +0800, Dr. David Alan Gilbert wrote:
> > > * Yan Zhao (yan.y.z...@intel.com) wrote:
> > > > On Sat, Apr 25, 2020
On Wed, Apr 29, 2020 at 04:22:01PM +0800, Dr. David Alan Gilbert wrote:
> * Yan Zhao (yan.y.z...@intel.com) wrote:
> > On Tue, Apr 28, 2020 at 10:14:37PM +0800, Dr. David Alan Gilbert wrote:
> > > * Yan Zhao (yan.y.z...@intel.com) wrote:
> > > > On Mon, Apr 27, 2020
On Wed, Apr 29, 2020 at 05:48:44PM +0800, Dr. David Alan Gilbert wrote:
> > > > > > > > > > > > > An mdev type is meant to define a software compatible
> > > > > > > > > > > > > interface, so in
> > > > > > > > > > > > > the case of mdev->mdev migration, doesn't migrating
> > > > > > > > > > >
On Wed, Apr 29, 2020 at 10:13:01PM +0800, Eric Blake wrote:
> [meta-comment]
>
> On 4/29/20 4:35 AM, Yan Zhao wrote:
> > On Wed, Apr 29, 2020 at 04:22:01PM +0800, Dr. David Alan Gilbert wrote:
> [...]
> >>>>>>>>>>>>>
On Tue, Jun 04, 2019 at 03:29:32AM +0800, Alex Williamson wrote:
> On Thu, 30 May 2019 20:44:38 -0400
> Yan Zhao wrote:
>
> > This patchset introduces a migration_version attribute under sysfs of VFIO
> > Mediated devices.
> >
> > This migration_version att
part: https://www.spinics.net/lists/kernel/msg3337337.html.
qemu part: https://www.spinics.net/lists/kernel/msg3337337.html.
Tina Zhang (1):
vfio: Define device specific irq type capability
Yan Zhao (9):
vfio/pci: register/unregister vfio_pci_vendor_driver_ops
vfio/pci: macros to
vfio_pci_vendor_driver_ops includes two parts:
(1) .probe() and .remove() interface to be called by vfio_pci_probe()
and vfio_pci_remove().
(2) pointer to struct vfio_device_ops. It will be registered as ops of vfio
device if .probe() succeeds.
Suggested-by: Alex Williamson
Signed-off-by: Yan
() in its module_exit, vfio_pci may
hold a stale pointer to vendor module.
Cc: Kevin Tian
Suggested-by: Alex Williamson
Signed-off-by: Yan Zhao
---
include/linux/vfio.h | 27 +++
1 file changed, 27 insertions(+)
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
-by: Alex Williamson
Signed-off-by: Yan Zhao
---
drivers/vfio/pci/vfio_pci.c | 56 +++--
include/linux/vfio.h| 18
2 files changed, 66 insertions(+), 8 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index
This allows a simpler VFIO_DEVICE_GET_INFO ioctl in vendor driver
Cc: Kevin Tian
Signed-off-by: Yan Zhao
---
drivers/vfio/pci/vfio_pci.c | 23 +--
drivers/vfio/pci/vfio_pci_private.h | 2 ++
include/linux/vfio.h| 3 +++
3 files changed, 26
This allows vendor driver to read/write to bars directly which is useful
in security checking condition.
Cc: Kevin Tian
Signed-off-by: Yan Zhao
---
drivers/vfio/pci/vfio_pci_rdwr.c | 10 ++
include/linux/vfio.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers
From: Tina Zhang
Cap the number of irqs with fixed indexes and use capability chains
to chain device specific irqs.
v2:
- Irq capability index starts from 1.
Signed-off-by: Tina Zhang
Signed-off-by: Eric Auger
---
include/uapi/linux/vfio.h | 19 ++-
1 file changed, 18
VFs to guest
by calling to exported handlers from driver vfio-pci.
Cc: Shaopeng He
Signed-off-by: Yan Zhao
---
drivers/net/ethernet/intel/Kconfig| 10 ++
drivers/net/ethernet/intel/i40e/Makefile | 2 +
.../ethernet/intel/i40e/i40e_vf_migration.c | 165
rresponding qemu implementation from the reply of this
patch, and a sample usage in vendor driver in patch [10/10].
Cc: Kevin Tian
Signed-off-by: Yan Zhao
---
include/uapi/linux/vfio.h | 11 +++
1 file changed, 11 insertions(+)
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
in
:
[1] kernel v17: https://patchwork.kernel.org/cover/11466129/
[2] qemu v16: https://patchwork.kernel.org/cover/11456557/
Cc: Shaopeng He
Signed-off-by: Yan Zhao
---
.../ethernet/intel/i40e/i40e_vf_migration.c | 429 +-
.../ethernet/intel/i40e/i40e_vf_migration.h | 34 ++
2
resources to vendor defined
irqs.
Cc: Kevin Tian
Cc: Shaopeng He
Signed-off-by: Yan Zhao
---
drivers/net/ethernet/intel/Kconfig| 2 +-
.../ethernet/intel/i40e/i40e_vf_migration.c | 322 +-
.../ethernet/intel/i40e/i40e_vf_migration.h | 26 ++
3 files ch
] "vfio: Add a funtion to return a specific irq capabilities"
[1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg621645.html
Signed-off-by: Yan Zhao
---
hw/vfio/common.c | 50
hw/vfio/pci.c | 90 +
On Fri, Jun 05, 2020 at 03:39:50PM +0100, Dr. David Alan Gilbert wrote:
> > > > I tried to simplify the problem a bit, but we keep going backwards. If
> > > > the requirement is that potentially any source device can migrate to any
> > > > target device and we cannot provide any means other than
On Fri, Jun 05, 2020 at 10:13:01AM -0600, Alex Williamson wrote:
> On Thu, 4 Jun 2020 22:02:31 -0400
> Yan Zhao wrote:
>
> > On Wed, Jun 03, 2020 at 10:10:58PM -0600, Alex Williamson wrote:
> > > On Wed, 3 Jun 2020 22:42:28 -0400
> > > Yan Zhao wrote:
> >
On Wed, Jun 10, 2020 at 04:59:43PM +0800, Xiang Zheng wrote:
> Hi Yan,
>
> few nits below...
>
> On 2020/5/18 10:53, Yan Zhao wrote:
> > This driver intercepts all device operations as long as it's probed
> > successfully by vfio-pci driver.
> >
> >
e current mm first as
> the kthread may hold a mm struct atm and it's not the right place
> to switch mm.
>
> Fixes: 8d46c0cca5f4 ("vfio: introduce vfio_dma_rw to read/write a range of
> IOVAs")
> Cc: Yan Zhao
> Cc: Markus Elfring
> Cc: Christoph Hellwig
> Sig
On Fri, Jun 19, 2020 at 04:40:46PM -0600, Alex Williamson wrote:
> On Tue, 9 Jun 2020 20:37:31 -0400
> Yan Zhao wrote:
>
> > On Fri, Jun 05, 2020 at 03:39:50PM +0100, Dr. David Alan Gilbert wrote:
> > > > > > I tried to simplify the problem a
On Fri, Jun 19, 2020 at 04:55:34PM -0600, Alex Williamson wrote:
> On Wed, 10 Jun 2020 01:23:14 -0400
> Yan Zhao wrote:
>
> > On Fri, Jun 05, 2020 at 10:13:01AM -0600, Alex Williamson wrote:
> > > On Thu, 4 Jun 2020 22:02:31 -0400
> > > Yan Zhao wrote:
>
On Thu, Jun 11, 2020 at 01:31:05PM +0100, David Edmondson wrote:
> On Thursday, 2020-06-04 at 22:15:42 -04, Yan Zhao wrote:
>
> > On Thu, Jun 04, 2020 at 05:25:15PM +0200, Cornelia Huck wrote:
> >> On Sun, 17 May 2020 22:49:44 -0400
> >> Yan Zhao wrote:
>
On Thu, Jun 11, 2020 at 10:27:34AM +0800, Xiang Zheng wrote:
>
>
> On 2020/6/11 8:23, Yan Zhao wrote:
> > On Wed, Jun 10, 2020 at 04:59:43PM +0800, Xiang Zheng wrote:
> >> Hi Yan,
> >>
> >> few nits below...
> >>
> >> On 2020/5/18 10
On Tue, Jun 02, 2020 at 01:34:35PM -0600, Alex Williamson wrote:
> I'm not at all happy with this. Why do we need to hide the migration
> sparse mmap from the user until migration time? What if instead we
> introduced a new VFIO_REGION_INFO_CAP_SPARSE_MMAP_SAVING capability
> where the existing
On Tue, Jun 02, 2020 at 04:55:27PM -0600, Alex Williamson wrote:
> On Wed, 29 Apr 2020 20:39:50 -0400
> Yan Zhao wrote:
>
> > On Wed, Apr 29, 2020 at 05:48:44PM +0800, Dr. David Alan Gilbert wrote:
> >
> > > > > > > > > > &
On Tue, Jun 02, 2020 at 09:55:28PM -0600, Alex Williamson wrote:
> On Tue, 2 Jun 2020 23:19:48 -0400
> Yan Zhao wrote:
>
> > On Tue, Jun 02, 2020 at 04:55:27PM -0600, Alex Williamson wrote:
> > > On Wed, 29 Apr 2020 20:39:50 -0400
> > > Yan Zhao wrote:
>
On Wed, Jun 03, 2020 at 05:04:52PM -0600, Alex Williamson wrote:
> On Tue, 2 Jun 2020 21:40:58 -0400
> Yan Zhao wrote:
>
> > On Tue, Jun 02, 2020 at 01:34:35PM -0600, Alex Williamson wrote:
> > > I'm not at all happy with this. Why do we need to hide the migratio
On Wed, Apr 24, 2019 at 10:14:50PM +0800, Alex Williamson wrote:
> On Tue, 23 Apr 2019 23:39:34 -0400
> Yan Zhao wrote:
>
> > On Tue, Apr 23, 2019 at 11:02:56PM +0800, Alex Williamson wrote:
> > > On Tue, 23 Apr 2019 01:41:57 -0400
> > > Yan Zhao wrote:
>
On Tue, Apr 30, 2019 at 11:29:08PM +0800, Cornelia Huck wrote:
> On Wed, 24 Apr 2019 04:15:58 -0400
> Yan Zhao wrote:
>
> > On Wed, Apr 24, 2019 at 03:56:24PM +0800, Cornelia Huck wrote:
> > > On Tue, 23 Apr 2019 23:10:37 -0400
> > > Yan Zhao wrote:
> >
On Mon, May 06, 2019 at 03:41:58PM +0800, Zhenyu Wang wrote:
> On 2019.05.06 11:20:32 +0800, Zhenyu Wang wrote:
> > On 2019.05.05 21:51:02 -0400, Yan Zhao wrote:
> > > This feature implements the version attribute for Intel's vGPU mdev
> > > devices.
> > >
>
and
check device compatibility in vendor driver.
Yan Zhao (2):
vfio/mdev: add version field as mandatory attribute for mdev device
drm/i915/gvt: export mdev device version to sysfs for Intel vGPU
Documentation/vfio-mediated-device.txt| 36 +
drivers/gpu/drm/i915/gvt/Makefile
On Tue, May 14, 2019 at 11:01:42PM +0800, Alex Williamson wrote:
> On Tue, 14 May 2019 09:43:44 +0200
> Erik Skultety wrote:
>
> > On Tue, May 14, 2019 at 03:32:19AM -0400, Yan Zhao wrote:
> > > On Tue, May 14, 2019 at 03:20:40PM +0800, Erik Skultety wrote:
> >
STATE_RUNNING
|
(vcpu stops) --> set device state --> VFIO_DEVICE_STATE_STOP
|
MIGRATION_STATUS_ACTIVE
|
.load state callback -->
set device memory size, set device memory buffer, set device config size,
set device config buffer
|
(vcpu starts) --> set device state --> VFIO_D
From: Yulei Zhang
Apply guest to host gma conversion while guest try to access the
GTT mmio registers, as after enable live migration the host gma
will be changed due to the resourece re-allocation, but guest
gma should be remaining unchanged, thus g2h conversion is request
for it.
From: Yulei Zhang
Adjust the graphics memory address in gpu commands according to
the shift offset in guests' aperture and hidden gm address, and patch
the commands before submit to execute.
Signed-off-by: Yulei Zhang
---
drivers/gpu/drm/i915/gvt/cmd_parser.c | 31 ---
From: Yulei Zhang
As after migration the host gm base address will be changed due
to resource re-allocation, in order to make sure the guest gm
address doesn't change with that to retrieve the guest gm base
address from PVINFO.
Signed-off-by: Yulei Zhang
Signed-off-by: Zhenyu Wang
---
From: Yulei Zhang
Apply the guest to host gma conversion while guest config the
fence mmio registers due to the host gma change after the migration.
Signed-off-by: Yulei Zhang
---
drivers/gpu/drm/i915/gvt/aperture_gm.c | 6 --
drivers/gpu/drm/i915/gvt/gvt.h | 14 ++
2
From: Yulei Zhang
As guest gm aperture region start offset is initialized when vGPU created,
in order to make sure that start offset is remain the same after migration,
align the aperture start offset to 0 for guest.
Signed-off-by: Yulei Zhang
Signed-off-by: Zhenyu Wang
---
From: Yulei Zhang
Adjust the buffer start gma in dmabuf for display in host domain.
Signed-off-by: Yulei Zhang
---
drivers/gpu/drm/i915/gvt/dmabuf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c
b/drivers/gpu/drm/i915/gvt/dmabuf.c
index
Zhang
Signed-off-by: Xiao Zheng
Signed-off-by: Zhenyu Wang
Signed-off-by: Yan Zhao
---
drivers/gpu/drm/i915/gvt/Makefile | 2 +-
drivers/gpu/drm/i915/gvt/execlist.c | 2 +-
drivers/gpu/drm/i915/gvt/gtt.c | 2 +-
drivers/gpu/drm/i915/gvt/gtt.h | 3 +
drivers/gpu/drm/i915/gvt
s
region dirty bitmap. Userspace VFIO can directly read dirty bitmap from
mmaped region or through this region's read/write handlers.
Signed-off-by: Yan Zhao
Signed-off-by: Kevin Tian
Signed-off-by: Yulei Zhang
---
drivers/gpu/drm/i915/gvt/gvt.h | 3 +
drivers/gpu/drm/i915/gvt/kvmgt
On Wed, Jan 31, 2024 at 12:48:38PM +0100, Arnd Bergmann wrote:
> On Wed, Jan 31, 2024, at 06:51, Yan Zhao wrote:
> > This is a tiny fix to pfn_to_virt() for some platforms.
> >
> > The original implementaion of pfn_to_virt() takes PFN instead of PA as the
> > input to
On Thu, Feb 01, 2024 at 06:46:46AM +0100, Arnd Bergmann wrote:
> On Thu, Feb 1, 2024, at 01:01, Yan Zhao wrote:
> > On Wed, Jan 31, 2024 at 12:48:38PM +0100, Arnd Bergmann wrote:
> >> On Wed, Jan 31, 2024, at 06:51, Yan Zhao wrote:
> >>
> >> How exactly did
including it.
Link:https://lore.kernel.org/all/20240131055159.2506-1-yan.y.z...@intel.com [1]
Cc: Linus Walleij
Suggested-by: Arnd Bergmann
Signed-off-by: Yan Zhao
---
arch/csky/include/asm/page.h | 5 -
arch/hexagon/include/asm/page.h | 6 --
arch/openrisc/include/asm/page.h | 5
On Fri, Feb 02, 2024 at 08:04:34AM +0100, Arnd Bergmann wrote:
> On Fri, Feb 2, 2024, at 02:02, Yan Zhao wrote:
> > On Thu, Feb 01, 2024 at 06:46:46AM +0100, Arnd Bergmann wrote:
> >>
> >> I think it's fair to assume we won't need asm-generic/page.h any
> >> mo
Apply the page shift to PFN to get physical address for final VA.
The macro __va should take physical address instead of PFN as input.
Fixes: c1884e1e1164 ("csky: Make pfn accessors static inlines")
Signed-off-by: Yan Zhao
---
arch/csky/include/asm/page.h | 2 +-
1 file changed, 1
Apply the page shift to PFN to get physical address for final VA.
The macro __va should take physical address instead of PFN as input.
Fixes: 2d78057f0dd4 ("asm-generic/page.h: Make pfn accessors static inlines")
Signed-off-by: Yan Zhao
---
include/asm-generic/page.h | 2 +-
1 file
Apply the page shift to PFN to get physical address for final VA.
The macro __va should take physical address instead of PFN as input.
Fixes: 232ba1630c66 ("openrisc: Make pfn accessors statics inlines")
Signed-off-by: Yan Zhao
---
arch/openrisc/include/asm/page.h | 2 +-
1 file
Apply the page shift to PFN to get physical address for final VA.
The macro __va should take physical address instead of PFN as input.
Fixes: d6e81532b10d ("Hexagon: Make pfn accessors statics inlines")
Signed-off-by: Yan Zhao
---
arch/hexagon/include/asm/page.h | 2 +-
1 file
This is a tiny fix to pfn_to_virt() for some platforms.
The original implementaion of pfn_to_virt() takes PFN instead of PA as the
input to macro __va, with PAGE_SHIFT applying to the converted VA, which
is not right under most conditions, especially when there's an offset in
__va.
Yan Zhao (4
On Thu, Feb 29, 2024 at 02:34:35PM +0100, Linus Walleij wrote:
> On Wed, Jan 31, 2024 at 7:27 AM Yan Zhao wrote:
>
> > Apply the page shift to PFN to get physical address for final VA.
> > The macro __va should take physical address instead of PFN as input.
> >
>
66 matches
Mail list logo