Re: [RESEND 1/2] drm/i915/gvt: stop using drm_edid_block_valid()

2024-08-13 Thread Zhenyu Wang
ODO comment about EDID extension block support. > > Acked-by: Zhi Wang > Signed-off-by: Jani Nikula > Looks fine to me. Feel free to merge. Reviewed-by: Zhenyu Wang > --- > > Cc: Zhenyu Wang > Cc: Zhi Wang > Cc: intel-gvt-...@lists.freedesktop.org > C

Re: [PULL] gvt-fixes

2024-02-04 Thread Zhenyu Wang
gvt-fixes-2024-02-05 - Fix broken gvt doc link (Zhenyu) - Fix one uninitialized variable bug in warning (Dan) - Update Zhi's new email address in MAINTAINERS file. (Zhi) Dan Carpenter (1): drm/i915/gvt:

[PULL] gvt-fixes

2024-01-31 Thread Zhenyu Wang
NERS file. (Zhi) Dan Carpenter (1): drm/i915/gvt: Fix uninitialized variable in handle_mmio() Zhenyu Wang (1): drm/i915: Replace dead 01.org link Zhi Wang (1): MAINTAINERS: Update Zhi Wang's email address MAINTAINERS | 4 ++--

Re: [PATCH] drm/i915/gvt: Fix uninitialized variable in handle_mmio()

