From owner-freebsd-virtualization@FreeBSD.ORG Mon Oct 27 16:47:15 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 11A02C34; Mon, 27 Oct 2014 16:47:15 +0000 (UTC) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [IPv6:2607:f8b0:400c:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91F3A15A; Mon, 27 Oct 2014 16:47:14 +0000 (UTC) Received: by mail-vc0-f169.google.com with SMTP id id10so506989vcb.28 for ; Mon, 27 Oct 2014 09:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4DbBGwFY7gibefrVKUJ3o27eebTu9Dw2KAZGMRrpTxg=; b=hqYw2YnVOJCfjh1VXOLUxXNmMyZChiRndjy77pcJtNhIe9Enh/+cJqH0dxzobHoMvF 9qReyKl1NlNGL8Dr0slFv4/G+YS8h5r5CRC6sUgI+hy1Jte2WO8+/q+aQZijGu4UABc1 zPDSO1qH8c3tlyQ7HHH4GKT16QshqazSsF5KMLT6OFc6cZTDdt9lYjrkuEsC+wN8B8ae Z+wNw7Z6Euf3eYYZT1P8WLBboYVJK208d809Qqe/lKVYJAfPSZSsRHf5lUuFwlRhmhOJ vgMxfaYmLKZPQeYWtgxoax25GtQHJwux4zjeeIt1dHTWmD1DWV/6AADe5FL7bHRk15D5 Hjyg== MIME-Version: 1.0 X-Received: by 10.220.87.68 with SMTP id v4mr17454984vcl.8.1414428433560; Mon, 27 Oct 2014 09:47:13 -0700 (PDT) Received: by 10.220.150.68 with HTTP; Mon, 27 Oct 2014 09:47:13 -0700 (PDT) In-Reply-To: <3183374.mZUFeIh4pp@ralph.baldwin.cx> References: <3183374.mZUFeIh4pp@ralph.baldwin.cx> Date: Mon, 27 Oct 2014 12:47:13 -0400 Message-ID: Subject: Re: Rework hypervisor detection From: Conrad Meyer To: John Baldwin Content-Type: text/plain; charset=UTF-8 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 16:47:15 -0000 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?). 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). Everything else looks good to me, thanks. [0]: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009458 Best, Conrad