Received: by 10.223.164.221 with SMTP id h29csp2793637wrb; Thu, 2 Nov 2017 18:18:03 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Tz2kwG0yPNHlebV7i6pLulYnIKberkfaGxURc6brymgpkoc1uOz9DYySbQCZwOwDqu1tiT X-Received: by 10.159.211.65 with SMTP id g1mr5220990plp.312.1509671883329; Thu, 02 Nov 2017 18:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509671883; cv=none; d=google.com; s=arc-20160816; b=yf6c31RVZ5FkHwWAdjGZ3py3QUY7lcVQyifnT3Ki2VPrNJ0JfJipMML/V6wTNpqOmn 7i6iP5/5QxbsWWy2f8siWpZsaFO/b+DBP6C6YttjxWyhpXRZAkjjo9fKwqKAhd7JJOwR BZQiIx1ahZ52t0s4CVGhyu1XXgqk7gY8cD3WMh+T4iRmZcIfIYzyb72AsECLoFAUeCF0 EV1O/OVhx38a7zHSAhO93QuxQSgNh7g766VKHmhrEUG6nzLsCH5LaoRGEt04yrw969QY FD7R2prW/yDvfMdWRJ1ayKZ1AjI39+WgeV/sXiscJoItV4HxRXnqpcryrmrWnkiVKRd8 VjVA== 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=8cfx+K03i6fEkUAmct9DCy4G2T/o3KyPuIqT/E8Lz0s=; b=oRfhiO5pzM15tXur697kKWInxKK3FtwVCKrxKZqcHnl8HVWoLrw/tR4Tdc43fumrot +0iTrwFd4RiaPyYWBDFUTU2+Lze7qKsRTHLKg3EwWuN/O82+5amM1RdNk9fIMuqzNarG 60jWpw22HBUOcPepVuDaaceULxC7Dc7uQVRvrYJm832xQz4gl4aJxz3+pXYZhgsmJ8yo DhI+mV5oHGFXqG+ZsRyI0K8VH7HSIxSIbKOI9/yzCecGtQqkxCGtxFgCuKzSjPT28J2Y hdjTeaR8GXnESpDYMHhPIZ8BFBAUwsNNLin0Z+lbAPDk0E4oFTmNQxbtjETzy+l5zVAC YEWg== 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 5si4857755pfx.414.2017.11.02.18.17.50; Thu, 02 Nov 2017 18:18:03 -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 S965061AbdKCBQy (ORCPT + 96 others); Thu, 2 Nov 2017 21:16:54 -0400 Received: from mga02.intel.com ([134.134.136.20]:59666 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964999AbdKCBQ3 (ORCPT ); Thu, 2 Nov 2017 21:16:29 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2017 18:16:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,336,1505804400"; d="scan'208";a="1239053894" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.142]) by fmsmga002.fm.intel.com with ESMTP; 02 Nov 2017 18:16:26 -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 v3 2/3] KVM: add converters between pfn_t and kvm_pfn_t Date: Fri, 3 Nov 2017 09:16:19 +0800 Message-Id: <20171103011620.21380-3-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171103011620.21380-1-haozhong.zhang@intel.com> References: <20171103011620.21380-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 | 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 From 1583470984007385339@xxx Wed Nov 08 04:33:28 +0000 2017 X-GM-THRID: 1583447418213042380 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread