• Home
  • Raw
  • Download

Lines Matching refs:oos_page

745 		struct intel_vgpu_oos_page *oos_page);
759 if (spt->guest_page.oos_page) in ppgtt_free_spt()
760 detach_oos_page(spt->vgpu, spt->guest_page.oos_page); in ppgtt_free_spt()
1446 struct intel_vgpu_oos_page *oos_page) in sync_oos_page() argument
1451 struct intel_vgpu_ppgtt_spt *spt = oos_page->spt; in sync_oos_page()
1456 trace_oos_change(vgpu->id, "sync", oos_page->id, in sync_oos_page()
1464 ops->get_entry(oos_page->mem, &old, index, false, 0, vgpu); in sync_oos_page()
1472 trace_oos_sync(vgpu->id, oos_page->id, in sync_oos_page()
1480 ops->set_entry(oos_page->mem, &new, index, false, 0, vgpu); in sync_oos_page()
1489 struct intel_vgpu_oos_page *oos_page) in detach_oos_page() argument
1492 struct intel_vgpu_ppgtt_spt *spt = oos_page->spt; in detach_oos_page()
1494 trace_oos_change(vgpu->id, "detach", oos_page->id, in detach_oos_page()
1498 spt->guest_page.oos_page = NULL; in detach_oos_page()
1499 oos_page->spt = NULL; in detach_oos_page()
1501 list_del_init(&oos_page->vm_list); in detach_oos_page()
1502 list_move_tail(&oos_page->list, &gvt->gtt.oos_page_free_list_head); in detach_oos_page()
1507 static int attach_oos_page(struct intel_vgpu_oos_page *oos_page, in attach_oos_page() argument
1515 oos_page->mem, I915_GTT_PAGE_SIZE); in attach_oos_page()
1519 oos_page->spt = spt; in attach_oos_page()
1520 spt->guest_page.oos_page = oos_page; in attach_oos_page()
1522 list_move_tail(&oos_page->list, &gvt->gtt.oos_page_use_list_head); in attach_oos_page()
1524 trace_oos_change(spt->vgpu->id, "attach", oos_page->id, in attach_oos_page()
1531 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_set_guest_page_sync() local
1538 trace_oos_change(spt->vgpu->id, "set page sync", oos_page->id, in ppgtt_set_guest_page_sync()
1541 list_del_init(&oos_page->vm_list); in ppgtt_set_guest_page_sync()
1542 return sync_oos_page(spt->vgpu, oos_page); in ppgtt_set_guest_page_sync()
1549 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_allocate_oos_page() local
1552 WARN(oos_page, "shadow PPGTT page has already has a oos page\n"); in ppgtt_allocate_oos_page()
1555 oos_page = container_of(gtt->oos_page_use_list_head.next, in ppgtt_allocate_oos_page()
1557 ret = ppgtt_set_guest_page_sync(oos_page->spt); in ppgtt_allocate_oos_page()
1560 ret = detach_oos_page(spt->vgpu, oos_page); in ppgtt_allocate_oos_page()
1564 oos_page = container_of(gtt->oos_page_free_list_head.next, in ppgtt_allocate_oos_page()
1566 return attach_oos_page(oos_page, spt); in ppgtt_allocate_oos_page()
1571 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_set_guest_page_oos() local
1573 if (WARN(!oos_page, "shadow PPGTT page should have a oos page\n")) in ppgtt_set_guest_page_oos()
1576 trace_oos_change(spt->vgpu->id, "set page out of sync", oos_page->id, in ppgtt_set_guest_page_oos()
1579 list_add_tail(&oos_page->vm_list, &spt->vgpu->gtt.oos_page_list_head); in ppgtt_set_guest_page_oos()
1596 struct intel_vgpu_oos_page *oos_page; in intel_vgpu_sync_oos_pages() local
1603 oos_page = container_of(pos, in intel_vgpu_sync_oos_pages()
1605 ret = ppgtt_set_guest_page_sync(oos_page->spt); in intel_vgpu_sync_oos_pages()
1783 if (spt->guest_page.oos_page) in ppgtt_handle_guest_write_page_table_bytes()
1784 ops->set_entry(spt->guest_page.oos_page->mem, &we, index, in ppgtt_handle_guest_write_page_table_bytes()
1788 if (!spt->guest_page.oos_page) in ppgtt_handle_guest_write_page_table_bytes()
2594 struct intel_vgpu_oos_page *oos_page; in clean_spt_oos() local
2600 oos_page = container_of(pos, struct intel_vgpu_oos_page, list); in clean_spt_oos()
2601 list_del(&oos_page->list); in clean_spt_oos()
2602 free_page((unsigned long)oos_page->mem); in clean_spt_oos()
2603 kfree(oos_page); in clean_spt_oos()
2610 struct intel_vgpu_oos_page *oos_page; in setup_spt_oos() local
2618 oos_page = kzalloc(sizeof(*oos_page), GFP_KERNEL); in setup_spt_oos()
2619 if (!oos_page) { in setup_spt_oos()
2623 oos_page->mem = (void *)__get_free_pages(GFP_KERNEL, 0); in setup_spt_oos()
2624 if (!oos_page->mem) { in setup_spt_oos()
2626 kfree(oos_page); in setup_spt_oos()
2630 INIT_LIST_HEAD(&oos_page->list); in setup_spt_oos()
2631 INIT_LIST_HEAD(&oos_page->vm_list); in setup_spt_oos()
2632 oos_page->id = i; in setup_spt_oos()
2633 list_add_tail(&oos_page->list, &gtt->oos_page_free_list_head); in setup_spt_oos()