From owner-svn-src-head@freebsd.org Sun Aug 16 08:17:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8F0D9BAEC4; Sun, 16 Aug 2015 08:17:01 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8108B1A77; Sun, 16 Aug 2015 08:17:01 +0000 (UTC) (envelope-from royger@gmail.com) Received: by wijp15 with SMTP id p15so51650269wij.0; Sun, 16 Aug 2015 01:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PKipOI9vPEkc17DiSaM0NLbDlUByPEqPqp8wsmIHKuI=; b=o/2KhsBQNkvADbM2Se193gFAaqBI3LCHlpF7HObsW+k8qOZ/OBJgJIdfPb9P0RI7YA qb6EYpJKV/UZgPzDC1uPU6YaU45xjat06xkLM0DINS2V8sqE7nqYB9yFvgaBDoacPoTI Xcz0ONuOa/HxRAl4jwzvOfVuz5GTU7aHflI1ZMzcX0eGNuBJir34/sjThC4FHek0HE2e 6nA+I4KPKyZC15IN6K6y6xeLeCL9R7SdICEK7sl6+7ASXVdxcP3FNXojkMxUF4y8eCgR +5sp0Nxl19G/PxO2mCNp0/ib1G6CVWRpuBFYiGqcTUcpwIFmXbSXjeQrWN+Juq0fO6GQ RP1Q== X-Received: by 10.180.210.234 with SMTP id mx10mr24026565wic.42.1439713018861; Sun, 16 Aug 2015 01:16:58 -0700 (PDT) Received: from [172.16.1.30] (5.Red-79-156-191.staticIP.rima-tde.net. [79.156.191.5]) by smtp.gmail.com with ESMTPSA id du6sm11083074wib.24.2015.08.16.01.16.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Aug 2015 01:16:58 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <55D046F5.60601@FreeBSD.org> Date: Sun, 16 Aug 2015 10:16:53 +0200 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jason Harmening , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r286787 - head/sys/x86/x86 References: <201508142008.t7EK8Hkt037329@repo.freebsd.org> <55CF390F.5010407@FreeBSD.org> <55CF5B13.1040501@gmail.com> In-Reply-To: <55CF5B13.1040501@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2015 08:17:01 -0000 El 15/08/15 a les 17.30, Jason Harmening ha escrit: > On 08/15/15 08:05, Roger Pau Monné wrote: >> El 14/08/15 a les 22.08, Jason A. Harmening ha escrit: >>> Author: jah >>> Date: Fri Aug 14 20:08:16 2015 >>> New Revision: 286787 >>> URL: https://svnweb.freebsd.org/changeset/base/286787 >>> >>> Log: >>> Use pmap_quick_enter_page() to handle bouncing of unmapped buffers in the x86 busdma_bounce implementation. Also treat user buffers as unmapped. >>> This allows two things: >>> 1. Sync'ing bounced maps in non-sleepable contexts. The physcopy* calls previously used could sleep on sf_buf operations in some cases. >>> 2. Sync'ing user buffers outside the context of the owning process >> >> AFAICT this will break the Xen port. physcopy* uses uiomove_fromphys >> that on the amd64 port is able to deal with pages outside of the DMAP. >> OTOH pmap_quick_enter_page is not able to deal with pages outside of the >> DMAP, and will simply panic. >> >> Roger. >> > > Is it actually possible for those non-dom0 pages to be used for I/O that > passes through busdma? Yes, Qemu uses them as buffers to read/write syscalls. > If it is, then it would be easy to make > pmap_quick_enter_page() handle them by adding a pcpu pageframe similar > to what we do for i386. pmap_map_io_transient contains some of this logic, but it uses vmem_alloc (with M_WAITOK) instead of a pcpu pageframe, which defeats part of the purpose of this change and cannot be used as-is. Roger.