[Intel-gfx] [RFC PATCH v2 2/2] drm/i915: Move GVT device model into separate module

2018-11-25 Thread Zhenyu Wang
all MMIO won't work, as it could cause unknown side effect e.g HW hang. So current choice is to read back MMIO that GVT actually track. But instead of reference any GVT files, this one just copied register list. So GVT will use initial dump instead when load. Cc: Joonas Lahtinen Signed-off-by: Zheny

[Intel-gfx] [RFC PATCH v2 0/2] GVT device model split

2018-11-25 Thread Zhenyu Wang
gt" module init first. "kvmgt" should register into GVT as hypervisor interface provider, instead of making GVT to load it for now. But that still won't split GVT from i915. So this work takes further to split GVT device model from i915. Thanks Zhenyu Wang (2): drm/i915: Export curr

[Intel-gfx] [RFC PATCH v2 1/2] drm/i915: Export current required functions for GVT

2018-11-25 Thread Zhenyu Wang
This trys to export all required i915 functions for GVT. Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/i915_gem.c | 11 +++ drivers/gpu/drm/i915/i915_gem_context.c | 2 ++ drivers/gpu/drm/i915/i915_gem_dmabuf.c| 1 + drivers/gpu/drm/i915/i915_gem_fence_reg.c | 2

[Intel-gfx] [PULL] gvt-fixes for 4.20-rc5

2018-11-25 Thread Zhenyu Wang
Hi, Here's regular gvt fixes for 4.20-rc5. One to correct MOCS registers load on engine list, one for rpm lock warning fix, and another for use-after-free fix for partial ggtt list destroy. Details below. Thanks -- The following changes since commit 5e7154ff5e8e21dc9acac4f8dba7533552365374:

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Use after free in intel_vgpu_destroy_ggtt_mm()

