mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
hv: trusty: refine control registers switching method
Remove vmx_cr0/vmx_cr4 from ext_context structure, they are duplicated with cr0/cr4 fields in run_context. Switch cr0/cr4 of run_context structure on demand when do world switch. Remove vmx_cr0_read_shadow/vmx_cr4_read_shadow from ext_context structure. These fields should be same for both normal world and secure world. Tracked-On: #2773 Signed-off-by: Qi Yadong <yadong.qi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -171,7 +171,7 @@ struct run_context {
|
||||
};
|
||||
|
||||
/*
|
||||
* extended context does not save/restore during vm exity/entry, it's mainly
|
||||
* extended context does not save/restore during vm exit/entry, it's mainly
|
||||
* used in trusty world switch
|
||||
*/
|
||||
struct ext_context {
|
||||
@@ -203,11 +203,6 @@ struct ext_context {
|
||||
uint64_t dr7;
|
||||
uint64_t tsc_offset;
|
||||
|
||||
uint64_t vmx_cr0;
|
||||
uint64_t vmx_cr4;
|
||||
uint64_t vmx_cr0_read_shadow;
|
||||
uint64_t vmx_cr4_read_shadow;
|
||||
|
||||
/* The 512 bytes area to save the FPU/MMX/SSE states for the guest */
|
||||
uint64_t
|
||||
fxstore_guest_area[VMX_CPU_S_FXSAVE_GUEST_AREA_SIZE / sizeof(uint64_t)]
|
||||
|
Reference in New Issue
Block a user