dm: build vRTCT of Software SRAM for Post-launch RTVM

This patch prepares vRTCT for post-RTVM instead of
  pass-thru native RTCT:
   - Configurations are based on Service VM native RTCT.
   - Remap vLAPIC IDs in vRTCT.
   - Remap base address of SW SRAM memory regions
     from HPA to GPA.
   - HPA base of Software SRAM shall be parsed from PTCT
     instead of hardcoding.

Tracked-On: #5649
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Yonghua Huang
2021-01-26 15:16:25 +08:00
committed by wenlingz
parent 3005d074f0
commit 154a446c5c
8 changed files with 450 additions and 7 deletions

View File

@@ -140,6 +140,7 @@ int vm_add_hv_vdev(struct vmctx *ctx, struct acrn_emul_dev *dev);
int vm_remove_hv_vdev(struct vmctx *ctx, struct acrn_emul_dev *dev);
int acrn_parse_cpu_affinity(char *arg);
uint64_t vm_get_cpu_affinity_dm(void);
int vm_create_vcpu(struct vmctx *ctx, uint16_t vcpu_id);
int vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *cpu_regs);