freebsd-nq/sys/amd64/vmm/amd
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
..
amdv.c sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
amdvi_hw.c amd-vi: set iommu msi configuration using pci_enable_msi method 2017-12-04 17:10:52 +00:00
amdvi_priv.h amd-vi: fix up r326152, the new width requires a wider type 2017-11-24 11:25:06 +00:00
ivrs_drv.c vmm/amd: add ivhd device with a higher order 2017-12-04 17:08:03 +00:00
npt.c As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00
npt.h
svm_genassym.c
svm_msr.c Allow guest writes to AMD microcode update[0xc0010020] MSR without updating actual hardware MSR. This allows guest microcode update to go through which otherwise failing because wrmsr() was returning EINVAL. 2016-04-11 05:09:43 +00:00
svm_msr.h
svm_softc.h vmm/svm: contigmalloc of the whole svm_softc is excessive 2018-01-09 14:22:18 +00:00
svm_support.S
svm.c vmm/svm: contigmalloc of the whole svm_softc is excessive 2018-01-09 14:22:18 +00:00
svm.h
vmcb.c
vmcb.h Fix a couple of comments in AMD Virtual Machine Control Block structure 2018-01-05 19:15:24 +00:00