2024-01-28 Thread Zhenyu Wang
quot;, > - info->offset); > + WARN(1, "dup mmio definition offset %x\n", i); > > /* We return -EEXIST here to make GVT-g load fail. >* So duplicated MMIO can be found as soon as > -- > 2.43.0 > Thanks for the fix. Reviewed-by: Zhenyu Wang signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH v2 1/4] i915: make inject_virtual_interrupt() void

2023-11-22 Thread Zhenyu Wang
tus)) > - return -ESRCH; > - if (vgpu->msi_trigger && eventfd_signal(vgpu->msi_trigger, 1) != 1) > - return -EFAULT; > - return 0; > + return; > + if (!vgpu->msi_trigger) > + return; > + eventfd_signal(v

Re: [Intel-gfx] [PATCH 1/4] drm/i915/gvt: remove unused to_gvt() and reduce includes

2023-10-11 Thread Zhenyu Wang
On 2023.10.11 10:04:09 +0300, Jani Nikula wrote: > On Wed, 11 Oct 2023, Zhenyu Wang wrote: > > On 2023.10.04 15:54:11 +0300, Jani Nikula wrote: > >> On Tue, 26 Sep 2023, Jani Nikula wrote: > >> > gvt.h has no need to include i915_drv.h once the unused to

Re: [Intel-gfx] [PATCH 1/4] drm/i915/gvt: remove unused to_gvt() and reduce includes

2023-10-10 Thread Zhenyu Wang
reply, as last week was full holiday here. Reviewed-by: Zhenyu Wang I don't think I need to do extra pick and pull request for this or let me know if you has question. Thanks! > > > > > --- > > drivers/gpu/drm/i915/gvt/gvt.h | 7 +-- > > 1 file changed,

[Intel-gfx] [PATCH] drm/i915: Replace dead 01.org link

2023-08-03 Thread Zhenyu Wang
01.org is dead so replace old gvt link with current wiki page. Signed-off-by: Zhenyu Wang --- MAINTAINERS | 2 +- drivers/gpu/drm/i915/Kconfig | 2 +- drivers/gpu/drm/i915/intel_gvt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b

[Intel-gfx] [PULL] gvt-fixes

2023-08-01 Thread Zhenyu Wang
Hi, Here is one gvt fix for bug in AUX CH register message length get. Please help to pick. Thanks! -- The following changes since commit e354f67733115b4453268f61e6e072e9b1ea7a2f: drm/i915: Fix an error handling path in igt_write_huge() (2023-07-25 08:38:12 +0100) are available in the Git r

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix bug in getting msg length in AUX CH registers handler

2023-07-31 Thread Zhenyu Wang
lates the msg_length from reg type and yields below > warning in intel_gvt_i2c_handle_aux_ch_write(): > "i915 :00:02.0: drm_WARN_ON(msg_length != 4)". > > Fixes: 0cad796a2269 ("drm/i915: Use REG_BIT() & co. for AUX CH registers") > Signed-off-by: Yan Zhao &

Re: [Intel-gfx] [PATCH RESEND] drm/i915/gvt: remove unused variable gma_bottom in command parser

2023-06-07 Thread Zhenyu Wang
On 2023.05.31 12:27:11 +0300, Jani Nikula wrote: > On Wed, 31 May 2023, Zhenyu Wang wrote: > > On 2023.05.31 02:04:11 +, Zhi Wang wrote: > >> Remove unused variable gma_bottom in scan_workload() and scan_wa_ctx(). > >> commit be1da7070aea ("drm/i915/gvt: v

Re: [Intel-gfx] [PATCH RESEND] drm/i915/gvt: remove unused variable gma_bottom in command parser

2023-05-30 Thread Zhenyu Wang
xes: be1da7070aea ("drm/i915/gvt: vGPU command scanner") > Suggested-by: Jani Nikula > Cc: Zhenyu Wang > Cc: intel-gvt-...@lists.freedesktop.org > Signed-off-by: Zhi Wang > --- Good with me. I think I also caught this before but never send the change.. Reviewed-by: Zhen

[Intel-gfx] [PULL] gvt-next-fixes

2023-04-28 Thread Zhenyu Wang
Hi, Here's one single change for gvt to use idr based dmabuf object reference instead of old adhoc code. We've verified no regression for internal test. Thanks. -- The following changes since commit d944eafed618a8507270b324ad9d5405bb7f0b3e: drm/i915: Check pipe source size when using skl+ sca

Re: [Intel-gfx] [PATCH v2] drm/i915/gvt: Make use of idr_find and idr_for_each_entry in dmabuf

2023-03-08 Thread Zhenyu Wang
related > 3.Add '&& !idr_is_empty()' like the original code '&& !list_empty()' Looks good to me. I'll send it for some regression test before upstream. Reviewed-by: Zhenyu Wang Thanks! > > v1 link: > > https://lore.kernel.o

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Make use of idr_find and idr_for_each_entry in dmabuf

2023-03-02 Thread Zhenyu Wang
On 2023.03.02 19:53:18 +0800, Cai Huoqing wrote: > This patch uses the already existing IDR mechanism to simplify > and improve the dmabuf code. > > Using 'vgpu.object_idr' directly instead of 'dmabuf_obj_list_head' > or 'dmabuf.list', because the dmabuf_obj can be found by 'idr_find' > or 'idr_fo

[Intel-gfx] [PULL] gvt-next-fixes

2023-02-23 Thread Zhenyu Wang
Hi, This is what are on gvt tree now for next kernel, including fixes for gvt debugfs, one kconfig symbol fix for menu presentation and misc typo fixes. Please check details below. This is generated against current drm-intel-next-fixes. Thanks! -- The following changes since commit 8038510b1fe44

Re: [Intel-gfx] [PATCH][next] i915/gvt: Fix spelling mistake "vender" -> "vendor"

2023-02-22 Thread Zhenyu Wang
mem = (fw->data + h->cfg_space_offset); > > id = *(u16 *)(mem + PCI_VENDOR_ID); > - VERIFY("vender id", id, pdev->vendor); > + VERIFY("vendor id", id, pdev->vendor); > > id = *(u16 *)(mem + PCI_DEVICE_ID); > VERIFY(&

Re: [Intel-gfx] [PATCH] i915: fix memory leak with using debugfs_lookup()

2023-02-22 Thread Zhenyu Wang
, just > > call debugfs_lookup_and_remove() instead which handles all of the logic > > at once. > > > > Cc: Zhenyu Wang > > Cc: Zhi Wang > > Cc: Jani Nikula > > Cc: Joonas Lahtinen > > Cc: Rodrigo Vivi > > Cc: Tvrtko Ursulin > > Cc: David Airlie

Re: [Intel-gfx] [PATCH] drm/i915: move a Kconfig symbol to unbreak the menu presentation

2023-02-19 Thread Zhenyu Wang
On 2023.02.16 22:32:33 -0800, Randy Dunlap wrote: > Hi, > > On 2/16/23 17:52, Zhenyu Wang wrote: > > On 2023.02.14 20:45:33 -0800, Randy Dunlap wrote: > >> Inserting a Kconfig symbol that does not have a dependency (DRM_I915_GVT) > >> into a list of other symb

Re: [Intel-gfx] [PATCH] drm/i915: move a Kconfig symbol to unbreak the menu presentation

2023-02-16 Thread Zhenyu Wang
ot;) > Signed-off-by: Randy Dunlap > Cc: Christoph Hellwig > Cc: Zhi Wang > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Rodrigo Vivi > Cc: Tvrtko Ursulin > Cc: Zhenyu Wang > Cc: intel-gfx@lists.freedesktop.org > Cc: intel-gvt-...@lists.freedesktop.org > Cc: d

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gvt: Avoid full proxy f_ops for vgpu_status debug attributes

2023-01-19 Thread Zhenyu Wang
On 2023.01.19 17:05:56 -0500, Rodrigo Vivi wrote: > > It still doesn't apply in drm-intel-next. > Could you please take it through your branch? > sure, I'll pick it. signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH 03/27] drm/i915/gvt: Incorporate KVM memslot info into check for 2MiB GTT entry

2023-01-18 Thread Zhenyu Wang
On 2023.01.11 17:55:04 +, Sean Christopherson wrote: > On Mon, Jan 09, 2023, Yan Zhao wrote: > > On Fri, Jan 06, 2023 at 11:01:53PM +, Sean Christopherson wrote: > > > On Fri, Jan 06, 2023, Yan Zhao wrote: > > > > On Thu, Jan 05, 2023 at 05:40:32PM +, Sean Christopherson wrote: > > > >

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Remove extra semicolon

2023-01-18 Thread Zhenyu Wang
gpu *vgpu, > ret = idr_alloc(&gvt->vgpu_idr, vgpu, IDLE_VGPU_IDR + 1, GVT_MAX_VGPU, > GFP_KERNEL); > if (ret < 0) > - goto out_unlock;; > + goto out_unlock; > > vgpu->id = ret; > vgpu->sched_ctl.we

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gvt: Avoid full proxy f_ops for vgpu_status debug attributes

2023-01-18 Thread Zhenyu Wang
On 2023.01.18 11:44:55 -0500, Rodrigo Vivi wrote: > On Wed, Jan 18, 2023 at 10:18:11AM +0530, Deepak R Varma wrote: > > On Tue, Jan 17, 2023 at 02:29:37PM -0500, Rodrigo Vivi wrote: > > > On Mon, Jan 16, 2023 at 01:44:46PM +0800, Zhenyu Wang wrote: > > > > On 2023

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gvt: Avoid full proxy f_ops for vgpu_status debug attributes

2023-01-15 Thread Zhenyu Wang
ess they ack and I apply in the drm-intel along with the other > ones. > yeah, they're fine with me, feel free to apply them directly. Acked-by: Zhenyu Wang thanks! > > --- > > drivers/gpu/drm/i915/gvt/debugfs.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 d

Re: [Intel-gfx] [PULL] gvt-fixes

2023-01-04 Thread Zhenyu Wang
On 2023.01.04 06:34:28 -0500, Rodrigo Vivi wrote: > On Wed, Jan 04, 2023 at 04:05:13PM +0800, Zhenyu Wang wrote: > > > > Hi, > > > > Here's accumulated current gvt-fixes. Several of them handle > > for error or destroy path issues and one from Zhi t

[Intel-gfx] [PULL] gvt-fixes

2023-01-04 Thread Zhenyu Wang
c bit flag for vgpu status Dan Carpenter (1): drm/i915: unpin on error in intel_vgpu_shadow_mm_pin() Zheng Wang (1): drm/i915/gvt: fix double free bug in split_2MB_gtt_entry Zhenyu Wang (3): drm/i915/gvt: fix gvt de

Re: [Intel-gfx] [PATCH v5] drm/i915/gvt: fix double free bug in split_2MB_gtt_entry

2022-12-20 Thread Zhenyu Wang
_pte(sub_spt, &sub_se); > + } > + /* Release the new allocated spt. */ > + trace_spt_change(sub_spt->vgpu->id, "release", sub_spt, > + sub_spt->guest_page.gfn, sub_spt->shadow_page.type); > + ppgtt_free_spt(sub_spt); > + sub_spt =

