Date: Fri, 28 Oct 2016 14:38:01 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308039 - head/sys/amd64/vmm/amd Message-ID: <201610281438.u9SEc1bU076870@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri Oct 28 14:38:01 2016 New Revision: 308039 URL: https://svnweb.freebsd.org/changeset/base/308039 Log: vmm: another take at maximmum address passed to contigmalloc Just using vm_paddr_t value with all bits set. That should work as long as the type is unsigned. While there, fix a couple of whitespace issues nearby. MFC after: 1 week X-MFC with: r307903 Modified: head/sys/amd64/vmm/amd/svm.c Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Fri Oct 28 13:37:58 2016 (r308038) +++ head/sys/amd64/vmm/amd/svm.c Fri Oct 28 14:38:01 2016 (r308039) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include <machine/vmm.h> #include <machine/vmm_dev.h> #include <machine/vmm_instruction_emul.h> -#include <machine/vmparam.h> #include "vmm_lapic.h" #include "vmm_stat.h" @@ -515,11 +514,11 @@ svm_vminit(struct vm *vm, pmap_t pmap) { struct svm_softc *svm_sc; struct svm_vcpu *vcpu; - vm_paddr_t msrpm_pa, iopm_pa, pml4_pa; + vm_paddr_t msrpm_pa, iopm_pa, pml4_pa int i; svm_sc = contigmalloc(sizeof (*svm_sc), M_SVM, M_WAITOK | M_ZERO, - 0, VM_MAX_ADDRESS, PAGE_SIZE, 0); + 0, ~(vm_paddr_t)0, PAGE_SIZE, 0); svm_sc->vm = vm; svm_sc->nptp = (vm_offset_t)vtophys(pmap->pm_pml4); @@ -536,7 +535,7 @@ svm_vminit(struct vm *vm, pmap_t pmap) svm_msr_rw_ok(svm_sc->msr_bitmap, MSR_GSBASE); svm_msr_rw_ok(svm_sc->msr_bitmap, MSR_FSBASE); svm_msr_rw_ok(svm_sc->msr_bitmap, MSR_KGSBASE); - + svm_msr_rw_ok(svm_sc->msr_bitmap, MSR_STAR); svm_msr_rw_ok(svm_sc->msr_bitmap, MSR_LSTAR); svm_msr_rw_ok(svm_sc->msr_bitmap, MSR_CSTAR);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610281438.u9SEc1bU076870>