From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH for-4.5 v6 05/16] tools: Add vmware_port support Date: Fri, 26 Sep 2014 15:19:28 -0400 Message-ID: <5425BC40.9010109@terremark.com> References: <1411236447-7435-1-git-send-email-dslutz@verizon.com> <1411236447-7435-6-git-send-email-dslutz@verizon.com> <1411393315.18331.104.camel@kazak.uk.xensource.com> <5420517B.9060602@terremark.com> <1411474847.1781.9.camel@kazak.uk.xensource.com> <5422F1DF.7040100@terremark.com> <1411644244.16473.35.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411644244.16473.35.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , Don Slutz Cc: Kevin Tian , Keir Fraser , Eddie Dong , Stefano Stabellini , George Dunlap , Ian Jackson , Tim Deegan , xen-devel@lists.xen.org, Jan Beulich , Aravind Gopalakrishnan , Jun Nakajima , Andrew Cooper , Boris Ostrovsky , Suravee Suthikulpanit List-Id: xen-devel@lists.xenproject.org On 09/25/14 07:24, Ian Campbell wrote: > On Wed, 2014-09-24 at 12:31 -0400, Don Slutz wrote: >> On 09/23/14 08:20, Ian Campbell wrote: >>> On Mon, 2014-09-22 at 12:42 -0400, Don Slutz wrote: [snip] >>> And vmware_port is not ignored. >>> What I suggested was "if vmware_hw is non-zero then set vmware_port". >>> >> I am reading that as "set vmware_port if not specified". To avoid >> complexity, I am treating vmware_hw as a boolean. Using this >> I get the following table: >> >> _hw _port >> 0 0 Just like today >> 1 0 Only cpuid leaves change -- very unlikey >> 1 1 Full VMware mode >> 0 1 VMware hyper call mode. >> >> Adding U for unspecified: >> >> _hw _port >> U U ==> _hw=0 _port=0 >> 0 U ==> _hw=0 _port=0 >> 1 U The case in question. >> U 0 ==> _hw=0 _port=0 >> U 1 What I was talking about. >> 0 0 Just like today >> 1 0 Only cpuid leaves change -- very unlikey >> 1 1 Full VMware mode >> 0 1 VMware hyper call mode. >> >> The problem here is that vmware_hw is not a boolean and there is >> currently not a value that lets you know it has not been specified. > The unspecified value is 0, surely? All of the rows with U under _hw can > be ignored, I am talking only about _port being a defbool. > > 0 U ==> _hw=0 _port=0 > 1 U The case in question. > > => libxl should convert U to 1. > > 0 0 Just like today > 1 0 Only cpuid leaves change -- very unlikey > 1 1 Full VMware mode > 0 1 VMware hyper call mode. > > All reasonable things to ask for explicitly, I think (I'm not so sure > about the last one, might be an error?). > This is not an error as far as VMware says in "Mechanisms to determine if software is running in a VMware virtual machine": *Recommended code* int Detect_VMware(void) { if (cpuid_check()) return 1; // Success running under VMware. else if (dmi_check() && hypervisor_port_check()) return 1; return 0; } If there is code that has issues with Xen in cpuid leaves and VMware port "working", then yes this is a bad config to pick. -Don Slutz