mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
hv: refine guest.c
- move `vcpumask2pcpumask` from `guest.c` to `vcpu.c` - move `prepare_sos_vm_memmap` from `guest.c` to `vm.c` - rename `guest.c` to `guest_memory.c` Tracked-On: #2484 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -70,8 +70,6 @@
|
||||
#define LDTR_AR (0x0082U) /* LDT, type must be 2, refer to SDM Vol3 26.3.1.2 */
|
||||
#define TR_AR (0x008bU) /* TSS (busy), refer to SDM Vol3 26.3.1.2 */
|
||||
|
||||
void prepare_sos_vm_memmap(struct acrn_vm *vm);
|
||||
|
||||
/* Use # of paging level to identify paging mode */
|
||||
enum vm_paging_mode {
|
||||
PAGING_MODE_0_LEVEL = 0U, /* Flat */
|
||||
@@ -84,8 +82,6 @@ enum vm_paging_mode {
|
||||
/*
|
||||
* VM related APIs
|
||||
*/
|
||||
uint64_t vcpumask2pcpumask(struct acrn_vm *vm, uint64_t vdmask);
|
||||
|
||||
int32_t gva2gpa(struct acrn_vcpu *vcpu, uint64_t gva, uint64_t *gpa, uint32_t *err_code);
|
||||
|
||||
enum vm_paging_mode get_vcpu_paging_mode(struct acrn_vcpu *vcpu);
|
||||
|
@@ -599,6 +599,16 @@ void schedule_vcpu(struct acrn_vcpu *vcpu);
|
||||
*/
|
||||
int32_t prepare_vcpu(struct acrn_vm *vm, uint16_t pcpu_id);
|
||||
|
||||
/**
|
||||
* @brief get physical destination cpu mask
|
||||
*
|
||||
* get the corresponding physical destination cpu mask for the vm and virtual destination cpu mask
|
||||
*
|
||||
* @param[in] vm pointer to vm data structure
|
||||
* @param[in] vdmask virtual destination cpu mask
|
||||
*/
|
||||
uint64_t vcpumask2pcpumask(struct acrn_vm *vm, uint64_t vdmask);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user