From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: [V0 PATCH] pvh: expose feature flags from tools for domUs Date: Tue, 28 Jan 2014 13:24:15 +0100 Message-ID: <52E7A16F.6090401@citrix.com> References: <1390612410-27384-1-git-send-email-mukesh.rathor@oracle.com> <1390612410-27384-2-git-send-email-mukesh.rathor@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1390612410-27384-2-git-send-email-mukesh.rathor@oracle.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: Mukesh Rathor , Xen-devel@lists.xensource.com Cc: ian.jackson@eu.citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 25/01/14 02:13, Mukesh Rathor wrote: > Expose features for pvh domUs from tools. > > Signed-off-by: Mukesh Rathor > --- > tools/libxc/xc_cpuid_x86.c | 26 ++++++++++++++++---------- > tools/libxc/xc_domain.c | 1 + > tools/libxc/xenctrl.h | 2 +- > 3 files changed, 18 insertions(+), 11 deletions(-) > > diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c > index bbbf9b8..33f6829 100644 > --- a/tools/libxc/xc_cpuid_x86.c > +++ b/tools/libxc/xc_cpuid_x86.c > @@ -433,7 +433,7 @@ static void xc_cpuid_hvm_policy( > > static void xc_cpuid_pv_policy( > xc_interface *xch, domid_t domid, > - const unsigned int *input, unsigned int *regs) > + const unsigned int *input, unsigned int *regs, int is_pvh) > { > DECLARE_DOMCTL; > unsigned int guest_width; > @@ -455,13 +455,16 @@ static void xc_cpuid_pv_policy( > > if ( (input[0] & 0x7fffffff) == 0x00000001 ) > { > - clear_bit(X86_FEATURE_VME, regs[3]); > - clear_bit(X86_FEATURE_PSE, regs[3]); > - clear_bit(X86_FEATURE_PGE, regs[3]); > - clear_bit(X86_FEATURE_MCE, regs[3]); > - clear_bit(X86_FEATURE_MCA, regs[3]); > + if ( !is_pvh ) > + { > + clear_bit(X86_FEATURE_VME, regs[3]); > + clear_bit(X86_FEATURE_PSE, regs[3]); > + clear_bit(X86_FEATURE_PGE, regs[3]); > + clear_bit(X86_FEATURE_MCE, regs[3]); > + clear_bit(X86_FEATURE_MCA, regs[3]); Should we enable MCA/MCE flags for PVH DomUs? It looks to me like Dom0 is the only domain that can make use of MCE/MCA. Roger.