Lines Matching refs:oos_page
757 struct intel_vgpu_oos_page *oos_page);
771 if (spt->guest_page.oos_page) in ppgtt_free_spt()
772 detach_oos_page(spt->vgpu, spt->guest_page.oos_page); in ppgtt_free_spt()
1449 struct intel_vgpu_oos_page *oos_page) in sync_oos_page() argument
1454 struct intel_vgpu_ppgtt_spt *spt = oos_page->spt; in sync_oos_page()
1459 trace_oos_change(vgpu->id, "sync", oos_page->id, in sync_oos_page()
1467 ops->get_entry(oos_page->mem, &old, index, false, 0, vgpu); in sync_oos_page()
1475 trace_oos_sync(vgpu->id, oos_page->id, in sync_oos_page()
1483 ops->set_entry(oos_page->mem, &new, index, false, 0, vgpu); in sync_oos_page()
1492 struct intel_vgpu_oos_page *oos_page) in detach_oos_page() argument
1495 struct intel_vgpu_ppgtt_spt *spt = oos_page->spt; in detach_oos_page()
1497 trace_oos_change(vgpu->id, "detach", oos_page->id, in detach_oos_page()
1501 spt->guest_page.oos_page = NULL; in detach_oos_page()
1502 oos_page->spt = NULL; in detach_oos_page()
1504 list_del_init(&oos_page->vm_list); in detach_oos_page()
1505 list_move_tail(&oos_page->list, &gvt->gtt.oos_page_free_list_head); in detach_oos_page()
1510 static int attach_oos_page(struct intel_vgpu_oos_page *oos_page, in attach_oos_page() argument
1518 oos_page->mem, I915_GTT_PAGE_SIZE); in attach_oos_page()
1522 oos_page->spt = spt; in attach_oos_page()
1523 spt->guest_page.oos_page = oos_page; in attach_oos_page()
1525 list_move_tail(&oos_page->list, &gvt->gtt.oos_page_use_list_head); in attach_oos_page()
1527 trace_oos_change(spt->vgpu->id, "attach", oos_page->id, in attach_oos_page()
1534 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_set_guest_page_sync() local
1541 trace_oos_change(spt->vgpu->id, "set page sync", oos_page->id, in ppgtt_set_guest_page_sync()
1544 list_del_init(&oos_page->vm_list); in ppgtt_set_guest_page_sync()
1545 return sync_oos_page(spt->vgpu, oos_page); in ppgtt_set_guest_page_sync()
1552 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_allocate_oos_page() local
1555 WARN(oos_page, "shadow PPGTT page has already has a oos page\n"); in ppgtt_allocate_oos_page()
1558 oos_page = container_of(gtt->oos_page_use_list_head.next, in ppgtt_allocate_oos_page()
1560 ret = ppgtt_set_guest_page_sync(oos_page->spt); in ppgtt_allocate_oos_page()
1563 ret = detach_oos_page(spt->vgpu, oos_page); in ppgtt_allocate_oos_page()
1567 oos_page = container_of(gtt->oos_page_free_list_head.next, in ppgtt_allocate_oos_page()
1569 return attach_oos_page(oos_page, spt); in ppgtt_allocate_oos_page()
1574 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_set_guest_page_oos() local
1576 if (WARN(!oos_page, "shadow PPGTT page should have a oos page\n")) in ppgtt_set_guest_page_oos()
1579 trace_oos_change(spt->vgpu->id, "set page out of sync", oos_page->id, in ppgtt_set_guest_page_oos()
1582 list_add_tail(&oos_page->vm_list, &spt->vgpu->gtt.oos_page_list_head); in ppgtt_set_guest_page_oos()
1599 struct intel_vgpu_oos_page *oos_page; in intel_vgpu_sync_oos_pages() local
1606 oos_page = container_of(pos, in intel_vgpu_sync_oos_pages()
1608 ret = ppgtt_set_guest_page_sync(oos_page->spt); in intel_vgpu_sync_oos_pages()
1786 if (spt->guest_page.oos_page) in ppgtt_handle_guest_write_page_table_bytes()
1787 ops->set_entry(spt->guest_page.oos_page->mem, &we, index, in ppgtt_handle_guest_write_page_table_bytes()
1791 if (!spt->guest_page.oos_page) in ppgtt_handle_guest_write_page_table_bytes()
2595 struct intel_vgpu_oos_page *oos_page; in clean_spt_oos() local
2601 oos_page = container_of(pos, struct intel_vgpu_oos_page, list); in clean_spt_oos()
2602 list_del(&oos_page->list); in clean_spt_oos()
2603 free_page((unsigned long)oos_page->mem); in clean_spt_oos()
2604 kfree(oos_page); in clean_spt_oos()
2611 struct intel_vgpu_oos_page *oos_page; in setup_spt_oos() local
2619 oos_page = kzalloc(sizeof(*oos_page), GFP_KERNEL); in setup_spt_oos()
2620 if (!oos_page) { in setup_spt_oos()
2624 oos_page->mem = (void *)__get_free_pages(GFP_KERNEL, 0); in setup_spt_oos()
2625 if (!oos_page->mem) { in setup_spt_oos()
2627 kfree(oos_page); in setup_spt_oos()
2631 INIT_LIST_HEAD(&oos_page->list); in setup_spt_oos()
2632 INIT_LIST_HEAD(&oos_page->vm_list); in setup_spt_oos()
2633 oos_page->id = i; in setup_spt_oos()
2634 list_add_tail(&oos_page->list, >t->oos_page_free_list_head); in setup_spt_oos()