blob: 1710afbce67ee6275dd8a631008ac3413c97f41f [file] [log] [blame]
Karl Meakin5b2da502024-11-07 17:13:51 +00001/*
2 * Copyright 2024 The Hafnium Authors.
3 *
4 * Use of this source code is governed by a BSD-style
5 * license that can be found in the LICENSE file or at
6 * https://opensource.org/licenses/BSD-3-Clause.
7 */
8
9#pragma once
10
11#include "hf/vm.h"
12
Karl Meakin117c8082024-12-04 16:03:28 +000013void ffa_vm_disable_interrupts(struct vm_locked vm_locked);
Karl Meakin5b2da502024-11-07 17:13:51 +000014
Karl Meakin117c8082024-12-04 16:03:28 +000015void ffa_vm_init(struct mpool *ppool);
Karl Meakin5b2da502024-11-07 17:13:51 +000016
Karl Meakin117c8082024-12-04 16:03:28 +000017struct vm_locked ffa_vm_nwd_create(ffa_id_t vm_id);
Karl Meakin5b2da502024-11-07 17:13:51 +000018
Karl Meakin117c8082024-12-04 16:03:28 +000019bool ffa_vm_supports_indirect_messages(struct vm *vm);
Karl Meakin5b2da502024-11-07 17:13:51 +000020
Karl Meakin117c8082024-12-04 16:03:28 +000021bool ffa_vm_notifications_info_get(uint16_t *ids, uint32_t *ids_count,
22 uint32_t *lists_sizes, uint32_t *lists_count,
23 uint32_t ids_count_max);
Karl Meakin5b2da502024-11-07 17:13:51 +000024
25/** Get NWd VM's structure. */
Karl Meakin117c8082024-12-04 16:03:28 +000026struct vm_locked ffa_vm_find_locked(ffa_id_t vm_id);
Karl Meakin5b2da502024-11-07 17:13:51 +000027
Karl Meakin117c8082024-12-04 16:03:28 +000028struct vm_locked ffa_vm_find_locked_create(ffa_id_t vm_id);
Karl Meakin5b2da502024-11-07 17:13:51 +000029
Karl Meakin117c8082024-12-04 16:03:28 +000030void ffa_vm_destroy(struct vm_locked to_destroy_locked);
Karl Meakin5b2da502024-11-07 17:13:51 +000031
32/** Reclaim all resources belonging to VM in aborted state. */
Karl Meakin117c8082024-12-04 16:03:28 +000033void ffa_vm_free_resources(struct vm_locked vm_locked);
Karl Meakin5b2da502024-11-07 17:13:51 +000034
35/** Checks whether managed exit is supported by given SP. */
Karl Meakin117c8082024-12-04 16:03:28 +000036bool ffa_vm_managed_exit_supported(struct vm *vm);