Re: [Intel-gfx] [PATCH] [next] i915/gvt: Replace one-element array with flexible-array member

2022-12-20 Thread Zhenyu Wang
nsigned char data[]; > }; > > #define dev_to_drm_minor(d) dev_get_drvdata((d)) > @@ -77,7 +77,7 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt) > unsigned long size, crc32_start; > int ret; > > - size = sizeof(*h) + info->mmio_size + info->cfg

Re: [Intel-gfx] [RESEND PATCH v4] drm/i915/gvt: fix double free bug in split_2MB_gtt_entry

2022-12-20 Thread Zhenyu Wang
On 2022.12.19 20:52:04 +0800, Zheng Wang wrote: > If intel_gvt_dma_map_guest_page failed, it will call > ppgtt_invalidate_spt, which will finally free the spt. But the caller does > not notice that, it will free spt again in error path. > It's not clear from this description which caller is actu

Re: [Intel-gfx] [PATCH] drm/i915: unpin on error in intel_vgpu_shadow_mm_pin()

2022-11-24 Thread Zhenyu Wang
oad->shadow_mm); > gvt_vgpu_err("workload shadow ppgtt isn't ready\n"); > return -EINVAL; > } > -- Thanks, Dan. Looks fine to me. Reviewed-by: Zhenyu Wang signature.asc Description: PGP signature

Re: [Intel-gfx] [PULL] gvt-fixes

2022-11-21 Thread Zhenyu Wang
ping for this fix pull... On 2022.11.11 17:02:08 +0800, Zhenyu Wang wrote: > Hi, > > Here's two fixes from Sean for 6.1 kernel, which is to fix kvm > reference in gvt. No regression found in our test. > > Thanks! > --- > The f

Re: [Intel-gfx] [PULL] gvt-next

2022-11-16 Thread Zhenyu Wang
On 2022.11.17 03:37:17 +, Vivi, Rodrigo wrote: > On Thu, 2022-11-17 at 11:02 +0800, Zhenyu Wang wrote: > > On 2022.11.15 10:36:59 -0500, Rodrigo Vivi wrote: > > > On Fri, Nov 11, 2022 at 04:59:03PM +0800, Zhenyu Wang wrote: > > > > Hi, > > > > > &g

Re: [Intel-gfx] [PULL] gvt-next

2022-11-16 Thread Zhenyu Wang
On 2022.11.17 03:37:17 +, Vivi, Rodrigo wrote: > On Thu, 2022-11-17 at 11:02 +0800, Zhenyu Wang wrote: > > On 2022.11.15 10:36:59 -0500, Rodrigo Vivi wrote: > > > On Fri, Nov 11, 2022 at 04:59:03PM +0800, Zhenyu Wang wrote: > > > > Hi, > > > > > &g

Re: [Intel-gfx] [PULL] gvt-next

2022-11-16 Thread Zhenyu Wang
On 2022.11.15 10:36:59 -0500, Rodrigo Vivi wrote: > On Fri, Nov 11, 2022 at 04:59:03PM +0800, Zhenyu Wang wrote: > > Hi, > > > > Here's current accumulated changes in gvt-next. Sorry that I delayed > > to refresh them on time for upstream...It contains mostly kern

[Intel-gfx] [PULL] gvt-fixes

2022-11-11 Thread Zhenyu Wang
Hi, Here's two fixes from Sean for 6.1 kernel, which is to fix kvm reference in gvt. No regression found in our test. Thanks! --- The following changes since commit f0c4d9fc9cc9462659728d168387191387e903cc: Linux 6.1-rc4 (2022-11-06 15:07:11 -0800) are available in the Git repository at: h

[Intel-gfx] [PULL] gvt-next