2018-11-22 Thread Zhenyu Wang
On 2018.11.23 10:22:19 +0300, Dan Carpenter wrote: > We need to use the _safe() version of this macro so that we don't > dereference "pos" when it is freed. > Thanks, Dan. I've already merged one same fix from Chris for this found by smatch. > Fixes: bc0686ff5fad ("drm/i915/gvt: support

Re: [Intel-gfx] [PATCH 1/2] drm/i915/gvt: Avoid use-after-free iterating the gtt list

2018-11-21 Thread Zhenyu Wang
On 2018.11.21 09:20:19 +, Chris Wilson wrote: > Quoting Zhenyu Wang (2018-11-21 02:29:21) > > On 2018.11.20 20:24:38 +, Chris Wilson wrote: > > > Found by smatch: > > > > > > drivers/gpu/drm/i915/gvt/gtt.c:2452 intel_vgpu_destroy_ggtt_mm() error: &

Re: [Intel-gfx] [PATCH 1/2] drm/i915/gvt: Avoid use-after-free iterating the gtt list

2018-11-20 Thread Zhenyu Wang
On 2018.11.20 20:24:38 +, Chris Wilson wrote: > Found by smatch: > > drivers/gpu/drm/i915/gvt/gtt.c:2452 intel_vgpu_destroy_ggtt_mm() error: > dereferencing freed memory 'pos' > > Signed-off-by: Chris Wilson > Cc: Zhenyu Wang > --- > drivers/gpu/drm/i915/gvt/

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Make pipe/transcoder offsets not depend on enum values

2018-11-19 Thread Zhenyu Wang
On 2018.11.19 20:54:30 +0200, Imre Deak wrote: > On Mon, Nov 19, 2018 at 05:29:26PM +0200, Ville Syrjälä wrote: > > On Mon, Nov 19, 2018 at 04:41:07PM +0200, Imre Deak wrote: > > > Depending on the transcoder enum values to translate from transcoder > > > to pipe/transcoder register addresses can

Re: [Intel-gfx] [PATCH] drm/i915: Hide enable_gvt modparam when not compiled in

2018-11-18 Thread Zhenyu Wang
On 2018.11.16 16:44:47 +0200, Joonas Lahtinen wrote: > Hide the enable_gvt modparam in the default scenario where > support has not been compiled in. > > Cc: Zhenyu Wang > Cc: Zhi Wang > Cc: Chris Wilson > Signed-off-by: Joonas Lahtinen > --- > drivers/gpu/drm/i91

Re: [Intel-gfx] [PATCH v3 2/8] drm/i915: get ready of memory for pvmmio

2018-11-13 Thread Zhenyu Wang
t; > v0: RFC > v1: addressed RFC comment to move both shared_page_lock and shared_page > to i915_virtual_gpu structure > v2: packed i915_virtual_gpu structure > v3: added SHARED_PAGE_SETUP g2v notification for pv shared_page setup > > Cc: Zhenyu Wang > Cc: Zhi Wang >

[Intel-gfx] [PULL] gvt-fixes for 4.20-rc2

2018-11-06 Thread Zhenyu Wang
Hi, Here's re-generated -fixes pull for 4.20. Mostly on fixing possible guest arbitrary update of GGTT entries, with one mask fix for chicken register, and with one to fix eDP warning in guest. Thanks. -- The following changes since commit 7759ca3aac79648d01c9edcb3b00503c02bec2f5:

Re: [Intel-gfx] [PATCH] drm/i915/gtt: Revert "Disable read-only support under GVT"

2018-10-30 Thread Zhenyu Wang
the PTE bits. > - */ > - ppgtt->vm.has_read_only = !intel_vgpu_active(i915); > + /* From bdw, there is support for read-only pages in the PPGTT. */ > + ppgtt->vm.has_read_only = true; > > i915_address_space_init(>vm, i915); > In consider we have

Re: [Intel-gfx] [PULL] gvt-next-fixes for 4.20

2018-10-26 Thread Zhenyu Wang
On 2018.10.25 16:07:14 +0300, Joonas Lahtinen wrote: > Quoting Zhenyu Wang (2018-10-23 06:46:59) > > > > Hi, > > > > Here's gvt-next-fixes for 4.20 with three changes. Mostly > > to fix possible arbitrary update on guest GGTT entry and > > with proper inval

Re: [Intel-gfx] [PULL] gvt-next-fixes for 4.20

2018-10-25 Thread Zhenyu Wang
On 2018.10.25 11:28:28 -0700, Rodrigo Vivi wrote: > On Thu, Oct 25, 2018 at 04:07:14PM +0300, Joonas Lahtinen wrote: > > Quoting Zhenyu Wang (2018-10-23 06:46:59) > > > > > > Hi, > > > > > > Here's gvt-next-fixes for 4.20 with three changes. Mostly &g

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

2018-10-22 Thread Zhenyu Wang
Hi, Here's gvt-next-fixes for 4.20 with three changes. Mostly to fix possible arbitrary update on guest GGTT entry and with proper invalidate of old entry. Another one for one chicken reg mask fix. thanks -- The following changes since commit 835fe6d75d14c1513910ed7f5665127fee12acc8:

Re: [Intel-gfx] [PATCH] drm/i915: Add ppgtt to GVT GEM context

2018-10-18 Thread Zhenyu Wang
used on GPU. So GVT GEM context has valid ppgtt address. But note > that this ppgtt only contain valid ppgtt root table address, the table > entry in this ppgtt structure are invalid. > > Fixes:4a3d3f6785be("drm/i915: Match code to comment and enforce ppgtt for > exec

Re: [Intel-gfx] [PATCH] drm/i915: Add ppgtt to GVT GEM context

2018-10-14 Thread Zhenyu Wang
_gem_object_put(wa_ctx->indirect_ctx.obj); > } > We may better add comment for this one as currently it might not be real root pointer for gvt context, so won't confuse people later. Others looks fine to me. Thanks! Reviewed-by: Zhenyu Wang > +static int set_context_ppgtt_from_shadow(s

Re: [Intel-gfx] [PATCH] drm/i915: Check ppgtt validity for GVT GEM context

2018-10-11 Thread Zhenyu Wang
On 2018.10.11 07:23:11 +0100, Chris Wilson wrote: > Quoting Zhenyu Wang (2018-10-11 03:45:07) > > On 2018.10.09 14:08:20 +0800, Xiong Zhang wrote: > > > The guest couldn't boot up under GVT-g environment as the following call > > > trace exists: > > > [ 272.

Re: [Intel-gfx] [PATCH] drm/i915: Check ppgtt validity for GVT GEM context

2018-10-10 Thread Zhenyu Wang
On 2018.10.09 14:08:20 +0800, Xiong Zhang wrote: > The guest couldn't boot up under GVT-g environment as the following call > trace exists: > [ 272.504762] BUG: unable to handle kernel NULL pointer dereference at > 0100 > [ 272.504834] Call Trace: > [ 272.504852]

Re: [Intel-gfx] [RFC 02/10] drm/i915/gvt: get ready of memory for pvmmio

2018-10-08 Thread Zhenyu Wang
On 2018.09.27 12:37:47 -0400, Xiaolin Zhang wrote: > To enable pvmmio feature, we need to prepare one 4K shared page > which will be accessed by both guest and backend i915 driver. > > guest i915 allocate one page memory and then the guest physical address is > passed to backend i915 driver

Re: [Intel-gfx] [RFC 01/10] drm/i915/gvt: add module parameter enable_pvmmio

2018-10-08 Thread Zhenyu Wang
On 2018.09.28 14:09:45 +0800, Zhang, Xiaolin wrote: > On 09/27/2018 07:03 PM, Joonas Lahtinen wrote: > > Quoting Xiaolin Zhang (2018-09-27 19:37:46) > >> This int type module parameter is used to control the different > >> level pvmmio feature for MMIO emulation in GVT. > >> > >> This parameter is

Re: [Intel-gfx] [PATCH v4] drm/i915: Remove i915.enable_ppgtt override

2018-10-08 Thread Zhenyu Wang
On 2018.10.08 13:58:25 +, Wang, Zhi A wrote: > Thanks for pointing this. My bad. > > I take a look on the code and it looks like the GVT-g context is now quite > similar with the kernel context except the force single submission and ring > buffer size. (When we upstream the code, there was

Re: [Intel-gfx] [PATCH v4] drm/i915: Remove i915.enable_ppgtt override

2018-10-08 Thread Zhenyu Wang
: Wang, Zhi A > > > Sent: Wednesday, September 26, 2018 2:01 AM > > > To: Joonas Lahtinen ; Chris Wilson > > > ; intel-gfx@lists.freedesktop.org; Zhenyu Wang > > > > > > Cc: Auld, Matthew ; He, Min > > > Subject: Re: [PATCH v4] drm/i915:

[Intel-gfx] [PULL] gvt-fixes for 4.19-rc5

2018-09-18 Thread Zhenyu Wang
Hi, Here's more gvt fixes for 4.19. Two more BXT fixes from Colin, one srcu locking fix and one fix for GGTT clear when destroy vGPU. p.s, I'll start my vacation from tomorrow. Wang Zhi will cover for gvt pull. Thanks -- The following changes since commit

[Intel-gfx] [RFC PATCH] drm/i915: split GVT as separated module

2018-09-12 Thread Zhenyu Wang
Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/Kconfig | 2 +- drivers/gpu/drm/i915/Makefile | 3 - drivers/gpu/drm/i915/gvt/Makefile | 3 +- drivers/gpu/drm/i915/gvt/gvt.c| 40 +- drivers/gpu/drm/i915/gvt/gvt.h| 3

[Intel-gfx] [PULL] gvt-fixes for 4.19-rc4

2018-09-10 Thread Zhenyu Wang
opregion (Weinan) Weinan Li (1): drm/i915/gvt: Fix the incorrect length of child_device_config issue Zhenyu Wang (1): drm/i915/gvt: Fix life cycle reference on KVM mm drivers/gpu/drm/i915/gvt/kvmgt.c| 10

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

2018-09-06 Thread Zhenyu Wang
On 2018.09.06 16:11:20 +0300, Joonas Lahtinen wrote: > Quoting Zhenyu Wang (2018-09-04 06:01:54) > > > > Hi, > > > > Here's initial gvt-next for 4.20 with two optimization for > > guest context shadowing and command parser, and with W=1 build fixes. > > Th

[Intel-gfx] [PULL] gvt-next for 4.20

2018-09-03 Thread Zhenyu Wang
for cmd parsing on MI_NOOP drm/i915/gvt: only copy the first page for restore inhibit context Zhenyu Wang (3): drm/i915/gvt: make dma map/unmap kvmgt functions as static drm/i915/gvt: Fix function comment doc errors drm/i915/gvt: Move some MMIO definitions to reg.h

[Intel-gfx] [PULL] gvt-fixes for 4.19

2018-09-03 Thread Zhenyu Wang
out of spin_lock in stop_schedule Xiaolin Zhang (1): drm/i915/gvt: emulate gen9 dbuf ctl register access Zhenyu Wang (2): drm/i915/gvt: Fix drm_format_mod value for vGPU plane drm/i915/gvt: Give new born vGPU higher scheduling chance drivers/gpu/drm/i915/gvt/dmabuf.c | 33

Re: [Intel-gfx] Possible use_mm() mis-uses

2018-08-23 Thread Zhenyu Wang
t_not_zero. > yeah, that's the clear way to fix this imo. We only depend on guest life cycle to access guest memory properly. Here's proposed fix, will verify and integrate it later. Thanks! From 5e5a8d0409aa150884adf5a4d0b956fd0b9906b3 Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Thu, 23 Aug 2018 14:08:06

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

2018-08-14 Thread Zhenyu Wang
Hi, This is initial gvt fixes for 4.19 with some accumulated fixes, pls check details below. Thanks -- The following changes since commit 3237c0dbe21f8d2ca2feaa3891aff3619873cd30: drm/i915/kvmgt: Fix compilation error (2018-08-06 11:28:35 -0700) are available in the Git repository at:

Re: [Intel-gfx] [PATCH] drm/i915/gvt: fix memory leak in intel_vgpu_ioctl()

2018-08-08 Thread Zhenyu Wang
On 2018.08.03 08:41:19 +0800, Yi Wang wrote: > The 'sparse' variable may leak when return in function > intel_vgpu_ioctl(), and this patch fixes this. > > Signed-off-by: Yi Wang > Reviewed-by: Jiang Biao > --- > drivers/gpu/drm/i915/gvt/kvmgt.c | 3 +++ > 1 file changed, 3 insertions(+) > >

Re: [Intel-gfx] [PATCH] drm/i915/kvmgt: fix an error code in gvt_dma_map_page()

2018-08-06 Thread Zhenyu Wang
On 2018.07.19 11:19:21 +0300, Dan Carpenter wrote: > The dma_mapping_error() returns true on error but we want to return > -ENOMEM here. > > Fixes: 79e542f5af79 ("drm/i915/kvmgt: Support setting dma map for huge pages") > Signed-off-by: Dan Carpenter > Applied, thanks! > diff --git

Re: [Intel-gfx] [PATCH] drm/i915/kvmgt: Fix potential Spectre v1

2018-08-06 Thread Zhenyu Wang
On 2018.08.02 22:40:19 -0500, Gustavo A. R. Silva wrote: > info.index can be indirectly controlled by user-space, hence leading > to a potential exploitation of the Spectre variant 1 vulnerability. > > This issue was detected with the help of Smatch: > > drivers/gpu/drm/i915/gvt/kvmgt.c:1232

Re: [Intel-gfx] [PATCH] drm/i915/gvt: fix memory leak in intel_vgpu_ioctl()

2018-08-02 Thread Zhenyu Wang
On 2018.08.03 08:41:19 +0800, Yi Wang wrote: > The 'sparse' variable may leak when return in function > intel_vgpu_ioctl(), and this patch fixes this. > > Signed-off-by: Yi Wang > Reviewed-by: Jiang Biao > --- Looks fine to me, will queue this up. Thanks for the patch! >

Re: [Intel-gfx] [PATCH v4 2/3] drm/i915/gvt: use its own define for gpio

2018-07-30 Thread Zhenyu Wang
eviewed-by: Zhenyu Wang > Cc: intel-gvt-...@lists.freedesktop.org > Cc: Zhenyu Wang > Signed-off-by: Lucas De Marchi > --- > drivers/gpu/drm/i915/gvt/handlers.c | 2 +- > drivers/gpu/drm/i915/gvt/reg.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) >

Re: [Intel-gfx] [PATCH v4 1/3] drm/i915: make PCH_GMBUS* definitions private to gvt

2018-07-30 Thread Zhenyu Wang
On 2018.07.27 12:36:45 -0700, Lucas De Marchi wrote: > This is the only place that they are being used - the others use the > GMBUS* macros that rely on dev_priv being already properly initialized. > Reviewed-by: Zhenyu Wang thanks! > Cc: intel-gvt-...@lists.freedesktop.org >

Re: [Intel-gfx] [PATCH v3 1/2] drm/i915: remove confusing GPIO vs PCH_GPIO

2018-07-22 Thread Zhenyu Wang
On 2018.07.19 17:20:15 +, De Marchi, Lucas wrote: > CC'ing gvt maintainers (and fixing Jani's address in CC). > > See below > > On Wed, 2018-07-18 at 13:01 +0300, Ville Syrjälä wrote: > > On Tue, Jul 17, 2018 at 03:16:53PM -0700, Lucas De Marchi wrote: > > > On Fri, Jul 13, 2018 at 9:10 AM

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

