From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH v15 07/19] pvh: Disable unneeded features of HVM containers Date: Tue, 12 Nov 2013 14:56:20 +0000 Message-ID: <52824194.2020305@eu.citrix.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VgFOD-0003gh-SR for xen-devel@lists.xenproject.org; Tue, 12 Nov 2013 14:56:26 +0000 In-Reply-To: <5282408B02000078001025DC@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 Fraser , Tim Deegan , Eddie Dong , Jun Nakajima , xen-devel List-Id: xen-devel@lists.xenproject.org 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. -George