2022-11-11 Thread Zhenyu Wang
Hi, Here's current accumulated changes in gvt-next. Sorry that I delayed to refresh them on time for upstream...It contains mostly kernel doc, typo fixes and small code cleanups, as details below. btw, one gvt change for next https://patchwork.freedesktop.org/patch/58/ is still pending, I nee

Re: [Intel-gfx] [PATCH 0/2] drm/i915/gvt: Fix for KVM refcounting bug

2022-11-10 Thread Zhenyu Wang
On 2022.11.11 00:22:23 +, Sean Christopherson wrote: > Bug fix and cleanup related to KVM refcounting. Found by inspection while > attempting to clean up KVM's page-tracker APIs. > > Compile tested only! > > Sean Christopherson (2): > drm/i915/gvt: Get reference to KVM iff attachment to VM

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gvt: Remove the unused function get_pt_type()

2022-11-07 Thread Zhenyu Wang
nt get_pt_type(int type) > -{ > - return gtt_type_table[type].pt_type; > -} > - > static inline int get_entry_type(int type) > { > return gtt_type_table[type].entry_type; > -- > 2.20.1.7.g153144c > Reviewed-by: Zhenyu Wang thanks! signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH] drm/i915: fix repeated words in comments

2022-11-07 Thread Zhenyu Wang
> * @gvt: GVT device > * > - * This function is called at the driver unloading stage, to clean up the > + * This function is called at the driver unloading stage, to clean up > * the mm components of a GVT device. > * > */ > -- > 2.36.1 > Reviewed-by: Zhenyu Wang thanks signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH] [next] i915/gvt: remove hardcoded value on crc32_start calculation

2022-11-07 Thread Zhenyu Wang
py(p, gvt->firmware.mmio, info->mmio_size); > > - crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4; > + crc32_start = offsetof(struct gvt_firmware_header, version); > h->crc32 = crc32_le(0, firmware + crc32_start, size - crc32_start); > > firmware_attr.size = size; > -- > 2.25.4 > Reviewed-by: Zhenyu Wang thanks! signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH v2 08/15] drm/i915/gvt: Use the new device life cycle helpers

2022-09-06 Thread Zhenyu Wang
ewed-by: Jason Gunthorpe > --- Looks good to me. Reviewed-by: Zhenyu Wang > drivers/gpu/drm/i915/gvt/gvt.h | 5 ++- > drivers/gpu/drm/i915/gvt/kvmgt.c | 52 ++-- > drivers/gpu/drm/i915/gvt/vgpu.c | 33 > 3 files changed, 50 insertion

Re: [Intel-gfx] [PATCH] drm/i915/gvt: fix double-free bug in split_2MB_gtt_entry.

2022-09-06 Thread Zhenyu Wang
On 2022.09.06 19:36:56 +0800, Zheng Hacker wrote: > Hi Greg, > > Alex has explained how we figured out the patch. We did analyze the > code and found it possible to reach the vulnerability code. But we > have no physical device in hand to test the driver. So we'd like to > discuss with developers

Re: [Intel-gfx] [Bug 216388] New: On Host, kernel errors in KVM, on guests, it shows CPU stalls

2022-08-22 Thread Zhenyu Wang
On 2022.08.22 17:50:33 +, Sean Christopherson wrote: > +GVT folks > > On Sun, Aug 21, 2022, bugzilla-dae...@kernel.org wrote: > > https://bugzilla.kernel.org/show_bug.cgi?id=216388 > > > > Bug ID: 216388 > >Summary: On Host, kernel errors in KVM, on guests, it shows CPU

[Intel-gfx] [PULL] gvt-fixes (resend)

2022-08-21 Thread Zhenyu Wang
(resend after fixing sign-off after rebase) Hi, Here's one gvt-fixes pull for 6.0-rc. Major one is Cometlake regression fix for mmio table rework, and others are left kernel doc fixes not pushed yet. Thanks! -- The following changes since commit a7a47a5dfa9a9692a41764ee9ab4054f12924a42: drm/

Re: [Intel-gfx] [PULL] gvt-fixes

2022-08-21 Thread Zhenyu Wang
08/2022 21:07, Vivi, Rodrigo wrote: > > On Tue, 2022-08-16 at 12:43 +0800, Zhenyu Wang wrote: > > On 2022.08.16 12:05:08 +0800, Zhenyu Wang wrote: > > On 2022.08.15 19:32:45 -0400, Rodrigo Vivi wrote: > >

Re: [Intel-gfx] [PULL] gvt-fixes

2022-08-15 Thread Zhenyu Wang
On 2022.08.16 12:05:08 +0800, Zhenyu Wang wrote: > On 2022.08.15 19:32:45 -0400, Rodrigo Vivi wrote: > > On Mon, Aug 15, 2022 at 10:38:55AM +0800, Zhenyu Wang wrote: > > > > > > Hi, > > > > > > Here's one gvt-fixes pull for 6.0-rc. Major on

Re: [Intel-gfx] [PULL] gvt-fixes

2022-08-15 Thread Zhenyu Wang
On 2022.08.15 19:32:45 -0400, Rodrigo Vivi wrote: > On Mon, Aug 15, 2022 at 10:38:55AM +0800, Zhenyu Wang wrote: > > > > Hi, > > > > Here's one gvt-fixes pull for 6.0-rc. Major one is Cometlake regression > > fix for mmio table rework, and others are lef

[Intel-gfx] [PULL] gvt-fixes

