From: "Jan Beulich" Subject: Re: [PATCH v2] xen: fix cpuid reporting on PVH Dom0 Date: Mon, 04 Aug 2014 11:39:58 +0100 Message-ID: <53DF7F1E0200007800028E99@mail.emea.novell.com> References: <1406906762-18254-1-git-send-email-roger.pau@citrix.com> <53DF6137.5010308@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XEFgT-0004zy-Cw for xen-devel@lists.xenproject.org; Mon, 04 Aug 2014 10:40:05 +0000 In-Reply-To: <53DF6137.5010308@citrix.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: Andrew Cooper Cc: xen-devel@lists.xenproject.org, Roger Pau Monne List-Id: xen-devel@lists.xenproject.org >>> On 04.08.14 at 12:32, wrote: > On 01/08/14 16:26, Roger Pau Monne wrote: >> --- a/xen/arch/x86/traps.c >> +++ b/xen/arch/x86/traps.c >> @@ -803,12 +803,16 @@ void pv_cpuid(struct cpu_user_regs *regs) >> if ( (regs->eax & 0x7fffffff) == 0x00000001 ) >> { >> /* Modify Feature Information. */ >> - __clear_bit(X86_FEATURE_VME, &d); >> if ( !cpu_has_apic ) >> __clear_bit(X86_FEATURE_APIC, &d); >> - __clear_bit(X86_FEATURE_PSE, &d); >> - __clear_bit(X86_FEATURE_PGE, &d); >> - __clear_bit(X86_FEATURE_PSE36, &d); > > Newline here... > >> + if ( !is_pvh_vcpu(curr) ) >> + { >> + __clear_bit(X86_FEATURE_PSE, &d); >> + __clear_bit(X86_FEATURE_PGE, &d); >> + __clear_bit(X86_FEATURE_PSE36, &d); >> + __clear_bit(X86_FEATURE_VME, &d); > > Why do PVH guests care about VME? They can't use it as far as I am aware. I don't think it particularly cares, but it also seems unnecessary and inconsistent to hide a feature from it without need. >> + } >> + > > ... and not here. I've already taken care of these formatting issues in the to-be- committed version. Jan