From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH 7/8] x86/VPMU: Save/restore VPMU only when necessary Date: Wed, 10 Apr 2013 08:53:38 -0400 Message-ID: <516560D2.7070000@oracle.com> References: <1365528379-2516-1-git-send-email-boris.ostrovsky@oracle.com> <1365528379-2516-8-git-send-email-boris.ostrovsky@oracle.com> <21013935.pI9YIQR7s4@amur> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21013935.pI9YIQR7s4@amur> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dietmar Hahn Cc: jacob.shin@amd.com, haitao.shan@intel.com, jun.nakajima@intel.com, suravee.suthikulpanit@amd.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 04/10/2013 04:57 AM, Dietmar Hahn wrote: > > struct vpmu_struct { > u32 flags; > + u32 last_pcpu; > u32 hw_lapic_lvtpc; > void *context; > struct arch_vpmu_ops *arch_vpmu_ops; > @@ -73,6 +74,8 @@ struct vpmu_struct { > #define VPMU_PASSIVE_DOMAIN_ALLOCATED 0x8 > #define VPMU_CPU_HAS_DS 0x10 /* Has Debug Store */ > #define VPMU_CPU_HAS_BTS 0x20 /* Has Branch Trace Store */ > +#define VPMU_CONTEXT_SAVE 0x40 /* Force context save */ > +#define VPMU_STOPPED 0x80 /* Stop counters while VCPU is not running */ > Would it be better to group the VPMU_ state and context flags together and move > special cpu flags behind? Yes, I should do this. I'll wait for other comments and will resend the patches. (And will add VPMU dump code for AMD, similar to what you did for Intel.) Thanks. -boris