@@ -25,13 +25,13 @@
static struct cpu_info cpu_power7_info = {
.name = "POWER7",
- .slb_size = 32,
.tb_freq = 512000000,
.d_bsize = 128,
.i_bsize = 128,
.flags = CPUINFO_FLAG_DFP | CPUINFO_FLAG_VSX | CPUINFO_FLAG_VMX,
.mmu_info = {
.flags = KVM_PPC_PAGE_SIZES_REAL | KVM_PPC_1T_SEGMENTS,
+ .slb_size = 32,
},
};
@@ -39,7 +39,6 @@ static struct cpu_info cpu_power7_info = {
static struct cpu_info cpu_970_info = {
.name = "G5",
- .slb_size = 0,
.tb_freq = 33333333,
.d_bsize = 128,
.i_bsize = 128,
@@ -19,7 +19,6 @@
struct cpu_info {
const char *name;
- u32 slb_size;
u32 tb_freq; /* timebase frequency */
u32 d_bsize; /* d-cache block size */
u32 i_bsize; /* i-cache block size */
@@ -393,8 +393,9 @@ static void setup_fdt(struct kvm *kvm)
/* Lies, but safeish lies! */
_FDT(fdt_property_cell(fdt, "clock-frequency", 0xddbab200));
- if (cpu_info->slb_size)
- _FDT(fdt_property_cell(fdt, "ibm,slb-size", cpu_info->slb_size));
+ if (cpu_info->mmu_info.slb_size)
+ _FDT(fdt_property_cell(fdt, "ibm,slb-size", cpu_info->mmu_info.slb_size));
+
/*
* HPT size is hardwired; KVM currently fixes it at 16MB but the
* moment that changes we'll need to read it out of the kernel.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> --- tools/kvm/powerpc/cpu_info.c | 3 +-- tools/kvm/powerpc/cpu_info.h | 1 - tools/kvm/powerpc/kvm.c | 5 +++-- 3 files changed, 4 insertions(+), 5 deletions(-)