mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-10 04:28:31 +00:00
hv: vmcs: remove vmcs field check for a vcpu
The VMCS field is an embedded array for a vCPU. So there's no need to check for NULL before use. Tracked-On: #3813 Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
parent
366214e567
commit
74edf2e54b
@ -526,10 +526,8 @@ void init_vmcs(struct acrn_vcpu *vcpu)
|
|||||||
(void)memcpy_s(vcpu->arch.vmcs, 4U, (void *)&vmx_rev_id, 4U);
|
(void)memcpy_s(vcpu->arch.vmcs, 4U, (void *)&vmx_rev_id, 4U);
|
||||||
|
|
||||||
/* Execute VMCLEAR VMCS of this vcpu */
|
/* Execute VMCLEAR VMCS of this vcpu */
|
||||||
if ((void *)vcpu->arch.vmcs != NULL) {
|
vmcs_pa = hva2hpa(vcpu->arch.vmcs);
|
||||||
vmcs_pa = hva2hpa(vcpu->arch.vmcs);
|
exec_vmclear((void *)&vmcs_pa);
|
||||||
exec_vmclear((void *)&vmcs_pa);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load VMCS pointer */
|
/* Load VMCS pointer */
|
||||||
vmcs_pa = hva2hpa(vcpu->arch.vmcs);
|
vmcs_pa = hva2hpa(vcpu->arch.vmcs);
|
||||||
|
Loading…
Reference in New Issue
Block a user