2018-07-17 Thread Zhenyu Wang
On 2018.07.16 23:07:35 -0700, Rodrigo Vivi wrote: > On Tue, Jul 17, 2018 at 12:58:37PM +0800, Zhenyu Wang wrote: > > > > Hi, > > > > Left fixes for all W=1 warnings, I think better to send > > to catch up last train for 4.19, mostly kernel doc comments > >

[Intel-gfx] [PULL] gvt-next for 4.19

2018-07-16 Thread Zhenyu Wang
) gvt-next-2018-07-17 - Fix all left W=1 warnings Zhenyu Wang (2): drm/i915/gvt: make dma map/unmap kvmgt functions as static drm/i915/gvt: Fix W=1 warnings drivers/gpu/drm/i915/gvt

Re: [Intel-gfx] [PATCH 1/1] Revert "iommu/vt-d: Clean up pasid quirk for pre-production devices"

2018-07-16 Thread Zhenyu Wang
On 2018.07.16 14:02:12 +0800, Lu Baolu wrote: > Hi Joerg, > > The graphic guys are looking forward to having this in 4.18. > Is it possible to take it in the following rcs? > This breakes intel gfx driver in 4.18 when gfx dmar is on. Please include this fix ASAP. Tested-

Re: [Intel-gfx] [PATCH 3/6] drm/i915/gtt: Disable read-only support under GVT