2022-08-14 Thread Zhenyu Wang
Hi, Here's one gvt-fixes pull for 6.0-rc. Major one is Cometlake regression fix for mmio table rework, and others are left kernel doc fixes not pushed yet. Thanks -- The following changes since commit a7a47a5dfa9a9692a41764ee9ab4054f12924a42: drm/i915/reset: Add additional steps for Wa_220118

Re: [Intel-gfx] [PATCH] i915/gvt: Fix Comet Lake

2022-08-10 Thread Zhenyu Wang
IS_KABYLAKE(dev_priv) || > + IS_COFFEELAKE(dev_priv) || IS_COMETLAKE(dev_priv)) > MMIO_D(GAMT_CHKN_BIT_REG); > if (!IS_BROXTON(dev_priv)) > MMIO_D(GEN9_CTX_PREEMPT_REG); > Thanks for catching this! Reviewed-by: Zhenyu Wang signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH v2 07/39] drm/i915: gvt: fix kernel-doc trivial warnings

2022-07-13 Thread Zhenyu Wang
a virtual GPU. > @@ -219,7 +219,7 @@ void intel_gvt_activate_vgpu(struct intel_vgpu *vgpu) > } > > /** > - * intel_gvt_deactive_vgpu - deactivate a virtual GPU > + * intel_gvt_deactivate_vgpu - deactivate a virtual GPU > * @vgpu: virtual GPU > * > * This funct

Re: [Intel-gfx] [PATCH 04/32] drm/i915: gvt: fix kernel-doc trivial warnings

2022-07-11 Thread Zhenyu Wang
On 2022.07.11 21:24:49 +0100, Mauro Carvalho Chehab wrote: > Some functions seem to have been renamed without updating the kernel-doc > markup causing warnings. Also, struct intel_vgpu_dmabuf_obj is not > properly documented, but has a kerneld-doc markup. > > Fix those warnings: > drivers/gp

[Intel-gfx] [PULL] gvt-fixes

2022-07-10 Thread Zhenyu Wang
Hi, Here's one gvt fix for 5.19, from Dan for shmem_pin_map() return check bug. Thanks! --- The following changes since commit d72d69abfdb6e0375981cfdda8eb45143f12c77d: drm/i915/gvt: Make DRM_I915_GVT depend on X86 (2022-01-13 18:13:12 +) are available in the Git repository at: https

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix kernel-doc

2022-07-10 Thread Zhenyu Wang
This function is used to free the HW resource owned by a vGPU. > @@ -328,7 +328,7 @@ void intel_vgpu_reset_resource(struct intel_vgpu *vgpu) > } > > /** > - * intel_alloc_vgpu_resource - allocate HW resource for a vGPU > + * intel_vgpu_alloc_resource() - allocate HW resource for a vG

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gvt: Fix kernel-doc

2022-07-10 Thread Zhenyu Wang
gine > + * intel_gvt_switch_mmio - switch mmio context of specific engine > * @pre: the last vGPU that own the engine > * @next: the vGPU to switch to > * @engine: the engine > -- > 2.20.1.7.g153144c > Acked-by: Zhenyu Wang Thanks! signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH 1/2] drm/i915/gvt: Fix kernel-doc

2022-07-10 Thread Zhenyu Wang
te handler > + * intel_vgpu_default_mmio_write() - default MMIO write handler > * @vgpu: a vGPU > * @offset: access offset > * @p_data: write data buffer > -- > 2.20.1.7.g153144c > Sorry for late reply! Acked-by: Zhenyu Wang signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH] drm/i915/gvt: fix typo in comment

2022-07-10 Thread Zhenyu Wang
* settting the shadow entry to point to a scratch page > + * setting the shadow entry to point to a scratch page >*/ > ops->set_pfn(&m, gvt->gtt.scratch_mfn); > } else > Sorry for late reply! Acked-by: Zhenyu Wang signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH] drm/i915/gvt: IS_ERR() vs NULL bug in intel_gvt_update_reg_whitelist()

2022-07-10 Thread Zhenyu Wang
gt; > whitelist") > > Signed-off-by: Dan Carpenter > > Reviewed-by: Andrzej Hajda > Acked-by: Zhenyu Wang Thanks! Will push to -fixes. > > > --- > > drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 del

Re: [Intel-gfx] [PATCH v3 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-07-05 Thread Zhenyu Wang
ewed-by: Christoph Hellwig > Reviewed-by: Kevin Tian > Reviewed-by: Tony Krowiak > Reviewed-by: Eric Farman > Signed-off-by: Jason Gunthorpe > --- > drivers/gpu/drm/i915/gvt/gvt.h| 1 - > drivers/gpu/drm/i915/gvt/kvmgt.c | 75 --- gvt change look

Re: [Intel-gfx] [PATCH v9 1/3] i915/gvt: Separate the MMIO tracking table from GVT-g

2022-04-07 Thread Zhenyu Wang
fine to me. Thanks! Reviewed-by: Zhenyu Wang signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH v2] drm/i915/tgl: Simply subplatform detection

2022-02-22 Thread Zhenyu Wang
On 2022.02.22 14:21:33 +, Tvrtko Ursulin wrote: > > On 22/02/2022 14:14, Jos?? Roberto de Souza wrote: > > In the past we had a need to differentiate TGL U and TGL Y, there > > was a different voltage swing table for each subplatform and some PCI > > ids of this subplatforms are shared but it

Re: [Intel-gfx] [PATCH v8 10/16] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes

