From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [RFC PATCH 03/10] Add cpuid_vmware_leaves Date: Fri, 13 Dec 2013 13:38:39 +0000 Message-ID: <52AB0DDF.9050008@citrix.com> References: <1386875718-28166-1-git-send-email-dslutz@terremark.com> <1386875718-28166-4-git-send-email-dslutz@terremark.com> <52AA383B.8000105@citrix.com> <52AAF59C020000780010CEC9@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VrSxK-000206-43 for xen-devel@lists.xenproject.org; Fri, 13 Dec 2013 13:39:05 +0000 In-Reply-To: <52AAF59C020000780010CEC9@nat28.tlf.novell.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: Jan Beulich , Don Slutz Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , Ian Jackson , Eddie Dong , Jun Nakajima , xen-devel , Boris Ostrovsky , Suravee Suthikulpanit List-Id: xen-devel@lists.xenproject.org On 13/12/2013 10:55, Jan Beulich wrote: >>>> On 12.12.13 at 23:27, Andrew Cooper wrote: >> On 12/12/2013 19:15, Don Slutz wrote: >>> int cpuid_hypervisor_leaves( uint32_t idx, uint32_t sub_idx, >>> uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) >>> { >>> struct domain *d = current->domain; >>> /* Optionally shift out of the way of Viridian architectural leaves. */ >>> - uint32_t base = is_viridian_domain(d) ? 0x40000100 : 0x40000000; >>> + uint32_t base = 0x40000000; >>> uint32_t limit; >>> >>> + if ( is_viridian_domain(d) ) >>> + base += 0x100; >>> + if ( is_vmware_domain(d) ) >>> + base += 0x100; >>> + >> These bases need a far more scalable solution, especially as the result >> of each of these clauses can be changed at runtime with a cunning >> hvm_param_set hypercall. >> >> I think that both "is pretending to be HyperV" and "is pretending to be >> VMware" need to be domain creation flags which are strictly static for >> the lifetime of the domain. > And it seems highly questionable to me whether having both at the > same time makes much sense. > > Plus the new function doesn't belong in xen/arch/x86/traps.c ... > > Jan > I would certainly agree on the sentiment of it not making much sense. However, as Xen needs viridian to run windows, I would be astounded if vmware VMs didn't have viridian as well, in which case it is probably quite likely that a vmware windows vm with vmware tools would expect to find viridian and vmware extensions. ~Andrew