Lines Matching refs:oos_page
737 struct intel_vgpu_oos_page *oos_page);
751 if (spt->guest_page.oos_page) in ppgtt_free_spt()
752 detach_oos_page(spt->vgpu, spt->guest_page.oos_page); in ppgtt_free_spt()
1402 struct intel_vgpu_oos_page *oos_page) in sync_oos_page() argument
1407 struct intel_vgpu_ppgtt_spt *spt = oos_page->spt; in sync_oos_page()
1412 trace_oos_change(vgpu->id, "sync", oos_page->id, in sync_oos_page()
1420 ops->get_entry(oos_page->mem, &old, index, false, 0, vgpu); in sync_oos_page()
1428 trace_oos_sync(vgpu->id, oos_page->id, in sync_oos_page()
1436 ops->set_entry(oos_page->mem, &new, index, false, 0, vgpu); in sync_oos_page()
1445 struct intel_vgpu_oos_page *oos_page) in detach_oos_page() argument
1448 struct intel_vgpu_ppgtt_spt *spt = oos_page->spt; in detach_oos_page()
1450 trace_oos_change(vgpu->id, "detach", oos_page->id, in detach_oos_page()
1454 spt->guest_page.oos_page = NULL; in detach_oos_page()
1455 oos_page->spt = NULL; in detach_oos_page()
1457 list_del_init(&oos_page->vm_list); in detach_oos_page()
1458 list_move_tail(&oos_page->list, &gvt->gtt.oos_page_free_list_head); in detach_oos_page()
1463 static int attach_oos_page(struct intel_vgpu_oos_page *oos_page, in attach_oos_page() argument
1471 oos_page->mem, I915_GTT_PAGE_SIZE); in attach_oos_page()
1475 oos_page->spt = spt; in attach_oos_page()
1476 spt->guest_page.oos_page = oos_page; in attach_oos_page()
1478 list_move_tail(&oos_page->list, &gvt->gtt.oos_page_use_list_head); in attach_oos_page()
1480 trace_oos_change(spt->vgpu->id, "attach", oos_page->id, in attach_oos_page()
1487 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_set_guest_page_sync() local
1494 trace_oos_change(spt->vgpu->id, "set page sync", oos_page->id, in ppgtt_set_guest_page_sync()
1497 list_del_init(&oos_page->vm_list); in ppgtt_set_guest_page_sync()
1498 return sync_oos_page(spt->vgpu, oos_page); in ppgtt_set_guest_page_sync()
1505 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_allocate_oos_page() local
1508 WARN(oos_page, "shadow PPGTT page has already has a oos page\n"); in ppgtt_allocate_oos_page()
1511 oos_page = container_of(gtt->oos_page_use_list_head.next, in ppgtt_allocate_oos_page()
1513 ret = ppgtt_set_guest_page_sync(oos_page->spt); in ppgtt_allocate_oos_page()
1516 ret = detach_oos_page(spt->vgpu, oos_page); in ppgtt_allocate_oos_page()
1520 oos_page = container_of(gtt->oos_page_free_list_head.next, in ppgtt_allocate_oos_page()
1522 return attach_oos_page(oos_page, spt); in ppgtt_allocate_oos_page()
1527 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_set_guest_page_oos() local
1529 if (WARN(!oos_page, "shadow PPGTT page should have a oos page\n")) in ppgtt_set_guest_page_oos()
1532 trace_oos_change(spt->vgpu->id, "set page out of sync", oos_page->id, in ppgtt_set_guest_page_oos()
1535 list_add_tail(&oos_page->vm_list, &spt->vgpu->gtt.oos_page_list_head); in ppgtt_set_guest_page_oos()
1552 struct intel_vgpu_oos_page *oos_page; in intel_vgpu_sync_oos_pages() local
1559 oos_page = container_of(pos, in intel_vgpu_sync_oos_pages()
1561 ret = ppgtt_set_guest_page_sync(oos_page->spt); in intel_vgpu_sync_oos_pages()
1739 if (spt->guest_page.oos_page) in ppgtt_handle_guest_write_page_table_bytes()
1740 ops->set_entry(spt->guest_page.oos_page->mem, &we, index, in ppgtt_handle_guest_write_page_table_bytes()
1744 if (!spt->guest_page.oos_page) in ppgtt_handle_guest_write_page_table_bytes()
2542 struct intel_vgpu_oos_page *oos_page; in clean_spt_oos() local
2548 oos_page = container_of(pos, struct intel_vgpu_oos_page, list); in clean_spt_oos()
2549 list_del(&oos_page->list); in clean_spt_oos()
2550 free_page((unsigned long)oos_page->mem); in clean_spt_oos()
2551 kfree(oos_page); in clean_spt_oos()
2558 struct intel_vgpu_oos_page *oos_page; in setup_spt_oos() local
2566 oos_page = kzalloc(sizeof(*oos_page), GFP_KERNEL); in setup_spt_oos()
2567 if (!oos_page) { in setup_spt_oos()
2571 oos_page->mem = (void *)__get_free_pages(GFP_KERNEL, 0); in setup_spt_oos()
2572 if (!oos_page->mem) { in setup_spt_oos()
2574 kfree(oos_page); in setup_spt_oos()
2578 INIT_LIST_HEAD(&oos_page->list); in setup_spt_oos()
2579 INIT_LIST_HEAD(&oos_page->vm_list); in setup_spt_oos()
2580 oos_page->id = i; in setup_spt_oos()
2581 list_add_tail(&oos_page->list, >t->oos_page_free_list_head); in setup_spt_oos()