2021-09-23 Thread Zhenyu Wang
(fmt, args...) \ > - pr_debug("gvt: dpy: "fmt, ##args) > + pr_debug("gvt:dpy: " fmt, ##args) > > #define gvt_dbg_el(fmt, args...) \ > - pr_debug("gvt: el: "fmt, ##args) > + pr_debug("gvt:el: " fmt, ##args) > >

[Intel-gfx] [PULL] gvt-fixes

2021-09-18 Thread Zhenyu Wang
Hi, Here's one ww lock fini fix from Zhi which resolved recent regression with i915 change. Thanks -- The following changes since commit 71de496cc489b6bae2f51f89da7f28849bf2836e: drm/i915/dp: Drop redundant debug print (2021-08-26 07:31:52 -0400) are available in the Git repository at: ht

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-25 Thread Zhenyu Wang
On 2021.08.20 12:56:34 -0700, Luis Chamberlain wrote: > On Fri, Aug 20, 2021 at 04:17:24PM +0200, Christoph Hellwig wrote: > > On Thu, Aug 19, 2021 at 04:29:29PM +0800, Zhenyu Wang wrote: > > > I'm working on below patch to resolve this. But I met a weird issue in > >

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-25 Thread Zhenyu Wang
On 2021.08.20 16:17:24 +0200, Christoph Hellwig wrote: > On Thu, Aug 19, 2021 at 04:29:29PM +0800, Zhenyu Wang wrote: > > I'm working on below patch to resolve this. But I met a weird issue in > > case when building i915 as module and also kvmgt module, it caused > > b

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-25 Thread Zhenyu Wang
On 2021.08.19 17:43:43 +0300, Joonas Lahtinen wrote: > Quoting Zhenyu Wang (2021-08-19 11:29:29) > > On 2021.08.17 13:22:03 +0800, Zhenyu Wang wrote: > > > > On 2021.08.16 19:34:58 +0200, Christoph Hellwig wrote: > > > > > Any updates on this? I

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-19 Thread Zhenyu Wang
On 2021.08.17 13:22:03 +0800, Zhenyu Wang wrote: > > On 2021.08.16 19:34:58 +0200, Christoph Hellwig wrote: > > > Any updates on this? I'd really hate to miss this merge window. > > > > I'm still waiting for our validation team's report on this. I

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-16 Thread Zhenyu Wang
On 2021.08.17 09:08:55 +0800, Zhenyu Wang wrote: > On 2021.08.16 19:34:58 +0200, Christoph Hellwig wrote: > > On Wed, Aug 04, 2021 at 01:26:06PM +0800, Zhenyu Wang wrote: > > > On 2021.08.03 11:30:58 -0300, Jason Gunthorpe wrote: > > > > On Tue, Aug 03, 2021 at 05:43

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-16 Thread Zhenyu Wang
On 2021.08.16 19:34:58 +0200, Christoph Hellwig wrote: > On Wed, Aug 04, 2021 at 01:26:06PM +0800, Zhenyu Wang wrote: > > On 2021.08.03 11:30:58 -0300, Jason Gunthorpe wrote: > > > On Tue, Aug 03, 2021 at 05:43:15PM +0800, Zhenyu Wang wrote: > > > > Acked-by: Zhenyu W

Re: [Intel-gfx] i915 timeouts delaying boot under GVT

2021-08-15 Thread Zhenyu Wang
On 2021.08.13 08:31:28 +0200, Christoph Hellwig wrote: > Hi all, > > when botting a current 4.14-rc tree in a VM using GVT-g (with the host > also running a current 4.14-rc tree), I see bunch of long timeouts > followed by i915 errors: > > [4.252066] i915 :00:03.0: [drm] VGT balloon succe

[Intel-gfx] [PULL] gvt-fixes

2021-08-09 Thread Zhenyu Wang
fixes-2021-08-10 - Fix windows VM hang issue for atomics workaround (Zhenyu) Zhenyu Wang (1): drm/i915/gvt: Fix cached atomics setting for Windows VM drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i91

[Intel-gfx] [PATCH v2] drm/i915/gvt: Fix cached atomics setting for Windows VM

2021-08-05 Thread Zhenyu Wang
15: Disable atomics in L3 for gen9") Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/gvt/mmio_context.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c index 06024

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-03 Thread Zhenyu Wang
On 2021.08.03 11:30:58 -0300, Jason Gunthorpe wrote: > On Tue, Aug 03, 2021 at 05:43:15PM +0800, Zhenyu Wang wrote: > > Acked-by: Zhenyu Wang > > > > Thanks a lot for this effort! > > Great, do we have a submission plan for this? how much does it clash > with my

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-03 Thread Zhenyu Wang
gt; If we were to support another upstream hypervisor we'd just need to > union a few fields in struct intel_gpu and maybe introduce a few > methods. Preferably in a way that avoids expensive indirect calls > in the fast path. ok, agree on that. Acked-by: Zhenyu Wang Thanks a lot for this effort! signature.asc Description: PGP signature

Re: [Intel-gfx] [PATCH 01/21] drm/i915/gvt: integrate into the main Makefile

2021-08-03 Thread Zhenyu Wang
On 2021.07.21 17:53:35 +0200, Christoph Hellwig wrote: > Remove the separately included Makefile and just use the relative > reference from the main i915 Makefile as for source files in other > subdirectories. > We agreed to make gvt mostly self-contained in its own directory before. Although I do

Re: [Intel-gfx] refactor the i915 GVT support

2021-07-22 Thread Zhenyu Wang
On 2021.07.21 17:53:34 +0200, Christoph Hellwig wrote: > Hi all, > > the GVT code in the i915 is a bit of a mess right now due to strange > abstractions and lots of indirect calls. This series refactors various > bits to clean that up. The main user visible change is that almost all > of the GVT

Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Zhenyu Wang
On 2021.07.21 13:10:49 +0200, Christoph Hellwig wrote: > Hi all, > > I'm trying to test some changes for the gvt code, but even with a baseline > 5.14-rc2 host and guest the 915 driver does not seem overly happy: > I think we also got bug report on those display related warnings, should be some i

[Intel-gfx] [PATCH] drm/i915/gvt: Fix cached atomics setting for Windows VM

2021-07-20 Thread Zhenyu Wang
add new scratch register handler and add those in mmio save/restore list for context switch. No gpu hang produced with this one. Cc: sta...@vger.kernel.org # 5.12+ Cc: "Xu, Terrence" Fixes: 58586680ffad ("drm/i915: Disable atomics in L3 for gen9") Signed-off-by: Zhenyu Wang ---

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Convert from atomic_t to refcount_t on intel_vgpu_ppgtt_spt->refcount

2021-07-20 Thread Zhenyu Wang
On 2021.07.16 18:41:38 +0800, Xiyu Yang wrote: > refcount_t type and corresponding API can protect refcounters from > accidental underflow and overflow and further use-after-free situations > Thanks for the patch. Is there any specific problem you run with current code? Any shadow ppgtt error? >

Re: [Intel-gfx] [PATCH 12/13] vfio/gvt: Fix open/close when multiple device FDs are open

2021-07-16 Thread Zhenyu Wang
> > - .open = intel_vgpu_open, > - .release= intel_vgpu_release, > + .open_device= intel_vgpu_open_device, > + .close_device = intel_vgpu_close_device, > > .read = intel_vgpu_re

[Intel-gfx] [PULL] gvt-fixes

2021-07-14 Thread Zhenyu Wang
Hi, Here's one fix of shadow ppgtt invalidation with proper vGPU D3 state tracking. Thanks -- The following changes since commit 62fb9874f5da54fdb243003b386128037319b219: Linux 5.13 (2021-06-27 15:21:11 -0700) are available in the Git repository at: https://github.com/intel/gvt-linux tags

Re: [Intel-gfx] [PATCH v2] drm/i915/gem: Use list_entry to access list members

2021-06-01 Thread Zhenyu Wang
> - dmabuf_obj = container_of(pos, struct intel_vgpu_dmabuf_obj, > - list); > + dmabuf_obj = list_entry(pos, struct intel_vgpu_dmabuf_obj, > list); > dmabuf_obj->vgpu = NULL; > >

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Add missing macro name changes

2021-05-23 Thread Zhenyu Wang
_START_RANGE), 0x3000, NULL, NULL}, > {D_ALL, _MMIO(MCHBAR_MIRROR_BASE_SNB), 0x4, NULL, NULL}, > {D_ALL, _MMIO(VGT_PVINFO_PAGE), VGT_PVINFO_SIZE, > pvinfo_mmio_read, pvinfo_mmio_write}, > -- Sorry that I missed your fix before sending mine... Reviewed-by: Zhen

