#define _EL_OFFSET_STATUS_PTR   0x3A0
 
 #define execlist_ring_mmio(gvt, ring_id, offset) \
-       (gvt->dev_priv->engine[ring_id].mmio_base + (offset))
+       (gvt->dev_priv->engine[ring_id]->mmio_base + (offset))
 
 #define valid_context(ctx) ((ctx)->valid)
 #define same_context(a, b) (((a)->context_id == (b)->context_id) && \
 
                        workload->ctx_desc.lrca);
 
        context_page_num = intel_lr_context_size(
-                       &gvt->dev_priv->engine[ring_id]);
+                       gvt->dev_priv->engine[ring_id]);
 
        context_page_num = context_page_num >> PAGE_SHIFT;
 
        shadow_ctx->desc_template = workload->ctx_desc.addressing_mode <<
                                    GEN8_CTX_ADDRESSING_MODE_SHIFT;
 
-       workload->req = i915_gem_request_alloc(&dev_priv->engine[ring_id],
+       workload->req = i915_gem_request_alloc(dev_priv->engine[ring_id],
                                               shadow_ctx);
        if (IS_ERR_OR_NULL(workload->req)) {
                gvt_err("fail to allocate gem request\n");
                        workload->ctx_desc.lrca);
 
        context_page_num = intel_lr_context_size(
-                       &gvt->dev_priv->engine[ring_id]);
+                       gvt->dev_priv->engine[ring_id]);
 
        context_page_num = context_page_num >> PAGE_SHIFT;