Lines Matching full:pending

311 static void free_pending_hpt(SpaprPendingHpt *pending)  in free_pending_hpt()  argument
313 if (pending->hpt) { in free_pending_hpt()
314 qemu_vfree(pending->hpt); in free_pending_hpt()
317 g_free(pending); in free_pending_hpt()
322 SpaprPendingHpt *pending = opaque; in hpt_prepare_thread() local
323 size_t size = 1ULL << pending->shift; in hpt_prepare_thread()
325 pending->hpt = qemu_try_memalign(size, size); in hpt_prepare_thread()
326 if (pending->hpt) { in hpt_prepare_thread()
327 memset(pending->hpt, 0, size); in hpt_prepare_thread()
328 pending->ret = H_SUCCESS; in hpt_prepare_thread()
330 pending->ret = H_NO_MEM; in hpt_prepare_thread()
335 if (SPAPR_MACHINE(qdev_get_machine())->pending_hpt == pending) { in hpt_prepare_thread()
337 pending->complete = true; in hpt_prepare_thread()
340 free_pending_hpt(pending); in hpt_prepare_thread()
350 SpaprPendingHpt *pending = spapr->pending_hpt; in cancel_hpt_prepare() local
355 if (!pending) { in cancel_hpt_prepare()
360 if (!pending->complete) { in cancel_hpt_prepare()
365 free_pending_hpt(pending); in cancel_hpt_prepare()
372 SpaprPendingHpt *pending = spapr->pending_hpt; in vhyp_mmu_resize_hpt_prepare() local
374 if (pending) { in vhyp_mmu_resize_hpt_prepare()
376 if (pending->shift == shift) { in vhyp_mmu_resize_hpt_prepare()
378 if (pending->complete) { in vhyp_mmu_resize_hpt_prepare()
379 return pending->ret; in vhyp_mmu_resize_hpt_prepare()
396 pending = g_new0(SpaprPendingHpt, 1); in vhyp_mmu_resize_hpt_prepare()
397 pending->shift = shift; in vhyp_mmu_resize_hpt_prepare()
398 pending->ret = H_HARDWARE; in vhyp_mmu_resize_hpt_prepare()
400 qemu_thread_create(&pending->thread, "sPAPR HPT prepare", in vhyp_mmu_resize_hpt_prepare()
401 hpt_prepare_thread, pending, QEMU_THREAD_DETACHED); in vhyp_mmu_resize_hpt_prepare()
403 spapr->pending_hpt = pending; in vhyp_mmu_resize_hpt_prepare()
557 SpaprPendingHpt *pending = spapr->pending_hpt; in vhyp_mmu_resize_hpt_commit() local
565 if (!pending || (pending->shift != shift)) { in vhyp_mmu_resize_hpt_commit()
570 if (!pending->complete) { in vhyp_mmu_resize_hpt_commit()
578 newsize = 1ULL << pending->shift; in vhyp_mmu_resize_hpt_commit()
580 pending->hpt, newsize); in vhyp_mmu_resize_hpt_commit()
583 spapr->htab = pending->hpt; in vhyp_mmu_resize_hpt_commit()
584 spapr->htab_shift = pending->shift; in vhyp_mmu_resize_hpt_commit()
588 pending->hpt = NULL; /* so it's not free()d */ in vhyp_mmu_resize_hpt_commit()
593 free_pending_hpt(pending); in vhyp_mmu_resize_hpt_commit()