From: Keir Fraser Date: Thu, 13 May 2010 07:55:41 +0000 (+0100) Subject: VPMU: Make vpmu stucture visiable for both vmx and svm X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12174 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2936184088f761697b7b899e1550fc75e6a9b4fe;p=xen.git VPMU: Make vpmu stucture visiable for both vmx and svm Signed-off-by: Wei Wang --- diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h index ed6b250ff9..150b30d32d 100644 --- a/xen/include/asm-x86/hvm/vcpu.h +++ b/xen/include/asm-x86/hvm/vcpu.h @@ -76,6 +76,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 --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h index e8bd776641..29172e0d53 100644 --- a/xen/include/asm-x86/hvm/vmx/vmcs.h +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h @@ -91,9 +91,6 @@ struct arch_vmx_struct { u32 exec_control; u32 secondary_exec_control; - /* PMU */ - struct vpmu_struct vpmu; - #ifdef __x86_64__ struct vmx_msr_state msr_state; unsigned long shadow_gs; diff --git a/xen/include/asm-x86/hvm/vpmu.h b/xen/include/asm-x86/hvm/vpmu.h index 5f5f2e344f..2baf8f29c7 100644 --- a/xen/include/asm-x86/hvm/vpmu.h +++ b/xen/include/asm-x86/hvm/vpmu.h @@ -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