From owner-svn-src-all@FreeBSD.ORG Mon Jan 7 07:06:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1BFD4116; Mon, 7 Jan 2013 07:06:47 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-ie0-f177.google.com (mail-ie0-f177.google.com [209.85.223.177]) by mx1.freebsd.org (Postfix) with ESMTP id C81EAE7E; Mon, 7 Jan 2013 07:06:46 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id k13so22176261iea.8 for ; Sun, 06 Jan 2013 23:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=pRnsdJGv15krHj6q3x0MlpMRXnD+87YlQjcsOFaw6n0=; b=rFIEOAYZWKUa/wvUTRfmxPTencBrFuaXFvCEj6+mLc0wTpOVm+P2PAYMXUJxLKs80L qvE06cZyhb08/Sodi8AdnC7w6+n+RYBracubUvhYH19ydOXZRrwV4WyAU5HfSe7ZTcHH bPIHvhWtmC5REu/THd8Pneu2HjT+LlpiIZkx/8fFfeKGYBVq2jKMFg2D1f7zyUnSgca3 TNPhsIQu7obQNBAQAwRuGfvCnxwBzNWy55B6dQrXNsXMlzr6+t4bOIcJB1fO5ibhw8jv A5CuWWcyGzU46qu0njegBjj5rcG0tfVz4cKAP74jcqyP1aRFHzOBpStvMvtJ8XXx0xbm QVVg== MIME-Version: 1.0 X-Received: by 10.50.158.165 with SMTP id wv5mr4904258igb.3.1357542400080; Sun, 06 Jan 2013 23:06:40 -0800 (PST) Received: by 10.43.112.194 with HTTP; Sun, 6 Jan 2013 23:06:39 -0800 (PST) In-Reply-To: <999FD346-D6A2-473C-91F6-BDCE8363A62E@gmail.com> References: <201301051918.r05JIptx030509@svn.freebsd.org> <999FD346-D6A2-473C-91F6-BDCE8363A62E@gmail.com> Date: Sun, 6 Jan 2013 23:06:39 -0800 Message-ID: Subject: Re: svn commit: r245066 - head/sys/kern From: Neel Natu To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 07 Jan 2013 07:06:47 -0000 Hi Garrett, On Sun, Jan 6, 2013 at 7:22 PM, Garrett Cooper wrote: > On Jan 5, 2013, at 11:18 AM, Neel Natu wrote: > >> Author: neel >> Date: Sat Jan 5 19:18:50 2013 >> New Revision: 245066 >> URL: http://svnweb.freebsd.org/changeset/base/245066 >> >> Log: >> Teach the kernel to recognize that it is executing inside a bhyve virtu= al >> machine. >> >> Obtained from: NetApp >> >> Modified: >> head/sys/kern/subr_param.c >> >> Modified: head/sys/kern/subr_param.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/kern/subr_param.c Sat Jan 5 18:48:23 2013 (r245065) >> +++ head/sys/kern/subr_param.c Sat Jan 5 19:18:50 2013 (r245066) >> @@ -160,6 +160,7 @@ static const char *const vm_bnames[] =3D { >> "Plex86", /* Plex86 */ >> "Bochs", /* Bochs */ >> "Xen", /* Xen */ >> + "BHYVE", /* bhyve */ >> NULL >> }; > > Interesting. This needs to be abstracted out a bit in order to work more = properly with VMware and other platforms that use the VT calls properly (an= d get rid of some duplicated effort in tsc.c), but this is definitely a goo= d breadcrumb for cleaning up our vm detection and handling layer. > Agreed. One possible approach would be to have an arch-dependent call which could check for presence of the CPUID2_HV. It would have the added bonus of getting rid of x86-specific code from subr_param.c. Also, I am not sure what you mean by "platforms that use the VT calls properly" ... best Neel > Thanks for the commit :). > > -Garrett