mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 02:08:04 +00:00
hv: fix integer violations
The operands to shift operations (<<, >>) shall be unsigned integers. v1 -> v2: * replace 12U with CPU_PAGE_SHIFT when it is address shift case. * replace 6UL with 0x6UL 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:
@@ -114,7 +114,7 @@ struct vm_arch {
|
||||
} __aligned(CPU_PAGE_SIZE);
|
||||
|
||||
|
||||
#define CPUID_CHECK_SUBLEAF (1U << 0)
|
||||
#define CPUID_CHECK_SUBLEAF (1U << 0U)
|
||||
#define MAX_VM_VCPUID_ENTRIES 64U
|
||||
struct vcpuid_entry {
|
||||
uint32_t eax;
|
||||
|
@@ -64,6 +64,6 @@ static inline uint64_t rdtsc(void)
|
||||
uint32_t lo, hi;
|
||||
|
||||
asm volatile("rdtsc" : "=a" (lo), "=d" (hi));
|
||||
return ((uint64_t)hi << 32) | lo;
|
||||
return ((uint64_t)hi << 32U) | lo;
|
||||
}
|
||||
#endif /* RTL_H */
|
||||
|
Reference in New Issue
Block a user