// SPDX-License-Identifier: GPL-2.0 /* * ACRN_HSM: Virtual Machine management * * Copyright (C) 2020 Intel Corporation. All rights reserved. * * Authors: * Jason Chen CJ <[email protected]> * Yakui Zhao <[email protected]> */ #include <linux/io.h> #include <linux/mm.h> #include <linux/slab.h> #include "acrn_drv.h" /* List of VMs */ LIST_HEAD(…); /* * acrn_vm_list is read in a worker thread which dispatch I/O requests and * is wrote in VM creation ioctl. Use the rwlock mechanism to protect it. */ DEFINE_RWLOCK(…); struct acrn_vm *acrn_vm_create(struct acrn_vm *vm, struct acrn_vm_creation *vm_param) { … } int acrn_vm_destroy(struct acrn_vm *vm) { … } /** * acrn_msi_inject() - Inject a MSI interrupt into a User VM * @vm: User VM * @msi_addr: The MSI address * @msi_data: The MSI data * * Return: 0 on success, <0 on error */ int acrn_msi_inject(struct acrn_vm *vm, u64 msi_addr, u64 msi_data) { … }