mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-05-07 04:34:06 +00:00
vm: add necessary dummy APIs
get_vm_from_vmid,is_paused_vm and is_poweroff_vm should be common APIs. But now doesn't implement them as common for not introduce more VM related data structure and APIs. Tracked-On: #8805 Signed-off-by: Fei Li <fei1.li@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef VM_H_
|
||||
#define VM_H_
|
||||
#ifndef X86_VM_H_
|
||||
#define X86_VM_H_
|
||||
|
||||
/* Defines for VM Launch and Resume */
|
||||
#define VM_RESUME 0
|
||||
@@ -250,14 +250,11 @@ int32_t reset_vm(struct acrn_vm *vm, enum reset_mode mode);
|
||||
int32_t create_vm(uint16_t vm_id, uint64_t pcpu_bitmap, struct acrn_vm_config *vm_config, struct acrn_vm **rtn_vm);
|
||||
int32_t prepare_vm(uint16_t vm_id, struct acrn_vm_config *vm_config);
|
||||
void launch_vms(uint16_t pcpu_id);
|
||||
bool is_poweroff_vm(const struct acrn_vm *vm);
|
||||
bool is_created_vm(const struct acrn_vm *vm);
|
||||
bool is_paused_vm(const struct acrn_vm *vm);
|
||||
bool is_service_vm(const struct acrn_vm *vm);
|
||||
bool is_postlaunched_vm(const struct acrn_vm *vm);
|
||||
bool is_prelaunched_vm(const struct acrn_vm *vm);
|
||||
uint16_t get_vmid_by_name(const char *name);
|
||||
struct acrn_vm *get_vm_from_vmid(uint16_t vm_id);
|
||||
struct acrn_vm *get_service_vm(void);
|
||||
|
||||
void create_service_vm_e820(struct acrn_vm *vm);
|
||||
@@ -300,4 +297,4 @@ void put_vm_lock(struct acrn_vm *vm);
|
||||
void *get_sworld_memory_base(void);
|
||||
#endif /* !ASSEMBLER */
|
||||
|
||||
#endif /* VM_H_ */
|
||||
#endif /* X86_VM_H_ */
|
||||
|
||||
21
hypervisor/include/common/vm.h
Normal file
21
hypervisor/include/common/vm.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2025 Intel Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef VM_H_
|
||||
#define VM_H_
|
||||
|
||||
#include <asm/guest/vm.h>
|
||||
|
||||
struct acrn_vm *get_vm_from_vmid(__unused uint16_t vm_id);
|
||||
|
||||
bool is_paused_vm(__unused const struct acrn_vm *vm);
|
||||
|
||||
bool is_poweroff_vm(__unused const struct acrn_vm *vm);
|
||||
|
||||
void arch_trigger_level_intr(__unused struct acrn_vm *vm,
|
||||
__unused uint32_t irq, __unused bool assert);
|
||||
|
||||
#endif /* VM_H_ */
|
||||
Reference in New Issue
Block a user