From: "Jan Beulich" Subject: Re: [PATCH v15 07/19] pvh: Disable unneeded features of HVM containers Date: Tue, 12 Nov 2013 15:03:42 +0000 Message-ID: <5282515E0200007800102787@nat28.tlf.novell.com> References: <1384181841-22739-1-git-send-email-george.dunlap@eu.citrix.com> <1384181841-22739-8-git-send-email-george.dunlap@eu.citrix.com> <5282408B02000078001025DC@nat28.tlf.novell.com> <52824194.2020305@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VgFVL-0004ui-UP for xen-devel@lists.xenproject.org; Tue, 12 Nov 2013 15:03:48 +0000 In-Reply-To: <52824194.2020305@eu.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: George Dunlap Cc: Keir Fraser , Tim Deegan , Eddie Dong , Jun Nakajima , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 12.11.13 at 15:56, George Dunlap wrote: > On 11/12/2013 01:51 PM, Jan Beulich wrote: >>>>> On 11.11.13 at 15:57, George Dunlap wrote: >>> @@ -1414,6 +1442,7 @@ int hvm_hap_nested_page_fault(paddr_t gpa, >>> /* For the benefit of 32-bit WinXP (& older Windows) on AMD CPUs, >>> * a fast path for LAPIC accesses, skipping the p2m lookup. */ >>> if ( !nestedhvm_vcpu_in_guestmode(v) >>> + && is_hvm_vcpu(v) >> >> This change looks unnecessary - nestedhvm_vcpu_enter_guestmode() >> (the only way by which nestedhvm_vcpu_in_guestmode() could return >> other than zero) must obviously never be used on a PVH guest. > > You've got the polarity of that check wrong -- PVH guests are never in > guest mode, therefore !nestedhvm_vcpu_in_guestmode() is always true. Oh, indeed. In which case I'd slightly prefer !is_pvh_vcpu() here, but I guess it's not really significant anyway. Jan