diff options
| -rw-r--r-- | drivers/gpu/drm/i915/gvt/scheduler.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c index 1127bd77fc6e..a55b4975c154 100644 --- a/drivers/gpu/drm/i915/gvt/scheduler.c +++ b/drivers/gpu/drm/i915/gvt/scheduler.c | |||
| @@ -124,8 +124,14 @@ static int populate_shadow_context(struct intel_vgpu_workload *workload) | |||
| 124 | #define COPY_REG(name) \ | 124 | #define COPY_REG(name) \ |
| 125 | intel_gvt_hypervisor_read_gpa(vgpu, workload->ring_context_gpa \ | 125 | intel_gvt_hypervisor_read_gpa(vgpu, workload->ring_context_gpa \ |
| 126 | + RING_CTX_OFF(name.val), &shadow_ring_context->name.val, 4) | 126 | + RING_CTX_OFF(name.val), &shadow_ring_context->name.val, 4) |
| 127 | #define COPY_REG_MASKED(name) {\ | ||
| 128 | intel_gvt_hypervisor_read_gpa(vgpu, workload->ring_context_gpa \ | ||
| 129 | + RING_CTX_OFF(name.val),\ | ||
| 130 | &shadow_ring_context->name.val, 4);\ | ||
| 131 | shadow_ring_context->name.val |= 0xffff << 16;\ | ||
| 132 | } | ||
| 127 | 133 | ||
| 128 | COPY_REG(ctx_ctrl); | 134 | COPY_REG_MASKED(ctx_ctrl); |
| 129 | COPY_REG(ctx_timestamp); | 135 | COPY_REG(ctx_timestamp); |
| 130 | 136 | ||
| 131 | if (ring_id == RCS) { | 137 | if (ring_id == RCS) { |
| @@ -134,6 +140,7 @@ static int populate_shadow_context(struct intel_vgpu_workload *workload) | |||
| 134 | COPY_REG(rcs_indirect_ctx_offset); | 140 | COPY_REG(rcs_indirect_ctx_offset); |
| 135 | } | 141 | } |
| 136 | #undef COPY_REG | 142 | #undef COPY_REG |
| 143 | #undef COPY_REG_MASKED | ||
| 137 | 144 | ||
| 138 | intel_gvt_hypervisor_read_gpa(vgpu, | 145 | intel_gvt_hypervisor_read_gpa(vgpu, |
| 139 | workload->ring_context_gpa + | 146 | workload->ring_context_gpa + |
