hv: Enable the compiler warning as error for HV

Fix the compiler warning and turn on the flag to make
compiler warning as compiler error.

Tracked-On: #1343
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yin Fengwei
2018-09-20 02:46:09 +00:00
committed by lijinxia
parent 2111fcffa5
commit 6bcfa1520b
4 changed files with 7 additions and 6 deletions

View File

@@ -167,7 +167,7 @@ static int local_gva2gpa_common(struct vcpu *vcpu, struct page_walk_info *pw_inf
/* if smap is enabled and supervisor-mode access */
if (pw_info->is_smap_on && !pw_info->is_user_mode_access &&
is_user_mode_addr) {
bool rflags_ac = ((vcpu_get_rflags(vcpu) & RFLAGS_AC) == 1UL);
bool rflags_ac = ((vcpu_get_rflags(vcpu) & RFLAGS_AC) != 0UL);
/* read from user mode address, eflags.ac = 0 */
if (!pw_info->is_write_access && !rflags_ac) {