Lines Matching refs:oos_page
736 struct intel_vgpu_oos_page *oos_page);
750 if (spt->guest_page.oos_page) in ppgtt_free_spt()
751 detach_oos_page(spt->vgpu, spt->guest_page.oos_page); in ppgtt_free_spt()
1401 struct intel_vgpu_oos_page *oos_page) in sync_oos_page() argument
1406 struct intel_vgpu_ppgtt_spt *spt = oos_page->spt; in sync_oos_page()
1411 trace_oos_change(vgpu->id, "sync", oos_page->id, in sync_oos_page()
1419 ops->get_entry(oos_page->mem, &old, index, false, 0, vgpu); in sync_oos_page()
1427 trace_oos_sync(vgpu->id, oos_page->id, in sync_oos_page()
1435 ops->set_entry(oos_page->mem, &new, index, false, 0, vgpu); in sync_oos_page()
1444 struct intel_vgpu_oos_page *oos_page) in detach_oos_page() argument
1447 struct intel_vgpu_ppgtt_spt *spt = oos_page->spt; in detach_oos_page()
1449 trace_oos_change(vgpu->id, "detach", oos_page->id, in detach_oos_page()
1453 spt->guest_page.oos_page = NULL; in detach_oos_page()
1454 oos_page->spt = NULL; in detach_oos_page()
1456 list_del_init(&oos_page->vm_list); in detach_oos_page()
1457 list_move_tail(&oos_page->list, &gvt->gtt.oos_page_free_list_head); in detach_oos_page()
1462 static int attach_oos_page(struct intel_vgpu_oos_page *oos_page, in attach_oos_page() argument
1470 oos_page->mem, I915_GTT_PAGE_SIZE); in attach_oos_page()
1474 oos_page->spt = spt; in attach_oos_page()
1475 spt->guest_page.oos_page = oos_page; in attach_oos_page()
1477 list_move_tail(&oos_page->list, &gvt->gtt.oos_page_use_list_head); in attach_oos_page()
1479 trace_oos_change(spt->vgpu->id, "attach", oos_page->id, in attach_oos_page()
1486 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_set_guest_page_sync() local
1493 trace_oos_change(spt->vgpu->id, "set page sync", oos_page->id, in ppgtt_set_guest_page_sync()
1496 list_del_init(&oos_page->vm_list); in ppgtt_set_guest_page_sync()
1497 return sync_oos_page(spt->vgpu, oos_page); in ppgtt_set_guest_page_sync()
1504 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_allocate_oos_page() local
1507 WARN(oos_page, "shadow PPGTT page has already has a oos page\n"); in ppgtt_allocate_oos_page()
1510 oos_page = container_of(gtt->oos_page_use_list_head.next, in ppgtt_allocate_oos_page()
1512 ret = ppgtt_set_guest_page_sync(oos_page->spt); in ppgtt_allocate_oos_page()
1515 ret = detach_oos_page(spt->vgpu, oos_page); in ppgtt_allocate_oos_page()
1519 oos_page = container_of(gtt->oos_page_free_list_head.next, in ppgtt_allocate_oos_page()
1521 return attach_oos_page(oos_page, spt); in ppgtt_allocate_oos_page()
1526 struct intel_vgpu_oos_page *oos_page = spt->guest_page.oos_page; in ppgtt_set_guest_page_oos() local
1528 if (WARN(!oos_page, "shadow PPGTT page should have a oos page\n")) in ppgtt_set_guest_page_oos()
1531 trace_oos_change(spt->vgpu->id, "set page out of sync", oos_page->id, in ppgtt_set_guest_page_oos()
1534 list_add_tail(&oos_page->vm_list, &spt->vgpu->gtt.oos_page_list_head); in ppgtt_set_guest_page_oos()
1551 struct intel_vgpu_oos_page *oos_page; in intel_vgpu_sync_oos_pages() local
1558 oos_page = container_of(pos, in intel_vgpu_sync_oos_pages()
1560 ret = ppgtt_set_guest_page_sync(oos_page->spt); in intel_vgpu_sync_oos_pages()
1738 if (spt->guest_page.oos_page) in ppgtt_handle_guest_write_page_table_bytes()
1739 ops->set_entry(spt->guest_page.oos_page->mem, &we, index, in ppgtt_handle_guest_write_page_table_bytes()
1743 if (!spt->guest_page.oos_page) in ppgtt_handle_guest_write_page_table_bytes()
2541 struct intel_vgpu_oos_page *oos_page; in clean_spt_oos() local
2547 oos_page = container_of(pos, struct intel_vgpu_oos_page, list); in clean_spt_oos()
2548 list_del(&oos_page->list); in clean_spt_oos()
2549 free_page((unsigned long)oos_page->mem); in clean_spt_oos()
2550 kfree(oos_page); in clean_spt_oos()
2557 struct intel_vgpu_oos_page *oos_page; in setup_spt_oos() local
2565 oos_page = kzalloc(sizeof(*oos_page), GFP_KERNEL); in setup_spt_oos()
2566 if (!oos_page) { in setup_spt_oos()
2570 oos_page->mem = (void *)__get_free_pages(GFP_KERNEL, 0); in setup_spt_oos()
2571 if (!oos_page->mem) { in setup_spt_oos()
2573 kfree(oos_page); in setup_spt_oos()
2577 INIT_LIST_HEAD(&oos_page->list); in setup_spt_oos()
2578 INIT_LIST_HEAD(&oos_page->vm_list); in setup_spt_oos()
2579 oos_page->id = i; in setup_spt_oos()
2580 list_add_tail(&oos_page->list, >t->oos_page_free_list_head); in setup_spt_oos()