mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 12:19:06 +00:00
HV:fix expression is not boolean
Expression should be boolean immediate before 'if','while' key-words. V1->V2 add () to bool expression Tracked-On: #861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -68,7 +68,7 @@ uint64_t local_gpa2hpa(struct vm *vm, uint64_t gpa, uint32_t *size)
|
||||
void *eptp;
|
||||
struct vcpu *vcpu = vcpu_from_pid(vm, get_cpu_id());
|
||||
|
||||
if (vcpu && (vcpu->arch_vcpu.cur_context == SECURE_WORLD)) {
|
||||
if ((vcpu != NULL) && (vcpu->arch_vcpu.cur_context == SECURE_WORLD)) {
|
||||
eptp = vm->arch_vm.sworld_eptp;
|
||||
} else {
|
||||
eptp = vm->arch_vm.nworld_eptp;
|
||||
|
@@ -2330,7 +2330,7 @@ int decode_instruction(struct vcpu *vcpu)
|
||||
* by VMX itself before hit EPT violation.
|
||||
*
|
||||
*/
|
||||
if (emul_ctxt->vie.op.op_flags & VIE_OP_F_CHECK_GVA_DI) {
|
||||
if ((emul_ctxt->vie.op.op_flags & VIE_OP_F_CHECK_GVA_DI) != 0U) {
|
||||
retval = instr_check_di(vcpu, emul_ctxt);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
|
@@ -65,7 +65,7 @@ get_subrange_start_of_fixed_mtrr(uint32_t index, uint32_t subrange_id)
|
||||
|
||||
static inline bool is_mtrr_enabled(struct vcpu *vcpu)
|
||||
{
|
||||
return vcpu->mtrr.def_type.bits.enable;
|
||||
return (vcpu->mtrr.def_type.bits.enable != 0U);
|
||||
}
|
||||
|
||||
static inline bool is_fixed_range_mtrr_enabled(struct vcpu *vcpu)
|
||||
|
Reference in New Issue
Block a user