Lines Matching refs:wa_ctx
2874 static int scan_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx) in scan_wa_ctx() argument
2880 struct intel_vgpu_workload *workload = container_of(wa_ctx, in scan_wa_ctx()
2882 wa_ctx); in scan_wa_ctx()
2885 if (WARN_ON(!IS_ALIGNED(wa_ctx->indirect_ctx.guest_gma, in scan_wa_ctx()
2889 ring_tail = wa_ctx->indirect_ctx.size + 3 * sizeof(u32); in scan_wa_ctx()
2890 ring_size = round_up(wa_ctx->indirect_ctx.size + CACHELINE_BYTES, in scan_wa_ctx()
2892 gma_head = wa_ctx->indirect_ctx.guest_gma; in scan_wa_ctx()
2893 gma_tail = wa_ctx->indirect_ctx.guest_gma + ring_tail; in scan_wa_ctx()
2894 gma_bottom = wa_ctx->indirect_ctx.guest_gma + ring_size; in scan_wa_ctx()
2900 s.ring_start = wa_ctx->indirect_ctx.guest_gma; in scan_wa_ctx()
2904 s.rb_va = wa_ctx->indirect_ctx.shadow_va; in scan_wa_ctx()
2913 wa_ctx->indirect_ctx.guest_gma, ring_size); in scan_wa_ctx()
2996 static int shadow_indirect_ctx(struct intel_shadow_wa_ctx *wa_ctx) in shadow_indirect_ctx() argument
2998 int ctx_size = wa_ctx->indirect_ctx.size; in shadow_indirect_ctx()
2999 unsigned long guest_gma = wa_ctx->indirect_ctx.guest_gma; in shadow_indirect_ctx()
3000 struct intel_vgpu_workload *workload = container_of(wa_ctx, in shadow_indirect_ctx()
3002 wa_ctx); in shadow_indirect_ctx()
3039 wa_ctx->indirect_ctx.obj = obj; in shadow_indirect_ctx()
3040 wa_ctx->indirect_ctx.shadow_va = map; in shadow_indirect_ctx()
3050 static int combine_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx) in combine_wa_ctx() argument
3055 if (!wa_ctx->per_ctx.valid) in combine_wa_ctx()
3059 per_ctx_start[1] = wa_ctx->per_ctx.guest_gma; in combine_wa_ctx()
3061 bb_start_sva = (unsigned char *)wa_ctx->indirect_ctx.shadow_va + in combine_wa_ctx()
3062 wa_ctx->indirect_ctx.size; in combine_wa_ctx()
3069 int intel_gvt_scan_and_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx) in intel_gvt_scan_and_shadow_wa_ctx() argument
3072 struct intel_vgpu_workload *workload = container_of(wa_ctx, in intel_gvt_scan_and_shadow_wa_ctx()
3074 wa_ctx); in intel_gvt_scan_and_shadow_wa_ctx()
3077 if (wa_ctx->indirect_ctx.size == 0) in intel_gvt_scan_and_shadow_wa_ctx()
3080 ret = shadow_indirect_ctx(wa_ctx); in intel_gvt_scan_and_shadow_wa_ctx()
3086 combine_wa_ctx(wa_ctx); in intel_gvt_scan_and_shadow_wa_ctx()
3088 ret = scan_wa_ctx(wa_ctx); in intel_gvt_scan_and_shadow_wa_ctx()