mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
HV: treewide: convert hexadecimals used in bitops to unsigned
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -87,12 +87,12 @@ void vcpu_thread(struct vcpu *vcpu)
|
||||
if (ret < 0) {
|
||||
pr_fatal("dispatch VM exit handler failed for reason"
|
||||
" %d, ret = %d!",
|
||||
vcpu->arch_vcpu.exit_reason & 0xFFFF, ret);
|
||||
vcpu->arch_vcpu.exit_reason & 0xFFFFU, ret);
|
||||
vcpu_inject_gp(vcpu, 0);
|
||||
continue;
|
||||
}
|
||||
|
||||
basic_exit_reason = vcpu->arch_vcpu.exit_reason & 0xFFFF;
|
||||
basic_exit_reason = vcpu->arch_vcpu.exit_reason & 0xFFFFU;
|
||||
per_cpu(vmexit_cnt, vcpu->pcpu_id)[basic_exit_reason]++;
|
||||
TRACE_2L(TRACE_VM_EXIT, basic_exit_reason,
|
||||
vcpu->arch_vcpu.contexts[vcpu->arch_vcpu.cur_context].rip);
|
||||
|
@@ -17,7 +17,7 @@ bool is_hypercall_from_ring0(void)
|
||||
|
||||
cs_sel = exec_vmread(VMX_GUEST_CS_SEL);
|
||||
/* cs_selector[1:0] is CPL */
|
||||
if ((cs_sel & 0x3) == 0)
|
||||
if ((cs_sel & 0x3UL) == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -395,7 +395,7 @@ int64_t _set_vm_memmap(struct vm *vm, struct vm *target_vm,
|
||||
uint64_t hpa;
|
||||
uint32_t attr, prot;
|
||||
|
||||
if ((memmap->length & 0xFFF) != 0) {
|
||||
if ((memmap->length & 0xFFFUL) != 0) {
|
||||
pr_err("%s: ERROR! [vm%d] map size 0x%x is not page aligned",
|
||||
__func__, target_vm->attr.id, memmap->length);
|
||||
return -1;
|
||||
@@ -608,7 +608,7 @@ int64_t hcall_assign_ptdev(struct vm *vm, uint64_t vmid, uint64_t param)
|
||||
|
||||
}
|
||||
ret = assign_iommu_device(target_vm->iommu_domain,
|
||||
(uint8_t)(bdf >> 8), (uint8_t)(bdf & 0xff));
|
||||
(uint8_t)(bdf >> 8), (uint8_t)(bdf & 0xffU));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -627,7 +627,7 @@ int64_t hcall_deassign_ptdev(struct vm *vm, uint64_t vmid, uint64_t param)
|
||||
return -1;
|
||||
}
|
||||
ret = unassign_iommu_device(target_vm->iommu_domain,
|
||||
(uint8_t)(bdf >> 8), (uint8_t)(bdf & 0xff));
|
||||
(uint8_t)(bdf >> 8), (uint8_t)(bdf & 0xffU));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ static uint64_t create_zero_page(struct vm *vm)
|
||||
|
||||
/* set constant arguments in zero page */
|
||||
zeropage->hdr.loader_type = 0xff;
|
||||
zeropage->hdr.load_flags |= (1 << 5); /* quiet */
|
||||
zeropage->hdr.load_flags |= (1U << 5); /* quiet */
|
||||
|
||||
/* Create/add e820 table entries in zeropage */
|
||||
zeropage->e820_nentries = create_e820_table(zeropage->e820);
|
||||
|
Reference in New Issue
Block a user