091da2dfa5
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 |
||
---|---|---|
.. | ||
amd | ||
intel | ||
io | ||
vmm_dev.c | ||
vmm_host.c | ||
vmm_host.h | ||
vmm_instruction_emul.c | ||
vmm_ioport.c | ||
vmm_ioport.h | ||
vmm_ktr.h | ||
vmm_lapic.c | ||
vmm_lapic.h | ||
vmm_mem.c | ||
vmm_mem.h | ||
vmm_stat.c | ||
vmm_stat.h | ||
vmm_util.c | ||
vmm_util.h | ||
vmm.c | ||
x86.c | ||
x86.h |