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]
Date:   Tue, 13 Nov 2018 10:56:28 -0500
From:   Barret Rhoden <brho@...gle.com>
To:     Pankaj Gupta <pagupta@...hat.com>
Cc:     Dan Williams <dan.j.williams@...el.com>,
        David Hildenbrand <david@...hat.com>,
        Dave Jiang <dave.jiang@...el.com>,
        Ross Zwisler <zwisler@...nel.org>,
        Vishal Verma <vishal.l.verma@...el.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        linux-nvdimm@...ts.01.org, linux-kernel@...r.kernel.org,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        kvm@...r.kernel.org, yu c zhang <yu.c.zhang@...el.com>,
        yi z zhang <yi.z.zhang@...el.com>
Subject: Re: [PATCH 2/2] kvm: Use huge pages for DAX-backed files

On 2018-11-13 at 05:02 Pankaj Gupta <pagupta@...hat.com> wrote:
> As this patch is dependent on PageReserved patch(which is in progress), just 
> wondering if we are able to test the code path for hugepage with DAX.

For testing, I used the following patch.  It's not 100%, since it
intercepts at kvm_is_reserved_pfn(), and not PageReserved() directly.
The only difference is with kvm_set_pfn_dirty() I think.

I also have a nasty module that would dump the EPT's and the host page
table's mappings so I could confirm that the huge pages are being mapped
correctly.

-----------------------
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 2679e476b6c3..1b394a0752a0 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -148,6 +148,10 @@ __weak int kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
 
 bool kvm_is_reserved_pfn(kvm_pfn_t pfn)
 {
+	// XXX hack
+	if (is_zone_device_page(pfn_to_page(pfn)))
+		return false;
+
 	if (pfn_valid(pfn))
 		return PageReserved(pfn_to_page(pfn));
 
-----------------------

Thanks,

Barret

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