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: <20171103055327.21684-3-haozhong.zhang@intel.com>
Date:   Fri,  3 Nov 2017 13:53:26 +0800
From:   Haozhong Zhang <haozhong.zhang@...el.com>
To:     kvm@...r.kernel.org, x86@...nel.org
Cc:     linux-kernel@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
        rkrcmar@...hat.com, Xiao Guangrong <xiaoguangrong.eric@...il.com>,
        Dan Williams <dan.j.williams@...el.com>,
        ivan.d.cuevas.escareno@...el.com, karthik.kumar@...el.com,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Olif Chapman <olif.chapman@...cle.com>,
        Haozhong Zhang <haozhong.zhang@...el.com>
Subject: [PATCH v4 2/3] KVM: add converters between pfn_t and kvm_pfn_t

Signed-off-by: Haozhong Zhang <haozhong.zhang@...el.com>
---
 include/linux/kvm_host.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 6882538eda32..caf6f7a6bdb2 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -27,6 +27,7 @@
 #include <linux/irqbypass.h>
 #include <linux/swait.h>
 #include <linux/refcount.h>
+#include <linux/pfn_t.h>
 #include <asm/signal.h>
 
 #include <linux/kvm.h>
@@ -67,6 +68,9 @@
 #define KVM_PFN_ERR_HWPOISON	(KVM_PFN_ERR_MASK + 1)
 #define KVM_PFN_ERR_RO_FAULT	(KVM_PFN_ERR_MASK + 2)
 
+#define pfn_t_to_kvm_pfn_t(x)	pfn_t_to_pfn(x)
+#define kvm_pfn_t_to_pfn_t(x)	pfn_to_pfn_t((x) & ~KVM_PFN_ERR_NOSLOT_MASK)
+
 /*
  * error pfns indicate that the gfn is in slot but faild to
  * translate it to pfn on host.
-- 
2.14.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