dm: remove the dependency on native RTCT for vRTCT init

virtual RTCT will be created on TCC driver interface, instead of
  pass-through native RTCT to ACRN user VMs.

  this patch removes dependency on native RTCT table:
   - rename build_vrtct() function to init_ssram()
     and minor changes inside.
   - drop function create_and_inject_vrtct()
   - add one API to get virtual RTCT table.
   - rename variable 'pt_rtct' to 'ssram'

Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
This commit is contained in:
Yonghua Huang
2022-01-06 06:08:06 +03:00
committed by acrnsi-robot
parent d9fb8f3141
commit a4490c2ffb
5 changed files with 45 additions and 468 deletions

View File

@@ -48,7 +48,7 @@ extern char *mac_seed;
extern bool lapic_pt;
extern bool is_rtvm;
extern bool pt_tpm2;
extern bool pt_rtct;
extern bool ssram;
extern bool vtpm2;
extern bool is_winvm;

View File

@@ -7,16 +7,6 @@
#ifndef RTCT_H
#define RTCT_H
#define RTCT_ENTRY_TYPE_PTCD_LIMIT 1U
#define RTCT_ENTRY_TYPE_PTCM_BINARY 2U
#define RTCT_ENTRY_TYPE_WRC_L3_MASKS 3U
#define RTCT_ENTRY_TYPE_GT_L3_MASKS 4U
#define RTCT_ENTRY_TYPE_SSRAM 5U
#define RTCT_ENTRY_TYPE_STREAM_DATAPATH 6U
#define RTCT_ENTRY_TYPE_TIMEAWARE_SUBSYS 7U
#define RTCT_ENTRY_TYPE_RT_IOMMU 8U
#define RTCT_ENTRY_TYPE_MEM_HIERARCHY_LATENCY 9U
/*Entry IDs for RTCT version 2*/
#define RTCT_V2_COMPATIBILITY 0U
#define RTCT_V2_RTCD_LIMIT 1U
@@ -43,14 +33,6 @@ struct rtct_entry_data_compatibility {
uint32_t rtcd_ver_Minor;
} __packed;
struct rtct_entry_data_ssram {
uint32_t cache_level;
uint64_t base;
uint32_t ways;
uint32_t size;
uint32_t apic_id_tbl[64];
} __packed;
struct rtct_entry_data_ssram_v2 {
uint32_t cache_level;
uint32_t cache_id;
@@ -59,15 +41,9 @@ struct rtct_entry_data_ssram_v2 {
uint32_t shared;
} __packed;
struct rtct_entry_data_mem_hi_latency {
uint32_t hierarchy;
uint32_t clock_cycles;
uint32_t apic_id_tbl[64];
} __packed;
uint64_t get_vssram_gpa_base(void);
uint64_t get_software_sram_base_hpa(void);
uint64_t get_vssram_size(void);
uint8_t *build_vrtct(struct vmctx *ctx, void *cfg);
uint8_t *get_vssram_vrtct(void);
int init_vssram(struct vmctx *ctx);
#endif /* RTCT_H */