[Intel-gfx] [PATCH v2 05/14] kvm/vfio: Accept vfio device file from userspace

2023-02-06 Thread Yi Liu
This defines KVM_DEV_VFIO_FILE* and make alias with KVM_DEV_VFIO_GROUP*. Old userspace uses KVM_DEV_VFIO_GROUP* works as well. Signed-off-by: Yi Liu --- Documentation/virt/kvm/devices/vfio.rst | 40 ++--- include/uapi/linux/kvm.h| 16 +++---

[Intel-gfx] [PATCH v2 06/14] vfio: Pass struct vfio_device_file * to vfio_device_open/close()

2023-02-06 Thread Yi Liu
This avoids passing too much parameters in multiple functions. Signed-off-by: Yi Liu --- drivers/vfio/group.c | 19 +-- drivers/vfio/vfio.h | 8 drivers/vfio/vfio_main.c | 25 +++-- 3 files changed, 32 insertions(+), 20 deletions(-) diff

[Intel-gfx] [PATCH v2 04/14] kvm/vfio: Rename kvm_vfio_group to prepare for accepting vfio device fd

2023-02-06 Thread Yi Liu
Meanwhile, rename related helpers. No functional change is intended. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Reviewed-by: Eric Auger --- virt/kvm/vfio.c | 115 1 file changed, 58 insertions(+), 57 deletions(-) diff --git

[Intel-gfx] [PATCH v2 03/14] vfio: Accept vfio device file in the driver facing kAPI

2023-02-06 Thread Yi Liu
This makes the vfio file kAPIs to accepte vfio device files, also a preparation for vfio device cdev support. For the kvm set with vfio device file, kvm pointer is stored in struct vfio_device_file, and use kvm_ref_lock to protect kvm set and kvm pointer usage within VFIO. This kvm pointer will

[Intel-gfx] [PATCH v2 02/14] vfio: Refine vfio file kAPIs

2023-02-06 Thread Yi Liu
This prepares for making the below kAPIs to accept both group file and device file instead of only vfio group file. bool vfio_file_enforced_coherent(struct file *file); void vfio_file_set_kvm(struct file *file, struct kvm *kvm); bool vfio_file_has_dev(struct file *file, struct vfio_device

[Intel-gfx] [PATCH v2 01/14] vfio: Allocate per device file structure

2023-02-06 Thread Yi Liu
This is preparation for adding vfio device cdev support. vfio device cdev requires: 1) a per device file memory to store the kvm pointer set by KVM. It will be propagated to vfio_device:kvm after the device cdev file is bound to an iommufd 2) a mechanism to block device access through device

[Intel-gfx] [PATCH v2 00/14] Add vfio_device cdev for iommufd support

2023-02-06 Thread Yi Liu
Existing VFIO provides group-centric user APIs for userspace. Userspace opens the /dev/vfio/$group_id first before getting device fd and hence getting access to device. This is not the desired model for iommufd. Per the conclusion of community discussion[1], iommufd provides device-centric kAPIs

[Intel-gfx] [PATCH v3] drm/i915: add guard page to ggtt->error_capture

2023-02-06 Thread Andrzej Hajda
Write-combining memory allows speculative reads by CPU. ggtt->error_capture is WC mapped to CPU, so CPU/MMU can try to prefetch memory beyond the error_capture, ie it tries to read memory pointed by next PTE in GGTT. If this PTE points to invalid address DMAR errors will occur. This behaviour was

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Add another EHL pci id

2023-02-06 Thread Patchwork
== Series Details == Series: drm/i915: Add another EHL pci id URL : https://patchwork.freedesktop.org/series/113691/ State : success == Summary == CI Bug Log - changes from CI_DRM_12697_full -> Patchwork_113691v1_full Summary ---

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: add guard page to ggtt->error_capture (rev3)

2023-02-06 Thread Andrzej Hajda
On 03.02.2023 17:35, Patchwork wrote: *Patch Details* *Series:* drm/i915: add guard page to ggtt->error_capture (rev3) *URL:* https://patchwork.freedesktop.org/series/113560/ *State:*failure *Details:*

<    1   2