2018-07-12 Thread Zhenyu Wang
On 2018.07.12 20:36:03 +, Bloomfield, Jon wrote: > > -Original Message- > > From: Chris Wilson > > Sent: Thursday, July 12, 2018 11:53 AM > > To: intel-gfx@lists.freedesktop.org > > Cc: Chris Wilson ; Zhenyu Wang > > ; Bloomfield, Jon

Re: [Intel-gfx] [PATCH] drm/i915/kvmgt: Fix compilation error

2018-07-12 Thread Zhenyu Wang
eam gvt requires this fix. Acked-by: Zhenyu Wang Thanks! > Reported-by: Tomasz Lis > Signed-off-by: Micha?? Winiarski > Cc: Changbin Du > Cc: Zhenyu Wang > --- > drivers/gpu/drm/i915/gvt/kvmgt.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/drivers

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

2018-07-11 Thread Zhenyu Wang
On 2018.07.11 08:45:08 +0100, Chris Wilson wrote: > Quoting Zhenyu Wang (2018-07-11 03:33:53) > > > > Hi, > > > > Here's last gvt-next pull for 4.19. Biggest change is to > > add vGPU huge page support for guest, with one BXT fix and > > gvt dependency han

[Intel-gfx] [PULL] gvt-fixes for 4.18

2018-07-10 Thread Zhenyu Wang
Hi, Here's one gvt fix for KBL vGPU hang to update virtual register from LRI. Thanks. -- The following changes since commit a4cae23cc05ccec749c2fc70fa9d8cda7c582319: drm/i915/gvt: changed DDI mode emulation type (2018-07-02 11:09:59 +0800) are available in the Git repository at:

[Intel-gfx] [PULL] gvt-next for 4.19

2018-07-10 Thread Zhenyu Wang
Hi, Here's last gvt-next pull for 4.19. Biggest change is to add vGPU huge page support for guest, with one BXT fix and gvt dependency handling. Thanks. -- The following changes since commit 57c8a484a9cbf1315b5299702d12aef04867: drm/i915: Enable KVMGT for BXT. (2018-06-13 10:57:30 +0800)

Re: [Intel-gfx] [PATCH v4] drm/i915/gvt: declare gvt as i915's soft dependency

2018-07-09 Thread Zhenyu Wang
On 2018.07.09 18:24:10 +0800, intel-gvt-dev-boun...@lists.freedesktop.org wrote: > From: Hang Yuan > > This helps initramfs builder and other tools to know the full dependencies > of i915 and have gvt module loaded with i915. > > v2: add condition and change to pre-dependency (Chris) > v3:

Re: [Intel-gfx] [PATCH v3] drm/i915/gvt: declare gvt as i915's soft dependency

2018-07-05 Thread Zhenyu Wang
On 2018.07.04 11:07:45 +0800, intel-gfx-boun...@lists.freedesktop.org wrote: > From: Hang Yuan > > This helps initramfs builder and other tools to know the full dependencies > of i915 and have gvt module loaded with i915. > > v2: add condition and change to pre-dependency (Chris) > v3: move

[Intel-gfx] [PULL] gvt-fixes for 4.18

2018-07-03 Thread Zhenyu Wang
Hi, Here's two gvt fixes for 4.18. One is for guest warning to change virtual transcoder mode for DVI to align with our virtual display, and one to fix possible partial GGTT entry update from guest. thanks -- The following changes since commit 7a3727f385dc64773db1c144f6b15c1e9d4735bb:

[Intel-gfx] [PULL] gvt-next

