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:24:25 -0400 Message-ID: <531F1C99.8040208@oracle.com> References: <1394510043-3159-1-git-send-email-boris.ostrovsky@oracle.com> <1394510043-3159-2-git-send-email-boris.ostrovsky@oracle.com> <531EDB480200007800122ACB@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <531EDB480200007800122ACB@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 Cc: keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, eddie.dong@intel.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org On 03/11/2014 04:45 AM, Jan Beulich wrote: >>>> On 11.03.14 at 04: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). > And honestly I'm not certain we want to go that far. Limiting the > number of leaves seems reasonable (even CPU vendors had to > introduce this), but altering other hypervisor CPUID output seems > to only call for trouble. If we do this I suspect we can get rid of the sysctl altogether. Alternatively we can do this as part of policy in libxc but preserve ability to change the policy (and keep sysctl). I slightly prefer the latter as I think it's a useful feature but I can see reasons for not doing it. > >> +struct xen_sysctl_cpuid { >> + uint32_t input[2]; >> + uint32_t eax; >> + uint32_t ebx; >> + uint32_t ecx; >> + uint32_t edx; >> +}; > Having just the four register fields here would be enough - eax > and ecx would simply be IN/OUT (and if need be in the future, > ebx/edx could become IN/OUT too without altering the structure > layout). Right. I just blindly copied xen_domctl_cpuid here. Thanks. -boris