From patchwork Sun Aug 22 11:08:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 121641 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7LB5E4h015200 for ; Sat, 21 Aug 2010 11:05:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751811Ab0HULEr (ORCPT ); Sat, 21 Aug 2010 07:04:47 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:62130 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751342Ab0HULEq (ORCPT ); Sat, 21 Aug 2010 07:04:46 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id E422717008D; Sat, 21 Aug 2010 19:04:38 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o7LB1JfO000569; Sat, 21 Aug 2010 19:01:19 +0800 Received: from [10.167.141.99] (unknown [10.167.141.99]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 340D510C1AC; Sat, 21 Aug 2010 19:05:41 +0800 (CST) Message-ID: <4C710549.9090704@cn.fujitsu.com> Date: Sun, 22 Aug 2010 19:08:57 +0800 From: Xiao Guangrong User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: Avi Kivity CC: Marcelo Tosatti , Nick Piggin , KVM , LKML Subject: [PATCH v7 1/5] export __get_user_pages_fast() function Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 21 Aug 2010 11:05:14 +0000 (UTC) diff --git a/mm/util.c b/mm/util.c index f5712e8..4f0d32b 100644 --- a/mm/util.c +++ b/mm/util.c @@ -250,6 +250,19 @@ void arch_pick_mmap_layout(struct mm_struct *mm) } #endif +/* + * Like get_user_pages_fast() except its IRQ-safe in that it won't fall + * back to the regular GUP. + * If the architecture not support this fucntion, simply return with no + * page pinned + */ +int __attribute__((weak)) __get_user_pages_fast(unsigned long start, + int nr_pages, int write, struct page **pages) +{ + return 0; +} +EXPORT_SYMBOL_GPL(__get_user_pages_fast); + /** * get_user_pages_fast() - pin user pages in memory * @start: starting user address