mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +00:00
HV: trusty: refine secure_world_control
Define Bitmap flag to indicate secure world's state:
supported: 0(not supported), 1(supported)
active: 0(inactive), 1(active)
Refine secure_world_memory:
base_gpa_in_sos: base_gpa from SOS's view
base_gpa_in_uos: base_gpa from UOS's view, this is the original base_gpa
allocated by bootloader.
Recording above GPA is for usage of trusty EPT destroy and re-create.
There is an assumption: the secure world's memory address is contiguous
in both SOS and physical side.
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -92,7 +92,9 @@ struct trusty_key_info {
|
||||
|
||||
struct secure_world_memory {
|
||||
/* The secure world base address of GPA in SOS */
|
||||
uint64_t base_gpa;
|
||||
uint64_t base_gpa_in_sos;
|
||||
/* The original secure world base address allocated by bootloader */
|
||||
uint64_t base_gpa_in_uos;
|
||||
/* The secure world base address of HPA */
|
||||
uint64_t base_hpa;
|
||||
/* Secure world runtime memory size */
|
||||
@@ -100,8 +102,14 @@ struct secure_world_memory {
|
||||
};
|
||||
|
||||
struct secure_world_control {
|
||||
/* Whether secure world is enabled for current VM */
|
||||
bool sworld_enabled;
|
||||
/* Flag indicates Secure World's state */
|
||||
struct {
|
||||
/* secure world supporting: 0(unsupported), 1(supported) */
|
||||
uint64_t supported : 1;
|
||||
/* secure world running status: 0(inactive), 1(active) */
|
||||
uint64_t active : 1;
|
||||
uint64_t reserved : 62;
|
||||
} flag;
|
||||
/* Secure world memory structure */
|
||||
struct secure_world_memory sworld_memory;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user