Home | History | Annotate | Download | only in x86
History log of /src/sys/arch/xen/x86/xen_shm_machdep.c
RevisionDateAuthorComments
 1.18  01-Sep-2022  bouyer Add PVH support for backend drivers grant operation.
Now a domU in a PVH dom0 boots multiuser.
 1.17  21-Feb-2021  jdolecek in xen_shm_map(), make sure to unmap any successfully mapped pages
before returning failure if there is partial failure

fix detection of partial failure - GNTTABOP_map_grant_ref can actually return
zero for partial failure, so we need to always check all the entries
to detect it

previously, DIAGNOSTIC kernel triggered panic() for partial failure,
and non-DIAGNOSTIC kernel did not detect it at all, leading to Dom0 page
fault later; since the mapping failure can be triggered by malicious
DomU via bad grant reference, it's important to expect the calls
to fail, and handle it gracefully without crashing Dom0

part of fixes for XSA-362
 1.16  25-Apr-2020  bouyer branches: 1.16.2;
Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor
 1.15  19-Apr-2020  jdolecek change interface for xen_shm_map() so that caller always supplies the VA,
it now fails only if the Xen hypercall fails, in which case the failure
is final

change xbdback to pre-allocate KVA on xbdback attach (and free on detach),
so it has always KVA to map the request pages

remove no longer needed KVA allocation failure handling
 1.14  13-Apr-2020  chs slightly change and fix the semantics of pool_set*wat(), pool_sethardlimit()
and pool_prime() (and their pool_cache_* counterparts):

- the pool_set*wat() APIs are supposed to specify thresholds for the count of
free items in the pool before pool pages are automatically allocated or freed
during pool_get() / pool_put(), whereas pool_sethardlimit() and pool_prime()
are supposed to specify minimum and maximum numbers of total items
in the pool (both free and allocated). these were somewhat conflated
in the existing code, so separate them as they were intended.

- change pool_prime() to take an absolute number of items to preallocate
rather than an increment over whatever was done before, and wait for
any memory allocations to succeed. since pool_prime() can no longer fail
after this, change its return value to void and adjust all callers.

- pool_setlowat() is documented as not immediately attempting to allocate
any memory, but it was changed some time ago to immediately try to allocate
up to the lowat level, so just fix the manpage to describe the current
behaviour.

- add a pool_cache_prime() to complete the API set.
 1.13  27-Jan-2019  pgoyette branches: 1.13.4; 1.13.10;
Merge the [pgoyette-compat] branch
 1.12  27-Jul-2018  maxv style, localify global variables, etc, no real functional change
 1.11  24-Jun-2018  jdolecek branches: 1.11.2;
mark with XXXSMP all remaining spl*() and tsleep() calls
 1.10  02-Sep-2011  dyoung branches: 1.10.52;
Report vmem(9) errors out-of-band so that we can use vmem(9) to manage
ranges that include the least and the greatest vmem_addr_t. Update
vmem(9) uses throughout the kernel. Slightly expand on the tests in
subr_vmem.c, which still pass. I've been running a kernel with this
patch without any trouble.
 1.9  31-Jul-2011  jym Fix typo in comment.
 1.8  28-Mar-2010  snj Spell "enough" properly.
 1.7  19-Oct-2009  bouyer branches: 1.7.2; 1.7.4;
Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.6  29-Jul-2009  cegger remove Xen2 support.
ok bouyer@
 1.5  16-Mar-2009  cegger ansify function definitions
 1.4  18-Dec-2008  cegger branches: 1.4.2;
remove unused malloc.h
 1.3  17-Feb-2008  bouyer branches: 1.3.6; 1.3.10; 1.3.18;
Add missing __KERNEL_RCSID()
 1.2  22-Nov-2007  bouyer branches: 1.2.2; 1.2.4; 1.2.8; 1.2.16;
