1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-27 08:00:11 +00:00
freebsd/sys/amd64
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
..
acpica sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
amd64 Make it possible to re-evaluate cpu_features. 2018-01-05 21:06:19 +00:00
cloudabi32 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
cloudabi64 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
conf It's time to retire AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT from 2017-11-29 23:41:49 +00:00
ia32 sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
include Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
linux Disable vim syntax highlighting. 2017-11-28 18:23:17 +00:00
linux32 Disable vim syntax highlighting. 2017-11-28 18:23:17 +00:00
pci sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
sgx Fix module unload when SGX support is not present in CPU. 2017-08-18 14:47:06 +00:00
vmm vmm/svm: contigmalloc of the whole svm_softc is excessive 2018-01-09 14:22:18 +00:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00