From owner-freebsd-virtualization@FreeBSD.ORG Mon Oct 27 18:29:48 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81D1AFD4; Mon, 27 Oct 2014 18:29:48 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59B5EE97; Mon, 27 Oct 2014 18:29:48 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F3ACAB94E; Mon, 27 Oct 2014 14:29:46 -0400 (EDT) From: John Baldwin To: Conrad Meyer Subject: Re: Rework hypervisor detection Date: Mon, 27 Oct 2014 14:27:36 -0400 Message-ID: <1436499.c107WK3AT0@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-PRERELEASE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <3183374.mZUFeIh4pp@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 27 Oct 2014 14:29:47 -0400 (EDT) Cc: delphij@freebsd.org, Jung-uk Kim , "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2014 18:29:48 -0000 On Monday, October 27, 2014 12:47:13 PM Conrad Meyer wrote: > Hi John, > > I don't have access to phabricator so I'll try and review in email. > > > +#ifdef XEN > > +int vm_guest = VM_GUEST_XEN; > > +#else > > +int vm_guest = VM_GUEST_NO; /* Running as virtual machine guest? */ > > +#endif > > The whitespace between 'int' and 'vm_guest' in the second line seems > wrong (extra space?). Yep, fixed. > For vmware_hvcall() in x86/include/vmware.h, are you sure the inline > assembly is correct? Have you tried the detection on a VMware VM? > VMware's documentation specifies the arguments in a different > order[0], and at Isilon when we tried the port-based detection in a > slightly older revision of CURRENT, it didn't work (IIRC). I don't have VMware handy, but it is a simple copy and paste of existing code in tsc.c. -- John Baldwin