lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcJN10Ws_Y1DZ5m5v6zx_BV_WOtX_mw3-B5gpt2RFyDDg@mail.gmail.com>
Date:   Sat, 15 Jul 2017 00:54:44 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     devel@...uxdriverproject.org, "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Jork Loeser <Jork.Loeser@...rosoft.com>,
        Simon Xiao <sixiao@...rosoft.com>,
        Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH v9 08/10] x86/hyper-v: use hypercall for remote TLB flush

On Fri, Jul 14, 2017 at 3:44 PM, Vitaly Kuznetsov <vkuznets@...hat.com> wrote:

Couple of nits in case you are going send new version (I'm fine with
this as well).

> +static inline int fill_gva_list(u64 gva_list[], int offset,
> +                               unsigned long start, unsigned long end)
> +{

> +}

+ empty line.

> +static void hyperv_flush_tlb_others(const struct cpumask *cpus,
> +                                   const struct flush_tlb_info *info)
> +{

> +       flush->processor_mask = 0;
> +       if (cpumask_equal(cpus, cpu_present_mask)) {
> +               flush->flags |= HV_FLUSH_ALL_PROCESSORS;
> +       } else {
> +               for_each_cpu(cpu, cpus) {
> +                       vcpu = hv_cpu_number_to_vp_number(cpu);

> +                       if (vcpu < 64)
> +                               __set_bit(vcpu, (unsigned long *)
> +                                         &flush->processor_mask);
> +                       else
> +                               goto do_native;

Forgot to mention that else can be removed

        if (vcpu >= 64)
            goto do_native;

        __set_bit(vcpu, (unsigned long *)&flush->processor_mask);

> +               }
> +       }

> +}
> +
> +void hyperv_setup_mmu_ops(void)
> +{
> +       if (ms_hyperv.hints & HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED) {

> +               pr_info("Hyper-V: Using hypercall for remote TLB flush\n");

You may define pr_fmt() at the beginning of this file.

Like
#define pr_fmt(fmt)  "Hyper-V: " ## fmt

> +               pv_mmu_ops.flush_tlb_others = hyperv_flush_tlb_others;
> +               setup_clear_cpu_cap(X86_FEATURE_PCID);
> +       }
> +}

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