Re: [PATCH] /drm/i915/gvt: Wrong enable_pvmmio value after vgpu reset


Wu, Xiaoguang
 

PVMMIO feature will be discarded when acrn-kernel changes to IDV solution.

-----Original Message-----
From: Wang, Yu1 <yu1.wang@...>
Sent: Monday, July 6, 2020 6:08 PM
To: acrn-dev@...; Wu, Xiaoguang
<xiaoguang.wu@...>
Cc: min.he@...; Sun, Peng P <peng.p.sun@...>
Subject: Re: [acrn-dev] [PATCH] /drm/i915/gvt: Wrong enable_pvmmio value
after vgpu reset

On 19-08-26 14:08:21, Sun Peng wrote:
vGPU reset will re-read pvmmio value from i915.params, but get wrong
value because using a bool type varible to store a u32 value.

Signed-off-by: Sun Peng <peng.p.sun@...>
Tracked-On: ACRN-5088
---
drivers/gpu/drm/i915/gvt/vgpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c
b/drivers/gpu/drm/i915/gvt/vgpu.c index 17221f9f8030..4d89518d8992
100644
--- a/drivers/gpu/drm/i915/gvt/vgpu.c
+++ b/drivers/gpu/drm/i915/gvt/vgpu.c
@@ -546,7 +546,7 @@ void intel_gvt_reset_vgpu_locked(struct intel_vgpu
*vgpu, bool dmlr,
unsigned int resetting_eng = dmlr ? ALL_ENGINES : engine_mask;
enum intel_engine_id i;
struct intel_engine_cs *engine;
- bool enable_pvmmio = vgpu_vreg_t(vgpu,
vgtif_reg(enable_pvmmio));
+ u32 enable_pvmmio = vgpu_vreg_t(vgpu,
vgtif_reg(enable_pvmmio));
What should be returned for read enable_pvmmio? I think the bool is 1 byte
access size unless the enable_pvmmio returned 1+ bytes value.
Loop Xiaoguang to comment.


gvt_dbg_core("------------------------------------------\n");
gvt_dbg_core("resseting vgpu%d, dmlr %d, engine_mask %08x\n",
--
2.21.0



Join acrn-dev@lists.projectacrn.org to automatically receive all group messages.