Re: [Intel-gfx] i915 gvt broke drm-tip; Fix ASAP

2021-05-23 Thread Zhenyu Wang
On 2021.05.22 21:19:38 +0200, Thomas Zimmermann wrote: > Hi, > > after creating drm-tip today as part of [1], building drm-tip is now broken > with the error message shown below. > > Some register constants appear to be missing from the GVT code. Please fix > ASAP. > Thanks, Thomas. Looks DMC re

Re: [Intel-gfx] [PATCH] drm/i915/gvt: remove local storage of debugfs file

2021-05-19 Thread Zhenyu Wang
On 2021.05.19 10:31:18 +0200, Greg Kroah-Hartman wrote: > On Wed, May 19, 2021 at 04:03:13PM +0800, Zhenyu Wang wrote: > > On 2021.05.18 18:28:53 +0200, Greg Kroah-Hartman wrote: > > > On Tue, May 18, 2021 at 06:17:05PM +0200, Greg Kroah-Hartman wrote: > > > > There

Re: [Intel-gfx] [PATCH] drm/i915/gvt: remove local storage of debugfs file

2021-05-19 Thread Zhenyu Wang
gt; > Simplify the structure by removing the dentry and relying on debugfs > > to find the dentry to remove when we want to. > > > > By doing this change, we remove the last in-kernel user that was storing > > the result of debugfs_create_long(), so that api can be cleaned u

[Intel-gfx] [PULL] gvt-fixes

2021-05-19 Thread Zhenyu Wang
) Zhenyu Wang (1): drm/i915/gvt: Move mdev attribute groups into kvmgt module drivers/gpu/drm/i915/Kconfig | 1 - drivers/gpu/drm/i915/gvt/gvt.c | 124 +-- drivers/gpu/drm/i915/gvt/gvt.h | 3 - drivers/gpu/drm/i915/gvt/hypercall.h

Re: [Intel-gfx] [PATCH] drm/i915/gvt: remove local storage of debugfs file

2021-05-18 Thread Zhenyu Wang
he dentry to remove when we want to. > > By doing this change, we remove the last in-kernel user that was storing > the result of debugfs_create_long(), so that api can be cleaned up. > > Cc: Zhenyu Wang > Cc: Zhi Wang > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Rodrigo

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gvt: Move mdev attribute groups into kvmgt module

