| /src/sys/external/bsd/drm2/dist/drm/i915/gvt/ | 
| gvt.c | 1 /*	$NetBSD: gvt.c,v 1.2 2021/12/18 23:45:31 riastradh Exp $	*/ 36 __KERNEL_RCSID(0, "$NetBSD: gvt.c,v 1.2 2021/12/18 23:45:31 riastradh Exp $");
 43 #include "gvt.h"
 54 static struct intel_vgpu_type *intel_gvt_find_vgpu_type(struct intel_gvt *gvt,
 60 			&gvt->dev_priv->drm.pdev->dev);
 62 	for (i = 0; i < gvt->num_types; i++) {
 63 		t = &gvt->types[i];
 77 	void *gvt = kdev_to_i915(dev)->gvt;  local in function:available_instances_show
 79 	type = intel_gvt_find_vgpu_type(gvt, kobject_name(kobj))
 98  void *gvt = kdev_to_i915(dev)->gvt;  local in function:description_show
 215  struct intel_gvt *gvt = (struct intel_gvt *)data;  local in function:gvt_service_thread
 273  struct intel_gvt *gvt = to_gvt(dev_priv);  local in function:intel_gvt_clean_device
 310  struct intel_gvt *gvt;  local in function:intel_gvt_init_device
 419  void *gvt;  local in function:intel_gvt_register_hypervisor
 [all...]
 | 
| sched_policy.h | 43 	int (*init)(struct intel_gvt *gvt); 44 	void (*clean)(struct intel_gvt *gvt);
 51 void intel_gvt_schedule(struct intel_gvt *gvt);
 53 int intel_gvt_init_sched_policy(struct intel_gvt *gvt);
 55 void intel_gvt_clean_sched_policy(struct intel_gvt *gvt);
 65 void intel_gvt_kick_schedule(struct intel_gvt *gvt);
 
 | 
| cmd_parser.h | 47 void intel_gvt_clean_cmd_parser(struct intel_gvt *gvt); 49 int intel_gvt_init_cmd_parser(struct intel_gvt *gvt);
 
 | 
| vgpu.c | 40 #include "gvt.h" 106  * @gvt : GVT device
 111 int intel_gvt_init_vgpu_types(struct intel_gvt *gvt)
 129 	low_avail = gvt_aperture_sz(gvt) - HOST_LOW_GM_SIZE;
 130 	high_avail = gvt_hidden_sz(gvt) - HOST_HIGH_GM_SIZE;
 133 	gvt->types = kcalloc(num_types, sizeof(struct intel_vgpu_type),
 135 	if (!gvt->types)
 143 		gvt->types[i].low_gm_size = vgpu_types[i].low_mm;
 144 		gvt->types[i].high_gm_size = vgpu_types[i].high_mm
 278  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_gvt_destroy_vgpu
 536  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_gvt_reset_vgpu_locked
 [all...]
 | 
| sched_policy.c | 40 #include "gvt.h" 47 	for_each_engine(engine, vgpu->gvt->dev_priv, i) {
 73 	struct intel_gvt *gvt;  member in struct:gvt_sched_data
 85 	if (!vgpu || vgpu == vgpu->gvt->idle_vgpu)
 137 static void try_to_schedule_next_vgpu(struct intel_gvt *gvt)
 139 	struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler;
 160 	for_each_engine(engine, gvt->dev_priv, i) {
 177 	for_each_engine(engine, gvt->dev_priv, i)
 218 	struct intel_gvt *gvt = sched_data->gvt;  local in function:tbs_sched_func
 335  struct intel_gvt *gvt = vgpu->gvt;  local in function:tbs_sched_clean_vgpu
 [all...]
 | 
| mmio.c | 42 #include "gvt.h" 58 #define reg_is_mmio(gvt, reg)  \
 59 	(reg >= 0 && reg < gvt->device_info.mmio_size)
 61 #define reg_is_gtt(gvt, reg)   \
 62 	(reg >= gvt->device_info.gtt_start_offset \
 63 	 && reg < gvt->device_info.gtt_start_offset + gvt_ggtt_sz(gvt))
 68 	struct intel_gvt *gvt = NULL;  local in function:failsafe_emulate_mmio_rw
 75 	gvt = vgpu->gvt;
 110  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_emulate_mmio_read
 182  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_emulate_mmio_write
 241  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_reset_mmio
 [all...]
 | 
| aperture_gm.c | 44 #include "gvt.h" 48 	struct intel_gvt *gvt = vgpu->gvt;  local in function:alloc_gm
 49 	struct drm_i915_private *dev_priv = gvt->dev_priv;
 58 		start = ALIGN(gvt_hidden_gmadr_base(gvt), I915_GTT_PAGE_SIZE);
 59 		end = ALIGN(gvt_hidden_gmadr_end(gvt), I915_GTT_PAGE_SIZE);
 64 		start = ALIGN(gvt_aperture_gmadr_base(gvt), I915_GTT_PAGE_SIZE);
 65 		end = ALIGN(gvt_aperture_gmadr_end(gvt), I915_GTT_PAGE_SIZE);
 86 	struct intel_gvt *gvt = vgpu->gvt;  local in function:alloc_vgpu_gm
 135  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_write_fence
 170  struct intel_gvt *gvt = vgpu->gvt;  local in function:free_vgpu_fence
 194  struct intel_gvt *gvt = vgpu->gvt;  local in function:alloc_vgpu_fence
 235  struct intel_gvt *gvt = vgpu->gvt;  local in function:free_resource
 245  struct intel_gvt *gvt = vgpu->gvt;  local in function:alloc_resource
 [all...]
 | 
| gvt.h | 1 /*	$NetBSD: gvt.h,v 1.2 2021/12/18 23:45:31 riastradh Exp $	*/ 171 	struct intel_gvt *gvt;  member in struct:intel_vgpu
 180 	/* Both sched_data and sched_ctl can be seen a part of the global gvt
 304 	/* GVT scope lock, protect GVT itself, and all resource currently
 308 	/* scheduler scope lock, protect gvt and vgpu schedule related data */
 332 	 * use it with atomic bit ops so that no need to use gvt big lock.
 350 	return i915->gvt;
 363 static inline void intel_gvt_request_service(struct intel_gvt *gvt,
 366 	set_bit(service, (void *)&gvt->service_request)
 [all...]
 | 
| mmio.h | 74 int intel_gvt_render_mmio_to_ring_id(struct intel_gvt *gvt, 76 unsigned long intel_gvt_get_device_type(struct intel_gvt *gvt);
 77 bool intel_gvt_match_device(struct intel_gvt *gvt, unsigned long device);
 79 int intel_gvt_setup_mmio_info(struct intel_gvt *gvt);
 80 void intel_gvt_clean_mmio_info(struct intel_gvt *gvt);
 81 int intel_gvt_for_each_tracked_mmio(struct intel_gvt *gvt,
 82 	int (*handler)(struct intel_gvt *gvt, u32 offset, void *data),
 101 bool intel_gvt_in_force_nonpriv_whitelist(struct intel_gvt *gvt,
 
 | 
| firmware.c | 40 #include "gvt.h" 74 static int mmio_snapshot_handler(struct intel_gvt *gvt, u32 offset, void *data)
 76 	struct drm_i915_private *i915 = gvt->dev_priv;
 83 static int expose_firmware_sysfs(struct intel_gvt *gvt)
 85 	struct intel_gvt_device_info *info = &gvt->device_info;
 86 	struct pci_dev *pdev = gvt->dev_priv->drm.pdev;
 112 	memcpy(gvt->firmware.cfg_space, p, info->cfg_space_size);
 117 	intel_gvt_for_each_tracked_mmio(gvt, mmio_snapshot_handler, p);
 119 	memcpy(gvt->firmware.mmio, p, info->mmio_size);
 135 static void clean_firmware_sysfs(struct intel_gvt *gvt)
 [all...]
 | 
| debugfs.c | 31 #include "gvt.h" 63 static inline int mmio_diff_handler(struct intel_gvt *gvt,
 66 	struct drm_i915_private *i915 = gvt->dev_priv;
 93 	struct intel_gvt *gvt = vgpu->gvt;  local in function:vgpu_mmio_diff_show
 103 	mutex_lock(&gvt->lock);
 104 	spin_lock_bh(&gvt->scheduler.mmio_context_lock);
 106 	mmio_hw_access_pre(gvt->dev_priv);
 108 	intel_gvt_for_each_tracked_mmio(gvt, mmio_diff_handler, ¶m);
 109 	mmio_hw_access_post(gvt->dev_priv)
 [all...]
 | 
| gtt.c | 42 #include "gvt.h" 95 	if (WARN(!gvt_gmadr_is_valid(vgpu->gvt, h_addr),
 99 	if (gvt_gmadr_is_aperture(vgpu->gvt, h_addr))
 101 			+ (h_addr - gvt_aperture_gmadr_base(vgpu->gvt));
 104 			+ (h_addr - gvt_hidden_gmadr_base(vgpu->gvt));
 310 	const struct intel_gvt_device_info *info = &vgpu->gvt->device_info;
 323 		e->val64 = read_pte64(vgpu->gvt->dev_priv, index);
 335 	const struct intel_gvt_device_info *info = &vgpu->gvt->device_info;
 348 		write_pte64(vgpu->gvt->dev_priv, index, e->val64);
 558 	struct intel_gvt_gtt_pte_ops *pte_ops = mm->vgpu->gvt->gtt.pte_ops
 656  struct intel_gvt *gvt = spt->vgpu->gvt;  local in function:ppgtt_spt_get_entry
 685  struct intel_gvt *gvt = spt->vgpu->gvt;  local in function:ppgtt_spt_set_entry
 1306  struct intel_gvt *gvt = vgpu->gvt;  local in function:ppgtt_populate_spt
 1430  struct intel_gvt *gvt = vgpu->gvt;  local in function:sync_oos_page
 1472  struct intel_gvt *gvt = vgpu->gvt;  local in function:detach_oos_page
 1491  struct intel_gvt *gvt = spt->vgpu->gvt;  local in function:attach_oos_page
 1528  struct intel_gvt *gvt = spt->vgpu->gvt;  local in function:ppgtt_allocate_oos_page
 1782  struct intel_gvt *gvt = vgpu->gvt;  local in function:invalidate_ppgtt_mm
 1812  struct intel_gvt *gvt = vgpu->gvt;  local in function:shadow_ppgtt_mm
 1886  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_create_ppgtt_mm
 2076  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_gma_to_gpa
 2214  struct intel_gvt *gvt = vgpu->gvt;  local in function:emulate_ggtt_mmio_write
 2786  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_reset_ggtt
 [all...]
 | 
| Makefile | 2 GVT_DIR := gvt 3 GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
 
 | 
| mmio_context.h | 52 void intel_gvt_init_engine_mmio_context(struct intel_gvt *gvt); 
 | 
| mmio_context.c | 44 #include "gvt.h" 167 	struct intel_gvt *gvt = dev_priv->gvt;  local in function:load_render_mocs
 169 	u32 cnt = gvt->engine_mmio_list.mocs_mmio_offset_list_cnt;
 170 	u32 *regs = gvt->engine_mmio_list.mocs_mmio_offset_list;
 204 	struct intel_gvt *gvt = vgpu->gvt;  local in function:restore_context_mmio_for_inhibit
 206 	int count = gvt->engine_mmio_list.ctx_mmio_count[ring_id];
 220 	for (mmio = gvt->engine_mmio_list.mmio;
 354 	struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv
 [all...]
 | 
| interrupt.c | 38 #include "gvt.h" 152 		struct intel_gvt *gvt,
 155 	struct intel_gvt_irq *irq = &gvt->irq;
 183 	struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_reg_imr_handler
 184 	struct intel_gvt_irq_ops *ops = gvt->irq.ops;
 213 	struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_reg_master_irq_handler
 214 	struct intel_gvt_irq_ops *ops = gvt->irq.ops;
 252 	struct intel_gvt *gvt = vgpu->gvt  local in function:intel_vgpu_reg_ier_handler
 499  struct intel_gvt *gvt = irq_to_gvt(irq);  local in function:gen8_init_irq
 626  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_trigger_virtual_event
 654  struct intel_gvt *gvt;  local in function:vblank_timer_fn
 [all...]
 | 
| scheduler.c | 49 #include "gvt.h" 92 	struct drm_i915_private *dev_priv = workload->vgpu->gvt->dev_priv;
 135 	struct intel_gvt *gvt = vgpu->gvt;  local in function:populate_shadow_context
 186 	context_page_num = gvt->dev_priv->engine[ring_id]->context_size;
 190 	if (IS_BROADWELL(gvt->dev_priv) && ring_id == RCS0)
 220 	struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
 236 	struct intel_gvt *gvt = container_of(nb, struct intel_gvt,  local in function:shadow_context_status_change
 238 	struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler;
 325 	 * requests from gvt always set the has_init_breadcrumb flag, her
 453  struct intel_gvt *gvt = workload->vgpu->gvt;  local in function:prepare_shadow_batch_buffer
 791  struct intel_gvt *gvt = vgpu->gvt;  local in function:update_guest_context
 975  struct intel_gvt *gvt;  member in struct:workload_thread_param
 982  struct intel_gvt *gvt = p->gvt;  local in function:workload_thread
 1062  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_gvt_wait_vgpu_idle
 [all...]
 | 
| cfg_space.c | 40 #include "gvt.h" 117 	if (WARN_ON(offset + bytes > vgpu->gvt->device_info.cfg_space_size))
 310 	if (WARN_ON(offset + bytes > vgpu->gvt->device_info.cfg_space_size))
 366 	struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_init_cfg_space
 367 	const struct intel_gvt_device_info *info = &gvt->device_info;
 370 	memcpy(vgpu_cfg_space(vgpu), gvt->firmware.cfg_space,
 385 				 gvt_aperture_pa_base(gvt), true);
 399 				pci_resource_len(gvt->dev_priv->drm.pdev, 0);
 401 				pci_resource_len(gvt->dev_priv->drm.pdev, 2)
 [all...]
 | 
| display.c | 41 #include "gvt.h" 65 	struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
 77 	struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
 176 	struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
 360  * @gvt: a GVT device
 366 void intel_gvt_check_vblank_emulation(struct intel_gvt *gvt)
 368 	struct intel_gvt_irq *irq = &gvt->irq;
 373 	mutex_lock(&gvt->lock);
 374 	for_each_active_vgpu(gvt, vgpu, id)
 [all...]
 | 
| scheduler.h | 139 int intel_gvt_init_workload_scheduler(struct intel_gvt *gvt); 141 void intel_gvt_clean_workload_scheduler(struct intel_gvt *gvt);
 
 | 
| mpt.h | 39  * DOC: Hypervisor Service APIs for GVT-g Core Logic 41  * This is the glue layer between specific hypervisor MPT modules and GVT-g core
 43  * callbacks and will be attached to GVT host when the driver is loading.
 44  * GVT-g core logic will call these APIs to request specific services from
 49  * intel_gvt_hypervisor_host_init - init GVT-g host side
 55 						 void *gvt, const void *ops)
 60 	return intel_gvt_host.mpt->host_init(dev, gvt, ops);
 64  * intel_gvt_hypervisor_host_exit - exit GVT-g host side
 120 	unsigned long offset = vgpu->gvt->device_info.msi_cap_offset;
 
 | 
| handlers.c | 45 #include "gvt.h" 55 unsigned long intel_gvt_get_device_type(struct intel_gvt *gvt)
 57 	if (IS_BROADWELL(gvt->dev_priv))
 59 	else if (IS_SKYLAKE(gvt->dev_priv))
 61 	else if (IS_KABYLAKE(gvt->dev_priv))
 63 	else if (IS_BROXTON(gvt->dev_priv))
 65 	else if (IS_COFFEELAKE(gvt->dev_priv))
 71 bool intel_gvt_match_device(struct intel_gvt *gvt,
 74 	return intel_gvt_get_device_type(gvt) & device;
 89 static struct intel_gvt_mmio_info *find_mmio_info(struct intel_gvt *gvt,
 1661  struct intel_gvt *gvt = vgpu->gvt;  local in function:mmio_read_from_hw
 3549  struct intel_gvt *gvt = vgpu->gvt;  local in function:intel_vgpu_mmio_reg_rw
 [all...]
 | 
| display.h | 207 void intel_gvt_emulate_vblank(struct intel_gvt *gvt); 208 void intel_gvt_check_vblank_emulation(struct intel_gvt *gvt);
 
 | 
| interrupt.h | 219 int intel_gvt_init_irq(struct intel_gvt *gvt); 220 void intel_gvt_clean_irq(struct intel_gvt *gvt);
 
 | 
| /src/sys/external/bsd/drm2/dist/drm/i915/ | 
| Makefile | 272 include $(src)/gvt/Makefile 276 obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
 283 	gvt/execlist.h \
 284 	gvt/fb_decoder.h \
 285 	gvt/gtt.h \
 286 	gvt/gvt.h \
 287 	gvt/interrupt.h \
 288 	gvt/mmio_context.h \
 289 	gvt/mpt.h
 [all...]
 |