From: "Jan Beulich" Subject: Re: [PATCH v13 for-xen-4.5 09/21] x86/VPMU: Add public xenpmu.h Date: Tue, 14 Oct 2014 11:03:04 +0100 Message-ID: <543D10F8020000780003E9E1@mail.emea.novell.com> References: <1412372423-1182-1-git-send-email-boris.ostrovsky@oracle.com> <1412372423-1182-10-git-send-email-boris.ostrovsky@oracle.com> <543BF039020000780003E4ED@mail.emea.novell.com> <543C1A99.6070203@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <543C1A99.6070203@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: Boris Ostrovsky Cc: kevin.tian@intel.com, keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, tim@xen.org, dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org, Aravind.Gopalakrishnan@amd.com, jun.nakajima@intel.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org >>> On 13.10.14 at 20:31, wrote: > On 10/13/2014 09:31 AM, Jan Beulich wrote: >> >>> --- a/xen/include/public/arch-x86/xen-x86_32.h >>> +++ b/xen/include/public/arch-x86/xen-x86_32.h >>> @@ -136,6 +136,16 @@ struct cpu_user_regs { >>> typedef struct cpu_user_regs cpu_user_regs_t; >>> DEFINE_XEN_GUEST_HANDLE(cpu_user_regs_t); >>> >>> +struct xen_pmu_regs { >>> + uint32_t eip; >>> + uint32_t esp; >>> + uint32_t eflags; >>> + uint16_t cs; >>> + uint16_t ss; >>> +}; >> I still don't see why this and ... >> >>> --- a/xen/include/public/arch-x86/xen-x86_64.h >>> +++ b/xen/include/public/arch-x86/xen-x86_64.h >>> @@ -174,6 +174,16 @@ struct cpu_user_regs { >>> typedef struct cpu_user_regs cpu_user_regs_t; >>> DEFINE_XEN_GUEST_HANDLE(cpu_user_regs_t); >>> >>> +struct xen_pmu_regs { >>> + __DECL_REG(ip); >>> + __DECL_REG(sp); >>> + __DECL_REG(flags); >>> + uint16_t cs; >>> + uint16_t ss; >>> +}; >> aren't folded and aren't placed in the PMU-specific header. > > Because it follows cpu_user_regs() definitions. I thought you agreed to > that but if not I can move it to PMU code. I don't think I did. __DECL_REG() really only exists for internal purposes of the hypervisor, so unless you have a need to access these fields the dual/triple way that the cpu_user_regs ones get accessed in some cases, there's no point in having these here. Jan