From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v13 for-xen-4.5 09/21] x86/VPMU: Add public xenpmu.h Date: Mon, 13 Oct 2014 14:31:53 -0400 Message-ID: <543C1A99.6070203@oracle.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <543BF039020000780003E4ED@mail.emea.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: 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 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. > > Furthermore I'm sure you realized (the latest when adding back > the eflags field for VM86 mode recognition) that to the consumer of > this data things are still ambiguous: You can't tell protected from > real mode, yet HVM guests definitely use that mode. I can set a bit in the sample's flag field if the guest is in real mode. -boris -boris