freebsd-dev/sys
Andriy Gapon 091da2dfa5 vmm/svm: contigmalloc of the whole svm_softc is excessive
This is a followup to r307903.

struct svm_softc takes more than 200 kilobytes while what we really need
is 3 contiguous pages for I/O permission map and 2 contiguous pages for
MSR permission map.  Other physically mapped structures have a size of
a single page, so a proper alignment is sufficient for their correct
mapping.

Thus, only the permission maps are allocated with contigmalloc now,
the softc is allocated with a regular malloc.

Additionally, this commit adds a check that malloc returns memory with the
expected page alignment and that contigmalloc does not fail.
Unfortunately, at present svm_vminit() is expected to always succeed and
there is no way to report an error.
So, a contigmalloc failure leads to a panic.
We should probably fix this.

MFC after:	2 weeks
2018-01-09 14:22:18 +00:00
..
amd64 vmm/svm: contigmalloc of the whole svm_softc is excessive 2018-01-09 14:22:18 +00:00
arm aw_sid(4): Add support for Allwinner H3 2018-01-07 04:59:28 +00:00
arm64 Only install the new pagetable pointer into ttbr0_el1 when it differs from 2018-01-08 11:08:45 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam Don't hold the periph locks during dump. 2018-01-09 00:17:15 +00:00
cddl zfs_mount: restore a bit of ifdef-out illumos code 2018-01-09 13:43:04 +00:00
compat Use mallocarray(9) in CloudABI kernel code where possible. 2018-01-07 22:38:45 +00:00
conf Fix Zstd kernel build with GCC 4.2 2018-01-09 03:28:24 +00:00
contrib When growing the state, also grow the seed array. Otherwise memory 2018-01-09 06:43:58 +00:00
crypto sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ddb Generalize the gzio API. 2018-01-08 21:27:41 +00:00
dev usbdevs: add ASMedia vendor ID 2018-01-09 13:42:08 +00:00
dts dts: arm: Remove imx6 related dts 2017-12-04 13:28:56 +00:00
fs Correct comment. procfs_doprocfile implements 'file', not 'self'. 2018-01-05 18:32:46 +00:00
gdb sys/gdb: further adoption of SPDX licensing ID tags. 2017-11-27 15:16:59 +00:00
geom Sort and remove unneeded includes. 2018-01-08 15:56:40 +00:00
gnu Introduce bwn(4) support for the bhnd(4) bus. 2017-12-02 02:21:27 +00:00
i386 Avoid re-check of usermode condition. 2018-01-01 20:47:03 +00:00
isa On further testing on actual machines with this hardware, we should 2017-12-30 08:16:31 +00:00
kern Generalize the gzio API. 2018-01-08 21:27:41 +00:00
kgssapi sys/kgssapi: general adoption of SPDX licensing ID tags. 2017-11-27 15:49:00 +00:00
libkern SPDX: fix wrong license ID tag in libkern. 2017-12-28 01:20:30 +00:00
mips Remove sys/mips/rmi. It's been unmaintained since 2011. This hardware 2018-01-01 05:13:03 +00:00
modules Add missing file to gpiobus module 2018-01-07 20:28:17 +00:00
net Disabled the use of flowid for lagg by default 2018-01-04 20:05:47 +00:00
net80211 net80211: sanitize input for ieee80211_output() 2017-12-30 00:40:34 +00:00
netgraph sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
netinet Correct the comment describing badrs which is bad router solicitiation, 2017-12-29 07:23:18 +00:00
netinet6 Fix some typos. 2017-12-28 20:40:56 +00:00
netipsec Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
netpfil pf: Avoid integer overflow issues by using mallocarray() iso. malloc() 2018-01-07 13:35:15 +00:00
netsmb sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfs Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
nfsclient sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
ofed sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
opencrypto Fix uninitialized crp_retw_id when using asynchronous crypto drivers 2018-01-08 13:43:12 +00:00
powerpc Revert r327360, which can cause boot problems on high-CPU-count (>60) 2018-01-04 23:07:51 +00:00
riscv Use the TSLOG framework to record entry/exit timestamps for DELAY and 2017-12-31 09:24:41 +00:00
rpc Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
security Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
sparc64 Chase r327432... sparc64 clock.c now needs to include sys/tslog.h 2017-12-31 20:30:51 +00:00
sys Generalize the gzio API. 2018-01-08 21:27:41 +00:00
teken sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tests
tools embed_mfs: correctly test grep return value 2018-01-03 19:22:10 +00:00
ufs Generalize the fix from r322757 and apply it to several more places. 2018-01-09 10:51:44 +00:00
vm Restructure swapout tests after vm map locking was removed. 2018-01-04 18:14:58 +00:00
x86 Make it possible to re-evaluate cpu_features. 2018-01-05 21:06:19 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00