Pull up the bouyer-xenamd64 branch to HEAD. This brings in amd64 support
to NetBSD/Xen, both Dom0 and DomU.
 1.1  17-Oct-2007  bouyer branches: 1.1.2; 1.1.4;
file xen_shm_machdep.c was initially added on branch bouyer-xenamd64.
 1.1.4.2  18-Feb-2008  mjf Sync with HEAD.
 1.1.4.1  08-Dec-2007  mjf Sync with HEAD.
 1.1.2.1  17-Oct-2007  bouyer Prepare for xenamd64:
- kill xen/i386/identcpu.c, use i386/i386/identcpu.c instead (with a few
#ifndef XEN)
- move some files that can be shared between i386 and amd64 from
xen/i386 to xen/x86 (or to xen/xen for non-cpu-specific code)
- split assembly out of xen/include/hypervisor.h to xen/include/hypercalls.h
- use <xen/...> instead of <machine/...> for cpu-independant include files.

more work needed here, i386-specific files should got out of arch/xen to
arch/xeni386, and more code shared with arch/i386.
 1.2.16.3  23-Mar-2008  matt sync with HEAD
 1.2.16.2  09-Jan-2008  matt sync with HEAD
 1.2.16.1  22-Nov-2007  matt file xen_shm_machdep.c was added on branch matt-armv6 on 2008-01-09 01:50:16 +0000
 1.2.8.3  27-Feb-2008  yamt sync with head.
 1.2.8.2  07-Dec-2007  yamt sync with head
 1.2.8.1  22-Nov-2007  yamt file xen_shm_machdep.c was added on branch yamt-lazymbuf on 2007-12-07 17:27:19 +0000
 1.2.4.2  03-Dec-2007  ad Sync with HEAD.
 1.2.4.1  22-Nov-2007  ad file xen_shm_machdep.c was added on branch vmlocking on 2007-12-03 19:04:45 +0000
 1.2.2.2  27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.2.2.1  22-Nov-2007  joerg file xen_shm_machdep.c was added on branch jmcneill-pm on 2007-11-27 19:36:23 +0000
 1.3.18.2  28-Apr-2009  skrll Sync with HEAD.
 1.3.18.1  19-Jan-2009  skrll Sync with HEAD.
 1.3.10.4  11-Aug-2010  yamt sync with head.
 1.3.10.3  11-Mar-2010  yamt sync with head
 1.3.10.2  19-Aug-2009  yamt sync with head.
 1.3.10.1  04-May-2009  yamt sync with head.
 1.3.6.1  17-Jan-2009  mjf Sync with HEAD.
 1.4.2.4  27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.4.2.3  24-Oct-2010  jym Sync with HEAD
 1.4.2.2  01-Nov-2009  jym Sync with HEAD.
 1.4.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.4.1  30-May-2010  rmind sync with head
 1.7.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.10.52.2  28-Jul-2018  pgoyette Sync with HEAD
 1.10.52.1  25-Jun-2018  pgoyette Sync with HEAD
 1.11.2.2  21-Apr-2020  martin Sync with HEAD
 1.11.2.1  10-Jun-2019  christos Sync with HEAD
 1.13.10.1  20-Apr-2020  bouyer Sync with HEAD
 1.13.4.1  23-Feb-2021  martin Pull up following revision(s) (requested by jdolecek in ticket #1210):

sys/arch/xen/x86/xen_shm_machdep.c: revision 1.17 (via patch)

in xen_shm_map(), make sure to unmap any successfully mapped pages
before returning failure if there is partial failure
fix detection of partial failure - GNTTABOP_map_grant_ref can actually re=
turn

zero for partial failure, so we need to always check all the entries
to detect it

previously, kernel triggered panic() for partial failure, leading to
Dom0 page fault later; since the mapping failure can be triggered by
malicious DomU via bad grant reference, it's important to expect
the calls to fail, and handle it gracefully without crashing Dom0

part of fixes for XSA-362
 1.16.2.1  03-Apr-2021  thorpej Sync with HEAD.

RSS XML Feed