From: "Jan Beulich" Subject: Re: [PATCH 4/6] libxc: expose xsaves/xgetbv1/xsavec to hvm guest Date: Fri, 17 Jul 2015 08:47:36 +0100 Message-ID: <55A8CF380200007800092561@mail.emea.novell.com> References: <1437118016-25547-1-git-send-email-shuai.ruan@intel.com> <1437118016-25547-5-git-send-email-shuai.ruan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1437118016-25547-5-git-send-email-shuai.ruan@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Shuai Ruan Cc: kevin.tian@intel.com, wei.liu2@citrix.com, eddie.dong@intel.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, jun.nakajima@intel.com, keir@xen.org, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 17.07.15 at 09:26, wrote: > @@ -247,8 +250,7 @@ static void xc_cpuid_config_xsave( > regs[1] = 512 + 64; /* FP/SSE + XSAVE.HEADER */ > break; > case 1: /* leaf 1 */ > - regs[0] &= XSAVEOPT; > - regs[1] = regs[2] = regs[3] = 0; This deletion as well as ... > + regs[0] &= (XSAVEOPT | XSAVEC | XGETBV1 | XSAVES); > break; > case 2 ... 63: /* sub-leaves */ > if ( !(xfeature_mask & (1ULL << input[1])) ) > @@ -256,8 +258,6 @@ static void xc_cpuid_config_xsave( > regs[0] = regs[1] = regs[2] = regs[3] = 0; > break; > } > - /* Don't touch EAX, EBX. Also cleanup ECX and EDX */ > - regs[2] = regs[3] = 0; ... this one need explaining in the description. And in this latter case the comment should probably be retained/amended if the code deletion is really intended/warranted. Jan