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:
Junjie Mao
2018-07-20 16:38:19 +08:00
committed by lijinxia
parent c0b55cdf1b
commit ad73bb511c
4 changed files with 41 additions and 40 deletions

View File

@@ -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