Merge tag 'x86-mm-2021-04-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux-2.6-microblaze.git] / arch / x86 / hyperv / mmu.c
index 681dba8..bd13736 100644 (file)
@@ -58,7 +58,7 @@ static void hyperv_flush_tlb_multi(const struct cpumask *cpus,
        int cpu, vcpu, gva_n, max_gvas;
        struct hv_tlb_flush **flush_pcpu;
        struct hv_tlb_flush *flush;
-       u64 status = U64_MAX;
+       u64 status;
        unsigned long flags;
 
        trace_hyperv_mmu_flush_tlb_multi(cpus, info);
@@ -161,7 +161,7 @@ do_ex_hypercall:
 check_status:
        local_irq_restore(flags);
 
-       if (!(status & HV_HYPERCALL_RESULT_MASK))
+       if (hv_result_success(status))
                return;
 do_native:
        native_flush_tlb_multi(cpus, info);
@@ -176,7 +176,7 @@ static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
        u64 status;
 
        if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED))
-               return U64_MAX;
+               return HV_STATUS_INVALID_PARAMETER;
 
        flush_pcpu = (struct hv_tlb_flush_ex **)
                     this_cpu_ptr(hyperv_pcpu_input_arg);
@@ -201,7 +201,7 @@ static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
        flush->hv_vp_set.format = HV_GENERIC_SET_SPARSE_4K;
        nr_bank = cpumask_to_vpset(&(flush->hv_vp_set), cpus);
        if (nr_bank < 0)
-               return U64_MAX;
+               return HV_STATUS_INVALID_PARAMETER;
 
        /*
         * We can flush not more than max_gvas with one hypercall. Flush the