[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] vpmu intel: move setting alloc flag


  • To: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
  • Date: Tue, 12 Mar 2013 14:44:18 +0100
  • Delivery-date: Tue, 12 Mar 2013 13:44:41 +0000
  • Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:From:To:Subject:Date:Message-ID: User-Agent:MIME-Version:Content-Transfer-Encoding: Content-Type; b=jPY7/GK9Ab/6KT6UZRq7oETpIM4jqxQwIPA3oTRjzBO86YqgQSuUN1BX e2BROTYktwGSXB/7dZPiMCiYtVfCIt68N2YWRYTcyqe22dJTZ13ZFev+x y5IEGo/mzElQo8PBhYO8+ojni9nCX0qAWTyVzlHNL7G1eBbWDdTl86PNa Y6LDe+sqgVf4kjYkE+pzv91rNKxs9mZWTxBeRT6gXj/FIFeztLhKOP3vv 8bEslYwdrpfWIAk6y8knMMFWBpca2;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hi,

This simple patch moves the setting of the ALLOCATED flag to where the
allocation gets done.

Dietmar.


Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>


diff -r a6b81234b189 xen/arch/x86/hvm/vmx/vpmu_core2.c
--- a/xen/arch/x86/hvm/vmx/vpmu_core2.c Mon Mar 11 16:13:42 2013 +0000
+++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c Tue Mar 12 14:30:37 2013 +0100
@@ -346,6 +346,7 @@ static int core2_vpmu_alloc_resource(str
         goto out2;
     core2_vpmu_cxt->pmu_enable = pmu_enable;
     vpmu->context = (void *)core2_vpmu_cxt;
+    vpmu_set(vpmu, VPMU_CONTEXT_ALLOCATED);
 
     return 1;
  out2:
@@ -384,7 +385,6 @@ static int core2_vpmu_msr_common_check(u
         (vpmu->context != NULL ||
          !core2_vpmu_alloc_resource(current)) )
         return 0;
-    vpmu_set(vpmu, VPMU_CONTEXT_ALLOCATED);
 
     /* Do the lazy load staff. */
     if ( !vpmu_is_set(vpmu, VPMU_CONTEXT_LOADED) )


-- 
Company details: http://ts.fujitsu.com/imprint.html

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.