qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 04/14] hw/i386/vmport: Introduce vmx-version property


From: Michael S. Tsirkin
Subject: Re: [PATCH 04/14] hw/i386/vmport: Introduce vmx-version property
Date: Tue, 10 Mar 2020 07:44:24 -0400

On Tue, Mar 10, 2020 at 01:28:32PM +0200, Liran Alon wrote:
> 
> On 10/03/2020 13:18, Michael S. Tsirkin wrote:
> > On Tue, Mar 10, 2020 at 01:05:02PM +0200, Liran Alon wrote:
> > > On 10/03/2020 11:32, Michael S. Tsirkin wrote:
> > > > On Tue, Mar 10, 2020 at 01:54:01AM +0200, Liran Alon wrote:
> > > > > Instead of hard-coding the VMX version, make it a VMPORT object 
> > > > > property.
> > > > > This would allow user to control it's value via "-global 
> > > > > vmport.vmx-version=X".
> > > > > 
> > > > > Reviewed-by: Nikita Leshenko <address@hidden>
> > > > > Signed-off-by: Liran Alon <address@hidden>
> > > > More detail on why this is useful?
> > > It's more useful than returning a hard-coded "6" as the vmx-version...
> > 
> > Maybe default should be 6 (a bit of explanation why 6 could be nice).
> The default is indeed defined as 6. As it was before this patch.
> There is not much to explain besides the fact that recent VMware products
> returns 6 here.
> 
> I don't recall any mapping between the returned version here and the
> supported set of VMPort commands. There is a separate mechanism (which we
> implement in another patch) to signal that a command is unsupported /
> failed.
> 
> The term "vmx-version" refers to the version of the Userspace-VMM of VMware
> which is called (confusingly) "vmx".

Short for Virtual Machine eXecutable. Sigh.  People do come up with
names that aren't great. I don't even know whether vmware was there
first and intel shouldn't have shortened virtual machine extensions to
vmx, but in KVM and QEMU it's quite entrenched by now. So let's try to
avoid this in code. If you like how about VMPortExec and
vm-exec-version?  Also lets you use CamelCase consistently and not a mix
of underscores and CamelCase.

> > > We have used it to preserve compatibility for some VMware guests that we 
> > > run
> > > as-is on top of QEMU/KVM which expects specific vmx-version or else they
> > > fail to run properly.
> > > 
> > > -Liran
> > Any detail on which guest it is?
> I will need to dig in production history to find it... They are usually
> proprietary appliances specially made to run as VMware VMs.
> > Pretending to be a very advanced version has its pitfalls if we
> > then don't behave the way vmware does, right?
> In all those cases, we have taken the version number backwards, not forward.
> > Figuring out the version number is I suspect a bit much to ask of users.
> Most users will indeed not need to touch this. This is for advanced users,
> such as Ravello.
> We usually figured this out by reverse-engineering the failed guest and/or
> examining the original VMware environment it used to run on.
> 
> -Liran


Right if you want this for debugging, prefix property with "x-" so it does
not need to be maintained. Point being, maintaining low level interfaces
has real cost ...

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]