[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171103011620.21380-3-haozhong.zhang@intel.com>
Date: Fri, 3 Nov 2017 09:16:19 +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 v3 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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 6882538eda32..759fe498c89e 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -67,6 +67,9 @@
#define KVM_PFN_ERR_HWPOISON (KVM_PFN_ERR_MASK + 1)
#define KVM_PFN_ERR_RO_FAULT (KVM_PFN_ERR_MASK + 2)
+#define kvm_pfn_to_pfn(x) ((pfn_t){ .val = (x)})
+#define pfn_to_kvm_pfn(x) ((kvm_pfn_t)((x).val))
+
/*
* 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