Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106930483
D37258.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37258.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D37258: vmm svm: Use malloc_aligned() instead of contigmalloc().
Attached
Detach File
Event Timeline
Log In to Comment