From patchwork Mon Aug 10 18:53:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 40466 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7AIuMPc019222 for ; Mon, 10 Aug 2009 18:56:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750987AbZHJSyy (ORCPT ); Mon, 10 Aug 2009 14:54:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750821AbZHJSyy (ORCPT ); Mon, 10 Aug 2009 14:54:54 -0400 Received: from mx2.redhat.com ([66.187.237.31]:39226 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799AbZHJSyx (ORCPT ); Mon, 10 Aug 2009 14:54:53 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7AIsGwc002825; Mon, 10 Aug 2009 14:54:16 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7AIsFGa004601; Mon, 10 Aug 2009 14:54:16 -0400 Received: from redhat.com (vpn-6-19.tlv.redhat.com [10.35.6.19]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7AIsDoI028876; Mon, 10 Aug 2009 14:54:14 -0400 Date: Mon, 10 Aug 2009 21:53:02 +0300 From: "Michael S. Tsirkin" To: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@elte.hu Subject: [PATCH 1/2] export cpu_tlbstate to modules Message-ID: <20090810185302.GB13924@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org vhost net module wants to do copy to/from user from a kernel thread, which needs switch_mm (like what fs/aio has). export cpu_tlbstate to make this possible Signed-off-by: Michael S. Tsirkin --- arch/x86/mm/tlb.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 821e970..e33a5f0 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -13,6 +13,7 @@ DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) = { &init_mm, 0, }; +EXPORT_PER_CPU_SYMBOL_GPL(cpu_tlbstate); /* * Smarter SMP flushing macros.