hv: vmcs: fix MISRA-C violations related to pointer
This patch fixes the MISRA-C violations in arch/x86/vmcs.c and arch/x86/vmx.c. * add the required 'const' for pointer param if the object pointed by the pointer is not modified * remove the unnecessary cast on pointer Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
8e58a686f1
commit
4618a6b17d
|
@ -814,7 +814,7 @@ static void init_entry_ctrl(const struct acrn_vcpu *vcpu)
|
|||
exec_vmwrite32(VMX_ENTRY_INSTR_LENGTH, 0U);
|
||||
}
|
||||
|
||||
static void init_exit_ctrl(struct acrn_vcpu *vcpu)
|
||||
static void init_exit_ctrl(const struct acrn_vcpu *vcpu)
|
||||
{
|
||||
uint32_t value32;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ void vmx_on(void)
|
|||
|
||||
/* Initialize vmxon page with revision id from IA32 VMX BASIC MSR */
|
||||
tmp32 = (uint32_t)msr_read(MSR_IA32_VMX_BASIC);
|
||||
(void)memcpy_s((uint32_t *) vmxon_region_va, 4U, (void *)&tmp32, 4U);
|
||||
(void)memcpy_s(vmxon_region_va, 4U, (void *)&tmp32, 4U);
|
||||
|
||||
/* Turn on CR0.NE and CR4.VMXE */
|
||||
CPU_CR_READ(cr0, &tmp64);
|
||||
|
|
Loading…
Reference in New Issue