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: <53f4c88b-14b7-c5b1-9690-1aad98cf56d4@microsoft.com>
Date:   Thu, 20 Sep 2018 14:30:14 +0000
From:   Tianyu Lan <Tianyu.Lan@...rosoft.com>
To:     "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>
CC:     KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
        "devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        vkuznets <vkuznets@...hat.com>,
        Jork Loeser <Jork.Loeser@...rosoft.com>
Subject: Re: [PATCH V2 4/13] KVM/MMU: Flush tlb directly in the
 kvm_handle_hva_range()

On 9/20/2018 12:08 AM, Michael Kelley (EOSG) wrote:
> From: Tianyu Lan  Sent: Monday, September 17, 2018 8:19 PM
>> +
>> +			if (ret && kvm_available_flush_tlb_with_range()) {
>> +				kvm_flush_remote_tlbs_with_address(kvm,
>> +						gfn_start,
>> +						gfn_end - gfn_start);
> 
> Does the above need to be gfn_end - gfn_start + 1?

The flush range depends on the input parameter frame start and frame end 
of for_each_slot_rmap_range().

         for_each_slot_rmap_range(memslot, PT_PAGE_TABLE_LEVEL,
                                  PT_MAX_HUGEPAGE_LEVEL,
                                  gfn_start, gfn_end - 1,
                                  &iterator)
                 ret |= handler(kvm, iterator.rmap, memslot,
                                iterator.gfn, iterator.level, data);


The start is "gfn_start" and the end is "gfn_end - 1". The flush size is 
(gfn_end - 1) - gfn_start + 1 = gfn_end - gfn_start.

> 
>> +				ret = 0;
>> +			}
> 
> Michael
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