hv: nested: move the VMCS12 dirty flags to struct acrn_vvmcs

These dirty flags are supposed to be per VMCS12, so move them from the
per vCPU acrn_nested struct to the newly added acrn_vvmcs struct.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zide Chen
2021-09-05 23:20:22 -07:00
committed by wenlingz
parent 4e54c3880b
commit 0466d7055f
2 changed files with 16 additions and 16 deletions

View File

@@ -333,6 +333,8 @@ struct acrn_vvmcs {
uint8_t vmcs02[PAGE_SIZE]; /* VMCS to run L2 and as Link Pointer in VMCS01 */
struct acrn_vmcs12 vmcs12; /* To cache L1's VMCS12*/
uint64_t vmcs12_gpa; /* The corresponding L1 GPA for this VMCS12 */
bool host_state_dirty; /* To indicate need to merge VMCS12 host-state fields to VMCS01 */
bool control_fields_dirty; /* For all other non-host-state fields that need to be merged */
} __aligned(PAGE_SIZE);
struct acrn_nested {
@@ -341,8 +343,6 @@ struct acrn_nested {
uint64_t vmxon_ptr; /* GPA */
bool vmxon; /* To indicate if vCPU entered VMX operation */
bool in_l2_guest; /* To indicate if vCPU is currently in Guest mode (from L1's perspective) */
bool host_state_dirty; /* To indicate need to merge VMCS12 host-state fields to VMCS01 */
bool control_fields_dirty; /* For all other non-host-state fields that need to be merged */
} __aligned(PAGE_SIZE);
void init_nested_vmx(__unused struct acrn_vm *vm);