Revision d83af167
b/target-ppc/cpu.h | ||
---|---|---|
405 | 405 |
uint64_t vsid; |
406 | 406 |
}; |
407 | 407 |
|
408 |
#define MAX_SLB_ENTRIES 64 |
|
408 | 409 |
#define SEGMENT_SHIFT_256M 28 |
409 | 410 |
#define SEGMENT_MASK_256M (~((1ULL << SEGMENT_SHIFT_256M) - 1)) |
410 | 411 |
|
... | ... | |
949 | 950 |
#if !defined(CONFIG_USER_ONLY) |
950 | 951 |
#if defined(TARGET_PPC64) |
951 | 952 |
/* PowerPC 64 SLB area */ |
952 |
ppc_slb_t slb[64];
|
|
953 |
ppc_slb_t slb[MAX_SLB_ENTRIES];
|
|
953 | 954 |
int32_t slb_nr; |
954 | 955 |
#endif |
955 | 956 |
/* segment registers */ |
b/target-ppc/kvm.c | ||
---|---|---|
818 | 818 |
|
819 | 819 |
/* Sync SLB */ |
820 | 820 |
#ifdef TARGET_PPC64 |
821 |
for (i = 0; i < 64; i++) {
|
|
821 |
for (i = 0; i < ARRAY_SIZE(env->slb); i++) {
|
|
822 | 822 |
sregs.u.s.ppc64.slb[i].slbe = env->slb[i].esid; |
823 | 823 |
sregs.u.s.ppc64.slb[i].slbv = env->slb[i].vsid; |
824 | 824 |
} |
... | ... | |
1040 | 1040 |
* back in. |
1041 | 1041 |
*/ |
1042 | 1042 |
memset(env->slb, 0, sizeof(env->slb)); |
1043 |
for (i = 0; i < 64; i++) {
|
|
1043 |
for (i = 0; i < ARRAY_SIZE(env->slb); i++) {
|
|
1044 | 1044 |
target_ulong rb = sregs.u.s.ppc64.slb[i].slbe; |
1045 | 1045 |
target_ulong rs = sregs.u.s.ppc64.slb[i].slbv; |
1046 | 1046 |
/* |
b/target-ppc/machine.c | ||
---|---|---|
312 | 312 |
.minimum_version_id_old = 1, |
313 | 313 |
.fields = (VMStateField []) { |
314 | 314 |
VMSTATE_INT32_EQUAL(env.slb_nr, PowerPCCPU), |
315 |
VMSTATE_SLB_ARRAY(env.slb, PowerPCCPU, 64),
|
|
315 |
VMSTATE_SLB_ARRAY(env.slb, PowerPCCPU, MAX_SLB_ENTRIES),
|
|
316 | 316 |
VMSTATE_END_OF_LIST() |
317 | 317 |
} |
318 | 318 |
}; |
Also available in: Unified diff