2018-06-19 Thread Zhenyu Wang
): drm/i915/gvt: Deliver guest cursor hotspot info Xinyun Liu (3): drm/i915/gvt: Avoid dereference a potential null pointer drm/i915/gvt: removed unnecessary boundary check drm/i915/gvt: use array to avoid potential buffer overflow Zhenyu Wang (1): Merge tag 'drm-intel

Re: [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gvt: Enable KVMGT for BXT

2018-06-12 Thread Zhenyu Wang
On 2018.06.11 10:09:52 +0100, Chris Wilson wrote: > Quoting Patchwork (2018-06-11 10:05:46) > > == Series Details == > > > > Series: drm/i915/gvt: Enable KVMGT for BXT > > URL : https://patchwork.freedesktop.org/series/44551/ > > State : success > > > > == Summary == > > > > = CI Bug Log -

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

2018-06-06 Thread Zhenyu Wang
On 2018.04.19 15:39:48 +0800, Zhenyu Wang wrote: > > Hi, > > Here's current gvt fixes for 4.17 with several kernel warning > and other misc fixes as detailed below. > > p.s: I'll be on vacation from next week till May 2, Zhi will cover for me. > > Thanks >

Re: [Intel-gfx] [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-22 Thread Zhenyu Wang
equivalent course grained serialization if > necessary. Of course it would be better to implement that sooner > rather than later if required. > > I see that __intel_gvt_create_vgpu() makes use of gvt->lock, which > would seem to already provide this level of per-parent l

[Intel-gfx] [PATCH v2] drm/i915/gvt: Fix crash after request->hw_context change

2018-05-21 Thread Zhenyu Wang
ntel.com> Cc: Zhi Wang <zhi.a.w...@intel.com> Cc: Weinan Li <weinan.z...@intel.com> Signed-off-by: Zhenyu Wang <zhen...@linux.intel.com> --- drivers/gpu/drm/i915/gvt/scheduler.c | 52 +--- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/drivers/

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix crash after request->hw_context change

2018-05-20 Thread Zhenyu Wang
On 2018.05.18 11:22:06 +0100, Chris Wilson wrote: > Quoting Zhenyu Wang (2018-05-18 11:13:05) > > When we do shadowing, workload's request might not be allocated yet, > > so we still require shadow context's object. And when complete workload, > > delay to zero workload's

Re: [Intel-gfx] ??? Fi.CI.BAT: failure for drm/i915/gvt: Fix crash after request->hw_context change

2018-05-18 Thread Zhenyu Wang
On 2018.05.18 12:03:02 +0100, Chris Wilson wrote: > Quoting Patchwork (2018-05-18 11:55:01) > > == Series Details == > > > > Series: drm/i915/gvt: Fix crash after request->hw_context change > > URL : https://patchwork.freedesktop.org/series/43406/ > > State : failure > > > > == Summary == > >

[Intel-gfx] [PATCH] drm/i915/gvt: Fix crash after request->hw_context change

2018-05-18 Thread Zhenyu Wang
ntext in i915_request") Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursu...@intel.com> Signed-off-by: Zhenyu Wang <zhen...@linux.intel.com> --- drivers/gpu/drm/i915/gvt/scheduler.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --gi

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Store a pointer to intel_context in i915_request

2018-05-18 Thread Zhenyu Wang
On 2018.05.18 09:42:47 +0100, Chris Wilson wrote: > Quoting Tvrtko Ursulin (2018-05-18 08:43:33) > > > > On 18/05/2018 04:21, Zhenyu Wang wrote: > > > On 2018.05.17 22:26:32 +0100, Chris Wilson wrote: > > >> To ease the frequent and ugly pointer dance of

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Store a pointer to intel_context in i915_request

2018-05-17 Thread Zhenyu Wang
@intel.com> > --- > drivers/gpu/drm/i915/gvt/mmio_context.c | 6 +- > drivers/gpu/drm/i915/gvt/mmio_context.h | 2 +- > drivers/gpu/drm/i915/gvt/scheduler.c | 141 +++--- > drivers/gpu/drm/i915/gvt/scheduler.h | 1 - gvt change looks fi

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof

2018-05-17 Thread Zhenyu Wang
> > > > > > Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> > > > Cc: Zhenyu Wang <zhen...@linux.intel.com> > > > Cc: Zhi Wang <zhi.a.w...@intel.com> > > > > Reviewed-by: Mika Kuoppala <mika.kuopp...@intel.com> >

Re: [Intel-gfx] [PATCH v6 04/14] drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE

2018-05-10 Thread Zhenyu Wang
On 2018.05.10 16:17:35 +0100, Matthew Auld wrote: > > @@ -934,6 +944,20 @@ static int ppgtt_invalidate_spt(struct > > intel_vgpu_ppgtt_spt *spt) > > return ret; > > } > > > > +static bool vgpu_ips_enabled(struct intel_vgpu *vgpu) > > +{ > > + if (INTEL_GEN(vgpu->gvt->dev_priv) ==

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

2018-04-19 Thread Zhenyu Wang
On 2018.04.19 12:34:16 +0300, Jani Nikula wrote: > On Thu, 19 Apr 2018, Zhi Wang wrote: > > Hi: > > > > Here is the pull request of gvt-next for 4.17 with some new features and > > optimizations. > > > > Thanks, > > Zhi. > > > > -- > > The following changes since commit

[Intel-gfx] [PULL] gvt-fixes for 4.17

2018-04-19 Thread Zhenyu Wang
: Dereference msi eventfd_ctx when it isn't used anymore Zhenyu Wang (1): Back merge 'drm-intel-fixes' into gvt-fixes drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/display.h| 2 +- drivers/gpu/drm/i915/gvt/handlers.c | 13 + drivers/gpu/drm/i915/gvt

Re: [Intel-gfx] [PATCH v4] drm/i915/gvt: Deliver guest cursor hotspot info

2018-04-16 Thread Zhenyu Wang
_hot/y_hot is invalid. (Zhenyu) > - correct version. > > v2->v3: > - add validate_hotspot(). (Zhenyu) > > v1->v2: > - name as cursor_x_hot/cursor_y_hot. (Zhenyu) > - use i915_reg_t definition instead of magic numbers. (Zhenyu) > > Signed-off-by:

[Intel-gfx] [PULL] gvt-fixes for 4.17-rc1

2018-04-03 Thread Zhenyu Wang
Hi, Here's refreshed fixes for 4.17-rc1 with regression one removed, contains a few fixes for vfio ioctl and dmabuf interface, properly dma unmap for ggtt, etc. thanks -- The following changes since commit d8303075699292008ae5b2c8fc728d455b994c26: drm/i915/gvt: force to set all context

Re: [Intel-gfx] [PATCH] drm/i915: Move vgpu balloon info into i915_virtual_gpu struct

2018-04-02 Thread Zhenyu Wang
re. > > Signed-off-by: Xiong Zhang <xiong.y.zh...@intel.com> > --- Acked-by: Zhenyu Wang <zhen...@linux.intel.com> > drivers/gpu/drm/i915/i915_drv.h | 14 > drivers/gpu/drm/i915/i915_vgpu.c | 47 > >

Re: [Intel-gfx] [PATCH] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest

2018-03-30 Thread Zhenyu Wang
On 2018.03.30 07:01:02 +, Zhang, Xiong Y wrote: > > + Zhi and Zhenyu > > > > Quoting Xiong Zhang (2018-03-29 13:58:41) > > > Four drm_mm_node are used to reserve guest ggtt space, but some of > > > them may aren't initialized and used in intel_vgt_balloon(), so these > > > unused drm_mm_node

Re: [Intel-gfx] [PULL] more gvt-next-fixes for 4.17

2018-03-30 Thread Zhenyu Wang
On 2018.03.28 16:26:17 +0800, Zhenyu Wang wrote: > > Hi, Joonas > > Here's refreshed pull for 4.17 without that revert patch which > also include new fixes for ggtt dma unmap and virtual display. > Joonas, pls ignore this one, smoke test pass but seems new issue found in fu

Re: [Intel-gfx] [PULL] more gvt-next-fixes for 4.17

2018-03-28 Thread Zhenyu Wang
On 2018.03.27 17:39:53 +0300, Joonas Lahtinen wrote: > Quoting Joonas Lahtinen (2018-03-27 16:42:28) > > Quoting Zhenyu Wang (2018-03-27 11:39:42) > > > > > > Hi, Joonas > > > > > > Here's this week's gvt-next-fixes queued for 4.17. One notable

Re: [Intel-gfx] [PULL] more gvt-next-fixes for 4.17

2018-03-27 Thread Zhenyu Wang
On 2018.03.27 16:42:28 +0300, Joonas Lahtinen wrote: > Quoting Zhenyu Wang (2018-03-27 11:39:42) > > > > Hi, Joonas > > > > Here's this week's gvt-next-fixes queued for 4.17. One notable change > > is to revert previous workaround for gvt context preemp

[Intel-gfx] [PULL] more gvt-next-fixes for 4.17

2018-03-27 Thread Zhenyu Wang
Hi, Joonas Here's this week's gvt-next-fixes queued for 4.17. One notable change is to revert previous workaround for gvt context preemption, now it has full support for preemption now. Others are normal fixes and optimizations. Thanks -- The following changes since commit

Re: [Intel-gfx] [PATCH] drm/i915/gvt/scheduler: Remove unnecessary NULL checks in sr_oa_regs

2018-03-22 Thread Zhenyu Wang
On 2018.03.22 21:31:33 +, Chris Wilson wrote: > Quoting Gustavo A. R. Silva (2018-03-22 18:21:54) > > The checks are misleading and not required [1]. > > > > [1] https://lkml.org/lkml/2018/3/19/1792 > > > > Addresses-Coverity-ID: 1466017 > > Cc: Chris Wilson > >

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

2018-03-19 Thread Zhenyu Wang
oried" -> "destroyed" Colin Xu (1): drm/i915/gvt: Remove reduntant printing of untracked mmio Zhenyu Wang (1): drm/i915/gvt: force to set all context control bits from guest Zhi Wang (2): drm/i915/gvt: Invalidate vGPU PPGTT mm objects during a vGPU reset. drm/i915

[Intel-gfx] [PULL] more gvt-fixes for 4.16

2018-03-15 Thread Zhenyu Wang
) Min He (1): drm/i915/gvt: keep oa config in shadow ctx Xiong Zhang (1): drm/i915/gvt: Add runtime_pm_get/put into gvt_switch_mmio Zhenyu Wang (1): drm/i915/gvt: fix user copy warning by whitelist workload rb_tail field fred gao (1): drm/i915/gvt

Re: [Intel-gfx] [PATCH][drm-next] drm/i915/gvt: fix spelling mistake: "destoried" -> "destroyed"

2018-03-12 Thread Zhenyu Wang
On 2018.03.12 12:43:58 +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in gvt_err error message text. > > Signed-off-by: Colin Ian King > --- Thanks Colin, will pick up. > drivers/gpu/drm/i915/gvt/gtt.c

[Intel-gfx] [PULL] gvt-next for 4.17

2018-03-07 Thread Zhenyu Wang
/i915/gvt: Release gvt->lock at the failure of finding page track drm/i915/gvt: Return error at the failure of finding page_track Zhenyu Wang (7): drm/i915/gvt: Fix one gvt_vgpu_error() use in dmabuf.c drm/i915/gvt: remove gvt max port definition drm/i915/gvt: Fix vGPU sc

Re: [Intel-gfx] [PULL] git-fixes for 4.16-rc2

2018-02-21 Thread Zhenyu Wang
On 2018.02.20 20:15:22 +, Chris Wilson wrote: > Quoting Zhenyu Wang (2018-02-14 05:28:27) > > > > Hi, here's current gvt-fixes pull for 4.16-rc2, as it is close for > > chinese new year, team would take one week off at least, so like to > > send this out before va

[Intel-gfx] [PULL] git-fixes for 4.16-rc2

2018-02-13 Thread Zhenyu Wang
Hi, here's current gvt-fixes pull for 4.16-rc2, as it is close for chinese new year, team would take one week off at least, so like to send this out before vacation. This has one to fix GTT mmio 8b access from guest and two simple ones for mmio switch and typo fix. And sorry that patchwork link

Re: [Intel-gfx] [PULL] gvt-next-fixes for 4.16

2018-02-06 Thread Zhenyu Wang
On 2018.02.06 11:45:04 -0800, Rodrigo Vivi wrote: > > Hi Zhi, > > Daniel asked few weeks ago about the scripts that you run there, > but I didn't see any follow-up. > > I don't understand why yet, but apparently gvt pull request > is not going to patchwork so dim is not able to add the "Link:"

Re: [Intel-gfx] [PULL] gvt-next fixes for 4.16

2018-01-18 Thread Zhenyu Wang
On 2018.01.17 08:03:49 -0800, Rodrigo Vivi wrote: > > > > Zhenyu Wang (2): > > drm/i915/gvt: cancel virtual vblank timer when no vGPU exists > > drm/i915/gvt: cancel scheduler timer when no vGPU exists > > dim: ERROR: 0eb582541cfd7a17b6fcf9282c966c0

Re: [Intel-gfx] [PULL] gvt-next fixes for 4.16

2018-01-18 Thread Zhenyu Wang
Zhang (1): drm/i915/gvt: Keep obj->dma_buf link NULL during exporting Xiong Zhang (1): drm/i915/gvt: Fix gen8/9_render_mmio_list[0] don't take effect Zhenyu Wang (2): drm/i915/gvt: cancel virtual vblank timer when no vGPU exists drm/i915/gvt: cancel scheduler timer when

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

2018-01-16 Thread Zhenyu Wang
array Pei Zhang (1): drm/i915/gvt: add PLANE_KEYMAX regs to mmio track list Tina Zhang (1): drm/i915/gvt: Keep obj->dma_buf link NULL during exporting Xiong Zhang (1): drm/i915/gvt: Fix gen8/9_render_mmio_list[0] don't take effect Zhenyu Wang (2): drm/i915/gvt: cancel virt

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/guc: Don't enable GuC when vGPU is active

2018-01-15 Thread Zhenyu Wang
On 2018.01.15 12:07:28 +0200, Joonas Lahtinen wrote: > On Fri, 2018-01-12 at 14:08 +0800, Du, Changbin wrote: > > On Fri, Jan 12, 2018 at 11:32:30AM +0530, Sagar Arun Kamble wrote: > > > Is skl-gvtdvm not having vGPU active? > > > > > > It has flag X86_FEATURE_HYPERVISOR set however it might be

[Intel-gfx] [PULL] gvt-fixes for 4.15

2018-01-07 Thread Zhenyu Wang
Hi, Final gvt fixes for 4.15 with two more fixes. One is to fix some windows driver issues for shadow gtt from Zhi. Another is for runtime kasan warning of stack out-of-bound. thanks -- The following changes since commit f5f00e7dcc4161f07b76ff1a854e8b1ea7a1ed41: drm/i915/gvt: Fix pipe A

Re: [Intel-gfx] [PULL] more gvt-next for 4.16

2017-12-22 Thread Zhenyu Wang
: refine trace_render_mmio drm/i915/gvt: optimize for vGPU mmio switch drm/i915/gvt: refine mocs save restore policy drm/i915/gvt: load host render mocs once in mocs switch Xiaolin Zhang (1): drm/i915/gvt: Fix pipe A enable as default for vgpu Zhenyu Wang (4): Merge t

Re: [Intel-gfx] [PULL] more gvt-next for 4.16

2017-12-21 Thread Zhenyu Wang
On 2017.12.21 19:07:07 -0800, Rodrigo Vivi wrote: > On Fri, Dec 22, 2017 at 02:43:06AM +0000, Zhenyu Wang wrote: > > > > Hi, > > > > Here's last gvt-next pull for 4.16 merge window. I need to backmerge > > once for one i915 param change to resolve patch dependen

[Intel-gfx] [PULL] more gvt-next for 4.16

2017-12-21 Thread Zhenyu Wang
once in mocs switch Xiaolin Zhang (1): drm/i915/gvt: Fix pipe A enable as default for vgpu Zhenyu Wang (4): Merge tag 'drm-intel-next-2017-12-14' into gvt-next drm/i915/gvt: always use i915_reg_t for MMIO handler definition drm/i915/gvt: cleanup usage for typed mmio reg vs

[Intel-gfx] [PULL] gvt-fixes for 4.15

2017-12-20 Thread Zhenyu Wang
Hi, Please pull one fix for 4.15 that correct default pipe enable for virtual display in a previous commit from Xiaolin. thanks -- The following changes since commit 11474e9091cf2002e948647fd9f63a7f027e488a: drm/i915/gvt: set max priority for gvt context (2017-12-06 11:38:21 +0800) are

[Intel-gfx] [PULL] more gvt-next for 4.16

2017-12-13 Thread Zhenyu Wang
Hi, Please pull more gvt-next updates for 4.16. Mostly on code and regression fixes for last two gvt-next pulls and more refinement. Details below. thanks -- The following changes since commit 1603660b3342269c95fcafee1945790342a8c28e: drm/i915/gvt: set max priority for gvt context

Re: [Intel-gfx] [PATCH] drm/i915/gvt/fb_decoder: Fix out-of-bounds read

2017-12-11 Thread Zhenyu Wang
On 2017.12.09 00:37:59 -0600, Gustavo A. R. Silva wrote: > In case function skl_format_to_drm returns -EINVAL, fmt turns into a huge > number as fmt is of type u32, hence there is an out-of-bounds read when > using fmt as an index for array skl_pixel_formats at line 225: > plane->bpp =

[Intel-gfx] [GIT PULL] gvt-fixes for 4.15-rc3

2017-12-05 Thread Zhenyu Wang
(1): drm/i915/gvt: Limit read hw reg to active vgpu Zhenyu Wang (2): drm/i915/gvt: Don't mark vgpu context as inactive when preempted drm/i915/gvt: set max priority for gvt context Zhi Wang (1): drm/i915/gvt: Export intel_gvt_render_mmio_to_ring_id() drivers/gpu/drm/i915

Re: [Intel-gfx] Fixes that failed to cleanly apply to v4.15-rc1

2017-12-05 Thread Zhenyu Wang
On 2017.12.05 17:02:34 +0200, Joonas Lahtinen wrote: > Dropping GVT folks that are not affected. > > Keeping Zhenyu and Zhi as a heads-up, there's no need for GVT pull for this > rc? > I need to backport one from -next once it's pulled and it's done now. I will send a fixes pull today. thanks

[Intel-gfx] [GIT PULL] more gvt-next for 4.16

2017-12-04 Thread Zhenyu Wang
buf support for GVT-g drm/i915/gvt: Handle orphan dmabuf_objs drm/i915/gvt: Introduce KBL to dma-buf on Gvt-g drm/i915/gvt: Free dmabuf_obj list in intel_vgpu_dmabuf_cleanup Xiong Zhang (1): drm/i915/gvt: Alloc and Init guest opregion at vgpu creation Zhenyu Wang (2):

Re: [Intel-gfx] [PATCH] i915/gvt: make release_shadow_wa_ctx static.

2017-12-04 Thread Zhenyu Wang
On 2017.12.04 15:15:28 +0200, Joonas Lahtinen wrote: > + GVT-g list > > Zhenyu, please pick this up. > I've queued fixes from Chris for this and will just send for next pull. thanks. > > On Mon, 2017-12-04 at 09:42 +1000, Dave Airlie wrote: > > From: Dave Airlie > > > >

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix out-of-bounds buffer write into opregion->signature[]

2017-12-03 Thread Zhenyu Wang
On 2017.11.21 10:19:21 +, Chris Wilson wrote: > Quoting Zhenyu Wang (2017-11-21 03:19:51) > > On 2017.11.20 21:15:16 +, Chris Wilson wrote: > > > sparse spots > > > > > > drivers/gpu/drm/i915/gvt/opregion.c:234 alloc_and_init_virt_opregion() > >

Re: [Intel-gfx] linux-next: Signed-off-by missing for commits in the drm tree

2017-12-03 Thread Zhenyu Wang
On 2017.12.04 10:57:35 +1100, Stephen Rothwell wrote: > Hi all, > > There is a series of commits > > 54cff6479fd8 - c1802534e5a6 > (not all in that range) > > that are missing a Signed-off-by from their committer. > They were originally committed by Zhi himself, but I had to rebase onto

[Intel-gfx] [GIT PULL] gvt fixes for 4.15-rc2

2017-11-28 Thread Zhenyu Wang
Hi, Pls pull gvt fixes for 4.15-rc2, which contains one backport from f2880e04f3a5 ("drm/i915/gvt: Move request alloc to dispatch_workload path only"), and more new fixes. thanks -- The following changes since commit ac29fc66855b79c2960c63a4a66952d5b721d698: drm/i915: fix

Re: [Intel-gfx] Fixes that failed to cleanly apply to v4.15-rc1

2017-11-28 Thread Zhenyu Wang
On 2017.11.28 10:54:27 +0200, Joonas Lahtinen wrote: > Hello, > > TL;DR Reply with backported patches for v4.15-rc1 latest TODAY > > Dear patch authors/Cc:s, the following patches failed to cleanly > backport to v4.15-rc1, if you believe they still are valid patches to > be included in

[Intel-gfx] [GIT PULL] git fixes for 4.15

2017-11-23 Thread Zhenyu Wang
Hi, Here's current gvt fixes for 4.15. One is backport from f2880e04f3a5 ("drm/i915/gvt: Move request alloc to dispatch_workload path only"). And other two regression fixes. thanks -- The following changes since commit 3572f04c69ed4369da5d3c65d84fb18774aa60b6: drm/i915: Fix

Re: [Intel-gfx] [PATCH v18 0/6] drm/i915/gvt: Dma-buf support for GVT-g

2017-11-22 Thread Zhenyu Wang
On 2017.11.15 11:49:00 +0100, Gerd Hoffmann wrote: > On Wed, Nov 15, 2017 at 05:11:49PM +0800, Tina Zhang wrote: > > v17->v18: > > 1) unmap vgpu's opregion when destroying vgpu. > > 2) update comments for VFIO_DEVICE_GET_GFX_DMABUF. (Alex) > > > This patch set adds the dma-buf support for intel

<    1   2   3   4   5   6   7   8   >