Page MenuHomeFreeBSD

D37258.diff
No OneTemporary

D37258.diff

diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c
--- a/sys/amd64/vmm/amd/svm.c
+++ b/sys/amd64/vmm/amd/svm.c
@@ -568,14 +568,10 @@
if (((uintptr_t)svm_sc & PAGE_MASK) != 0)
panic("malloc of svm_softc not aligned on page boundary");
- svm_sc->msr_bitmap = contigmalloc(SVM_MSR_BITMAP_SIZE, M_SVM,
- M_WAITOK, 0, ~(vm_paddr_t)0, PAGE_SIZE, 0);
- if (svm_sc->msr_bitmap == NULL)
- panic("contigmalloc of SVM MSR bitmap failed");
- svm_sc->iopm_bitmap = contigmalloc(SVM_IO_BITMAP_SIZE, M_SVM,
- M_WAITOK, 0, ~(vm_paddr_t)0, PAGE_SIZE, 0);
- if (svm_sc->iopm_bitmap == NULL)
- panic("contigmalloc of SVM IO bitmap failed");
+ svm_sc->msr_bitmap = malloc_aligned(SVM_MSR_BITMAP_SIZE, PAGE_SIZE,
+ M_SVM, M_WAITOK);
+ svm_sc->iopm_bitmap = malloc_aligned(SVM_IO_BITMAP_SIZE, PAGE_SIZE,
+ M_SVM, M_WAITOK);
svm_sc->vm = vm;
svm_sc->nptp = (vm_offset_t)vtophys(pmap->pm_pmltop);
@@ -2150,8 +2146,8 @@
{
struct svm_softc *sc = arg;
- contigfree(sc->iopm_bitmap, SVM_IO_BITMAP_SIZE, M_SVM);
- contigfree(sc->msr_bitmap, SVM_MSR_BITMAP_SIZE, M_SVM);
+ free(sc->iopm_bitmap, M_SVM);
+ free(sc->msr_bitmap, M_SVM);
free(sc, M_SVM);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 8, 3:40 PM (1 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15723698
Default Alt Text
D37258.diff (1 KB)

Event Timeline