1 /* 2 * PPC CPU identification 3 * 4 * Copyright 2012 Matt Evans <matt@ozlabs.org>, IBM Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published 8 * by the Free Software Foundation. 9 */ 10 11 #ifndef CPU_INFO_H 12 #define CPU_INFO_H 13 14 #include <kvm/kvm.h> 15 16 #include <linux/types.h> 17 #include <linux/kernel.h> 18 #include <linux/kvm.h> 19 20 struct cpu_info { 21 const char *name; 22 u32 tb_freq; /* timebase frequency */ 23 u32 d_bsize; /* d-cache block size */ 24 u32 i_bsize; /* i-cache block size */ 25 u32 flags; 26 struct kvm_ppc_smmu_info mmu_info; 27 }; 28 29 struct pvr_info { 30 u32 pvr_mask; 31 u32 pvr; 32 struct cpu_info *cpu_info; 33 }; 34 35 /* Misc capabilities/CPU properties */ 36 #define CPUINFO_FLAG_DFP 0x00000001 37 #define CPUINFO_FLAG_VMX 0x00000002 38 #define CPUINFO_FLAG_VSX 0x00000004 39 40 struct cpu_info *find_cpu_info(struct kvm *kvm); 41 42 #endif 43