From owner-svn-src-head@FreeBSD.ORG Thu Apr 25 20:42:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 21FA6696; Thu, 25 Apr 2013 20:42:22 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EDDB71A65; Thu, 25 Apr 2013 20:42:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3PKgLqF026414; Thu, 25 Apr 2013 20:42:21 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3PKgLNU026411; Thu, 25 Apr 2013 20:42:21 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304252042.r3PKgLNU026411@svn.freebsd.org> From: Neel Natu Date: Thu, 25 Apr 2013 20:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249905 - head/lib/libvmmapi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Apr 2013 20:42:22 -0000 Author: neel Date: Thu Apr 25 20:42:21 2013 New Revision: 249905 URL: http://svnweb.freebsd.org/changeset/base/249905 Log: Remove deprecated APIs to get the total and free memory available to vmm.ko. These APIs were relevant when memory for virtual machine allocation was hard partitioned away from the rest of the system but that is no longer the case. The sysctls that provided this information were garbage collected a while back. Obtained from: NetApp Modified: head/lib/libvmmapi/vmmapi.c head/lib/libvmmapi/vmmapi.h Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Thu Apr 25 20:23:22 2013 (r249904) +++ head/lib/libvmmapi/vmmapi.c Thu Apr 25 20:42:21 2013 (r249905) @@ -123,30 +123,6 @@ vm_destroy(struct vmctx *vm) free(vm); } -size_t -vmm_get_mem_total(void) -{ - size_t mem_total = 0; - size_t oldlen = sizeof(mem_total); - int error; - error = sysctlbyname("hw.vmm.mem_total", &mem_total, &oldlen, NULL, 0); - if (error) - return -1; - return mem_total; -} - -size_t -vmm_get_mem_free(void) -{ - size_t mem_free = 0; - size_t oldlen = sizeof(mem_free); - int error; - error = sysctlbyname("hw.vmm.mem_free", &mem_free, &oldlen, NULL, 0); - if (error) - return -1; - return mem_free; -} - int vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len) { Modified: head/lib/libvmmapi/vmmapi.h ============================================================================== --- head/lib/libvmmapi/vmmapi.h Thu Apr 25 20:23:22 2013 (r249904) +++ head/lib/libvmmapi/vmmapi.h Thu Apr 25 20:42:21 2013 (r249905) @@ -45,8 +45,6 @@ enum vm_mmap_style { int vm_create(const char *name); struct vmctx *vm_open(const char *name); void vm_destroy(struct vmctx *ctx); -size_t vmm_get_mem_total(void); -size_t vmm_get_mem_free(void); int vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len); int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len);