mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-15 03:21:32 +00:00
vuart: add dummy vuart for risc-v
vUART will not enable before VM could be created. 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:
@@ -7,8 +7,21 @@
|
|||||||
#ifndef RISCV_VCPU_H
|
#ifndef RISCV_VCPU_H
|
||||||
#define RISCV_VCPU_H
|
#define RISCV_VCPU_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <cpu.h>
|
||||||
|
#include <io_req.h>
|
||||||
|
|
||||||
|
|
||||||
|
struct acrn_vm;
|
||||||
struct acrn_vcpu {
|
struct acrn_vcpu {
|
||||||
|
struct acrn_vm *vm; /* Reference to the VM this VCPU belongs to */
|
||||||
|
struct io_request req; /* used by io/ept emulation */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline uint16_t pcpuid_from_vcpu(__unused const struct acrn_vcpu *vcpu)
|
||||||
|
{
|
||||||
|
return INVALID_CPU_ID;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* RISCV_VCPU_H */
|
#endif /* RISCV_VCPU_H */
|
||||||
|
|||||||
@@ -4,11 +4,20 @@
|
|||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VM_H_
|
#ifndef RISCV_VM_H_
|
||||||
#define VM_H_
|
#define RISCV_VM_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include <vm_configurations.h>
|
||||||
|
#include <vuart.h>
|
||||||
|
#include <asm/guest/vcpu.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define INVALID_PIO_IDX -1U
|
||||||
|
#define UART_PIO_IDX0 INVALID_PIO_IDX
|
||||||
|
|
||||||
struct acrn_vm {
|
struct acrn_vm {
|
||||||
|
struct acrn_vuart vuart[MAX_VUART_NUM_PER_VM]; /* Virtual UART */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* FIXME: riscv dummy function */
|
/* FIXME: riscv dummy function */
|
||||||
@@ -17,4 +26,5 @@ static inline bool need_shutdown_vm(uint16_t pcpu_id)
|
|||||||
(void)pcpu_id;
|
(void)pcpu_id;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif /* VM_H_ */
|
|
||||||
|
#endif /* RISCV_VM_H_ */
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
#define CONSOLE_H
|
#define CONSOLE_H
|
||||||
|
|
||||||
#include <vuart.h>
|
#include <vuart.h>
|
||||||
#include <asm/guest/vcpu.h>
|
|
||||||
|
|
||||||
|
struct acrn_vcpu;
|
||||||
|
|
||||||
/** Initializes the console module.
|
/** Initializes the console module.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user