From: "Jan Beulich" Subject: Re: [V0 PATCH 4/6] AMD-PVH: Do not get/set vlapic TPR Date: Wed, 20 Aug 2014 13:11:50 +0100 Message-ID: <53F49E9602000078000BAD79@mail.emea.novell.com> References: <1408153996-16425-1-git-send-email-mukesh.rathor@oracle.com> <1408153996-16425-5-git-send-email-mukesh.rathor@oracle.com> <53F2A588.7080407@oracle.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 1XK4k6-0002sY-P2 for xen-devel@lists.xenproject.org; Wed, 20 Aug 2014 12:11:54 +0000 In-Reply-To: <53F2A588.7080407@oracle.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: xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, mukesh.rathor@oracle.com Cc: keir@xen.org, Aravind.Gopalakrishnan@amd.com, suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org >>> Boris Ostrovsky 08/19/14 3:17 AM >>> >On 08/15/2014 09:53 PM, Mukesh Rathor wrote: >> --- a/xen/arch/x86/hvm/svm/svm.c >> +++ b/xen/arch/x86/hvm/svm/svm.c >> @@ -1052,7 +1052,7 @@ static void noreturn svm_do_resume(struct vcpu *v) >> hvm_asid_flush_vcpu(v); >> } >> >> - if ( !vcpu_guestmode ) >> + if ( !vcpu_guestmode && vcpu_vlapic(v)->regs ) > >I think checking explicitly for PVH (i.e. is_pvh_domain()) would be >better. Here and below, obviously. Yeah, I guess so for now, as it'll make it easier to locate the place when ultimately changing to more fine grained checks. Jan