From owner-svn-src-all@FreeBSD.ORG Thu Nov 14 09:33:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2D4634F; Thu, 14 Nov 2013 09:33:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D24D42A75; Thu, 14 Nov 2013 09:33:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAE9XsQ6046983; Thu, 14 Nov 2013 09:33:54 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAE9XsTG046981; Thu, 14 Nov 2013 09:33:54 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311140933.rAE9XsTG046981@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 14 Nov 2013 09:33:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258127 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 09:33:55 -0000 Author: pluknet Date: Thu Nov 14 09:33:54 2013 New Revision: 258127 URL: http://svnweb.freebsd.org/changeset/base/258127 Log: Merge r257996,r258001,r258069 from head: fixes for HyperV guest. - Set description string for VM_GUEST_HV (HyperV guest). - Add a brief comment about VM_GUEST and vm_guest_sysctl_names relationship. - CTASSERT that vm_guest range is covered by vm_guest_sysctl_names. Approved by: re (glebius) Modified: stable/10/sys/kern/subr_param.c stable/10/sys/sys/systm.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/kern/subr_param.c ============================================================================== --- stable/10/sys/kern/subr_param.c Thu Nov 14 09:26:52 2013 (r258126) +++ stable/10/sys/kern/subr_param.c Thu Nov 14 09:33:54 2013 (r258127) @@ -153,8 +153,10 @@ static const char *const vm_guest_sysctl "none", "generic", "xen", + "hv", NULL }; +CTASSERT(nitems(vm_guest_sysctl_names) - 1 == VM_LAST); #ifndef XEN static const char *const vm_bnames[] = { Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Thu Nov 14 09:26:52 2013 (r258126) +++ stable/10/sys/sys/systm.h Thu Nov 14 09:33:54 2013 (r258127) @@ -70,8 +70,10 @@ extern int vm_guest; /* Running as virt * Detected virtual machine guest types. The intention is to expand * and/or add to the VM_GUEST_VM type if specific VM functionality is * ever implemented (e.g. vendor-specific paravirtualization features). + * Keep in sync with vm_guest_sysctl_names[]. */ -enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV }; +enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV, + VM_LAST }; #if defined(WITNESS) || defined(INVARIANTS) void kassert_panic(const char *fmt, ...) __printflike(1, 2);