Received: by 10.223.164.221 with SMTP id h29csp2982512wrb; Thu, 2 Nov 2017 22:55:06 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TEmv3QLBLnnk+05HN4cgjDu0GYDABn9zHUUTPEZUnx1CBsi7pO3AbjLXJNEQi/LnaX9e// X-Received: by 10.99.120.2 with SMTP id t2mr6169261pgc.333.1509688505943; Thu, 02 Nov 2017 22:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509688505; cv=none; d=google.com; s=arc-20160816; b=ewqFlv0WNak6MxklhDRNglX8IpMGKdgKhMVv6nMLdxtiA4LoIW1SxSsUnZmmuVvjqw X3SNRQG1J5AjDGGNxO/ryaYDjh3LuuUyLKP+HKF20y8AmN2YBhUbHX7aMBAZT4AOCrSm GrdzzkxTe+N5uMIodeYjTDD3bXAEAf/C9T9KAr4RVi2DtEMxwtCCzE84baVR/AK3K86g KxWTBzpY7vDBD0tMKc/MJe4WINdCStC5RFGlhsvMcO2AU+W7e49pB8x0pnUiwsQq7Gp7 1pJeDflI7xv1aDoWWCqcS8dWxFeEOQsmZHoUgJfj2bXPWoSIjy/xDnZzvCLSnZI7Td6m S8Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=fEYxHbyeFsvjy+jkuT0PVHv7v9tILViHs9Gz4NUUwes=; b=GD1aBve4N4oQGYp5lyEp/lsac/6Ni4e1Akk1L63USPjfX38CS0y+VMbZnCqG+tRk67 mnNNAslNGW1Vmuth/bzddHbevOWe35azWCurvW7gei8yDiZyOhOOu5r5eIP5mBR+yqlY vo4Oi9krjG6oUESgU+I81QoBDfBGHXXBYrB+2LX1EnfEyR44GYIEZUKMUAxCcnh3DCB1 7qcukVmDaDq3QhsU99tTaH64QosgGjYSLVggA0d2G1nBEssgbfYocg++nJ4fndh6jpaC CeBStROOueDqWaPXlYfdeDnoPy1H8Ga5hdHjl+mLmvmhMKnT4jUSN9onRw/WpEhLVZoG l3nA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s188si5054607pgb.646.2017.11.02.22.54.52; Thu, 02 Nov 2017 22:55:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752780AbdKCFyC (ORCPT + 97 others); Fri, 3 Nov 2017 01:54:02 -0400 Received: from mga14.intel.com ([192.55.52.115]:8217 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752408AbdKCFx6 (ORCPT ); Fri, 3 Nov 2017 01:53:58 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2017 22:53:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,337,1505804400"; d="scan'208";a="168772074" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.142]) by orsmga005.jf.intel.com with ESMTP; 02 Nov 2017 22:53:55 -0700 From: Haozhong Zhang To: kvm@vger.kernel.org, x86@kernel.org Cc: linux-kernel@vger.kernel.org, Paolo Bonzini , rkrcmar@redhat.com, Xiao Guangrong , Dan Williams , ivan.d.cuevas.escareno@intel.com, karthik.kumar@intel.com, Konrad Rzeszutek Wilk , Olif Chapman , Haozhong Zhang Subject: [PATCH v4 2/3] KVM: add converters between pfn_t and kvm_pfn_t Date: Fri, 3 Nov 2017 13:53:26 +0800 Message-Id: <20171103055327.21684-3-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171103055327.21684-1-haozhong.zhang@intel.com> References: <20171103055327.21684-1-haozhong.zhang@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Haozhong Zhang --- 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 #include #include +#include #include #include @@ -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 From 1583010866870781763@xxx Fri Nov 03 02:40:06 +0000 2017 X-GM-THRID: 1583005705143932866 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread