From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang2 Subject: [PATCH 2/4] VPMU: Make vpmu stucture visiable for both vmx and svm Date: Wed, 12 May 2010 18:25:11 +0200 Message-ID: <201005121825.11827.wei.wang2@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_nZt6LQfyCIdwmmD" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --Boundary-00=_nZt6LQfyCIdwmmD Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Signed-off-by: Wei Wang =2D-=20 AMD GmbH, Germany Operating System Research Center Legal Information: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34 85609 Dornach b. M=FCnchen Gesch=E4ftsf=FChrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis M=FCnchen Registergericht M=FCnchen, HRB Nr. 43632 --Boundary-00=_nZt6LQfyCIdwmmD Content-Type: text/x-diff; charset="iso-8859-1"; name="header_vpmu.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="header_vpmu.patch" diff -r dcb9da42bfd0 xen/include/asm-x86/hvm/vcpu.h --- a/xen/include/asm-x86/hvm/vcpu.h Tue May 11 15:03:37 2010 +0200 +++ b/xen/include/asm-x86/hvm/vcpu.h Tue May 11 15:33:12 2010 +0200 @@ -75,6 +75,9 @@ struct hvm_vcpu { u32 msr_tsc_aux; + /* VPMU */ + struct vpmu_struct vpmu; + union { struct arch_vmx_struct vmx; struct arch_svm_struct svm; diff -r dcb9da42bfd0 xen/include/asm-x86/hvm/vmx/vmcs.h --- a/xen/include/asm-x86/hvm/vmx/vmcs.h Tue May 11 15:03:37 2010 +0200 +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h Tue May 11 15:33:12 2010 +0200 @@ -90,9 +90,6 @@ struct arch_vmx_struct { /* Cache of cpu execution control. */ u32 exec_control; u32 secondary_exec_control; - - /* PMU */ - struct vpmu_struct vpmu; #ifdef __x86_64__ struct vmx_msr_state msr_state; diff -r dcb9da42bfd0 xen/include/asm-x86/hvm/vpmu.h --- a/xen/include/asm-x86/hvm/vpmu.h Tue May 11 15:03:37 2010 +0200 +++ b/xen/include/asm-x86/hvm/vpmu.h Tue May 11 15:33:12 2010 +0200 @@ -23,9 +23,9 @@ #define __ASM_X86_HVM_VPMU_H_ #define msraddr_to_bitpos(x) (((x)&0xffff) + ((x)>>31)*0x2000) -#define vcpu_vpmu(vcpu) (&(vcpu)->arch.hvm_vcpu.u.vmx.vpmu) +#define vcpu_vpmu(vcpu) (&((vcpu)->arch.hvm_vcpu.vpmu)) #define vpmu_vcpu(vpmu) (container_of((vpmu), struct vcpu, \ - arch.hvm_vcpu.u.vmx.vpmu)) + arch.hvm_vcpu.vpmu)) #define vpmu_domain(vpmu) (vpmu_vcpu(vpmu)->domain) #define MSR_TYPE_COUNTER 0 --Boundary-00=_nZt6LQfyCIdwmmD Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_nZt6LQfyCIdwmmD--