From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v2 1/4] xen/libxc: Allow changes to hypervisor CPUID leaf from config file Date: Tue, 11 Mar 2014 10:48:34 -0400 Message-ID: <531F2242.9080609@oracle.com> References: <1394510043-3159-1-git-send-email-boris.ostrovsky@oracle.com> <1394510043-3159-2-git-send-email-boris.ostrovsky@oracle.com> <531EE11E.4050300@citrix.com> <531F188F.6030807@oracle.com> <531F1D28.5090108@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <531F1D28.5090108@citrix.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: Andrew Cooper Cc: keir@xen.org, jbeulich@suse.com, stefano.stabellini@eu.citrix.com, eddie.dong@intel.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, jun.nakajima@intel.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 03/11/2014 10:26 AM, Andrew Cooper wrote: > On 11/03/14 14:07, Boris Ostrovsky wrote: >> On 03/11/2014 06:10 AM, Andrew Cooper wrote: >>> On 11/03/14 03:54, Boris Ostrovsky wrote: >>>> Currently only "real" cpuid leaves can be overwritten by users via >>>> 'cpuid' option in the configuration file. This patch provides >>>> ability to >>>> do the same for hypervisor leaves (those in the 0x40000000 range). >>>> >>>> Signed-off-by: Boris Ostrovsky >>> How? There is nothing stopping leaves in 0x40000000 being set in the >>> policy with XEN_DOMCTL_set_cpuid, but I dont see anything which plumbs >>> this together at the Xen level. >> Right. What this patch mostly provides is ability to query the >> hypervisor (via sysctl) about default values of hypervisor CPUID leaf >> from userspace. We cannot use CPUID instruction here (for dom0). And >> /dev/cpu//cpuid may not exist. > The XEN_FORCED_EMULATION prefix would be fine, and not require a new > custom hypercall, but only an HVM guest is going to care whether it can > find this magic leaf. Doh! For some reasons I decided that it won't work for userland. But of course it will. Which eliminates the need for sysctl. -boris