Date: Sun, 16 Aug 2015 10:16:53 +0200 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= <royger@FreeBSD.org> To: Jason Harmening <jason.harmening@gmail.com>, "Jason A. Harmening" <jah@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r286787 - head/sys/x86/x86 Message-ID: <55D046F5.60601@FreeBSD.org> In-Reply-To: <55CF5B13.1040501@gmail.com> References: <201508142008.t7EK8Hkt037329@repo.freebsd.org> <55CF390F.5010407@FreeBSD.org> <55CF5B13.1040501@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55D046F5.60601>