mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 15:14:27 +00:00
HV: treewide: unify the type of bit-field members
Qualified or unqualified int or bool are the only types allowed for bit-field members in C99, and MISRA C further forbids using plain int. Use uint32_t (which is equivalent to unsigned int) for all bit-field members. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -74,10 +74,11 @@ static inline void _invvpid(uint64_t type, uint16_t vpid, uint64_t gva)
|
||||
int error = 0;
|
||||
|
||||
struct {
|
||||
uint64_t vpid : 16;
|
||||
uint64_t rsvd : 48;
|
||||
uint32_t vpid : 16;
|
||||
uint32_t rsvd1 : 16;
|
||||
uint32_t rsvd2 : 32;
|
||||
uint64_t gva;
|
||||
} operand = { vpid, 0, gva };
|
||||
} operand = { vpid, 0U, 0U, gva };
|
||||
|
||||
asm volatile ("invvpid %1, %2\n"
|
||||
VMFAIL_INVALID_EPT_VPID
|
||||
|
||||
Reference in New Issue
Block a user