svn commit: r258127 - in stable/10/sys: kern sys
Sergey Kandaurov
pluknet at FreeBSD.org
Thu Nov 14 09:33:55 UTC 2013
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);
More information about the svn-src-stable-10
mailing list