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 15:08:38 +0000 Message-ID: <52824476.8090003@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> <52824194.2020305@eu.citrix.com> <5282515E0200007800102787@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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VgFan-0006eK-Er for xen-devel@lists.xenproject.org; Tue, 12 Nov 2013 15:09:25 +0000 In-Reply-To: <5282515E0200007800102787@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 03:03 PM, Jan Beulich wrote: >>>> 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. The plan I think is for is_pvh to go away, and instead to have a flag indicating whether the guest has / is using a LAPIC. -George