CPU version can be got by PVR on PowerPC. So this PVR is defined in the CPU data in cpuData structure. Signed-off-by: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx> Acked-by: Michal Privoznik<mprivozn@xxxxxxxxxx> --- src/cpu/cpu.h | 3 +++ src/cpu/cpu_ppc_data.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 src/cpu/cpu_ppc_data.h diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index 5ba742d..01c732c 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -28,11 +28,14 @@ # include "datatypes.h" # include "conf/cpu_conf.h" # include "cpu_x86_data.h" +# include "cpu_ppc_data.h" union cpuData { struct cpuX86Data x86; /* generic driver needs no data */ + /* PowerPC driver need data*/ + struct cpuPPCData ppc; }; diff --git a/src/cpu/cpu_ppc_data.h b/src/cpu/cpu_ppc_data.h new file mode 100644 index 0000000..685332a --- /dev/null +++ b/src/cpu/cpu_ppc_data.h @@ -0,0 +1,33 @@ +/* + * cpu_ppc_data.h: PowerPC specific CPU data + * + * Copyright (C) 2012 IBM Corporation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; If not, see + * <http://www.gnu.org/licenses/>. + * + * Authors: + * Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx> + */ + +#ifndef __VIR_CPU_PPC_DATA_H__ +# define __VIR_CPU_PPC_DATA_H__ + +# include <stdint.h> + +struct cpuPPCData { + uint32_t pvr; +}; + +#endif /* __VIR_CPU_PPC_DATA_H__ */ -- 1.7.7.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list