2021-05-14 Thread Zhenyu Wang
On 2021.05.13 09:02:49 -0300, Jason Gunthorpe wrote: > On Thu, May 13, 2021 at 12:56:47PM +0800, Zhenyu Wang wrote: > > On 2021.05.12 09:47:39 -0300, Jason Gunthorpe wrote: > > > On Wed, May 12, 2021 at 10:31:41AM +0800, Zhenyu Wang wrote: > > > > > > >

[Intel-gfx] [PATCH v2] drm/i915/gvt: Move mdev attribute groups into kvmgt module

2021-05-13 Thread Zhenyu Wang
Cc: Alex Williamson Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/Kconfig | 1 - drivers/gpu/drm/i915/gvt/gvt.c | 124 +-- drivers/gpu/drm/i915/gvt/gvt.h | 3 - drivers/gpu/drm/i915/gvt/hypercall.h | 2 +- drivers/gpu/drm/i915/g

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gvt: Move mdev attribute groups into kvmgt module

2021-05-12 Thread Zhenyu Wang
On 2021.05.12 09:47:39 -0300, Jason Gunthorpe wrote: > On Wed, May 12, 2021 at 10:31:41AM +0800, Zhenyu Wang wrote: > > > > This need to go into the vfio tree in some way, either directly > > > through it, via rc or otherwise > > > > As this is only for i9

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gvt: Move mdev attribute groups into kvmgt module

2021-05-11 Thread Zhenyu Wang
On 2021.05.11 12:54:46 -0300, Jason Gunthorpe wrote: > On Tue, May 11, 2021 at 04:33:30PM +0800, Zhenyu Wang wrote: > > As kvmgt module contains all handling for VFIO/mdev, leaving mdev attribute > > groups in gvt module caused dependency issue. Although it was there for > &g

[Intel-gfx] [PATCH 0/3] Fix I915_GVT dependency

2021-05-11 Thread Zhenyu Wang
This is to fix I915_GVT dependency mess to move all vfio/dev handling into kvmgt module, so gvt device model core won't need to depend on vfio/mdev. Currently apply against linus master with merge from vfio tree. This targets for 5.13 fix. thanks Zhenyu Wang (3): drm/i915/gvt: Move

[Intel-gfx] [PATCH 3/3] Revert "vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV"

2021-05-11 Thread Zhenyu Wang
This reverts commit 07e543f4f9d116d6b4240644191dee6388ef4a85. As I915_GVT dependency issue is resolved, revert this. Cc: Jason Gunthorpe Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu

[Intel-gfx] [PATCH 2/3] Revert "vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV"

2021-05-11 Thread Zhenyu Wang
This reverts commit adaeb718d46f6b42a3fc1dffd4f946f26b33779a. As I915_GVT dependency is resolved, revert this temporary hack. Cc: Arnd Bergmann Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 1/3] drm/i915/gvt: Move mdev attribute groups into kvmgt module

2021-05-11 Thread Zhenyu Wang
issue. Cc: Arnd Bergmann Cc: Jason Gunthorpe Cc: Alex Williamson Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/gvt/gvt.c | 124 + drivers/gpu/drm/i915/gvt/gvt.h | 3 - drivers/gpu/drm/i915/gvt/hypercall.h | 2 +- drivers/gpu/drm/i915/gvt/kvmgt.c

[Intel-gfx] [PULL] gvt-next-fixes

2021-04-29 Thread Zhenyu Wang
Hi, Here's just another left fix for possible divide error in vgpu display rate calculation by Colin. btw, I'll need a backmerge of linus tree or maybe wait till rc1 to apply gvt mdev dependency fix from https://patchwork.freedesktop.org/series/89479/ Thanks -- The following changes since comm

Re: [Intel-gfx] [PATCH 1/2] drm/i915/gvt: Move mdev attribute groups into kvmgt module

2021-04-28 Thread Zhenyu Wang
On 2021.04.28 14:21:41 -0300, Jason Gunthorpe wrote: > On Wed, Apr 28, 2021 at 01:32:43PM +0800, Zhenyu Wang wrote: > > On 2021.04.27 09:12:35 -0300, Jason Gunthorpe wrote: > > > On Tue, Apr 27, 2021 at 10:45:06AM +0800, Zhenyu Wang wrote: > > > > On 2021.04.26 1

Re: [Intel-gfx] [PATCH 1/2] drm/i915/gvt: Move mdev attribute groups into kvmgt module

2021-04-27 Thread Zhenyu Wang
On 2021.04.27 09:12:35 -0300, Jason Gunthorpe wrote: > On Tue, Apr 27, 2021 at 10:45:06AM +0800, Zhenyu Wang wrote: > > On 2021.04.26 10:39:24 -0300, Jason Gunthorpe wrote: > > > On Mon, Apr 26, 2021 at 05:41:42PM +0800, Zhenyu Wang wrote: > > > > @@ -166

Re: [Intel-gfx] [PATCH 2/2] Revert "vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV"

2021-04-26 Thread Zhenyu Wang
On 2021.04.26 14:40:17 -0300, Jason Gunthorpe wrote: > On Mon, Apr 26, 2021 at 10:55:55AM -0600, Alex Williamson wrote: > > On Mon, 26 Apr 2021 17:41:43 +0800 > > Zhenyu Wang wrote: > > > > > This reverts commit 07e543f4f9d116d6b4240644191dee6388ef4a85. > >

  1   2   3   4   5   6   7   8   >