aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/machine.c
blob: bb9e44c4cef53c0ac06b016c14af7a57d036473f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
#include "hw/hw.h"
#include "hw/boards.h"
#include "qemu/timer.h"

#include "cpu.h"

#ifdef TARGET_SPARC64
static const VMStateDescription vmstate_cpu_timer = {
    .name = "cpu_timer",
    .version_id = 1,
    .minimum_version_id = 1,
    .minimum_version_id_old = 1,
    .fields = (VMStateField[]) {
        VMSTATE_UINT32(frequency, CPUTimer),
        VMSTATE_UINT32(disabled, CPUTimer),
        VMSTATE_UINT64(disabled_mask, CPUTimer),
        VMSTATE_UINT32(npt, CPUTimer),
        VMSTATE_UINT64(npt_mask, CPUTimer),
        VMSTATE_INT64(clock_offset, CPUTimer),
        VMSTATE_TIMER_PTR(qtimer, CPUTimer),
        VMSTATE_END_OF_LIST()
    }
};

#define VMSTATE_CPU_TIMER(_f, _s)                             \
    VMSTATE_STRUCT_POINTER(_f, _s, vmstate_cpu_timer, CPUTimer)

static const VMStateDescription vmstate_trap_state = {
    .name = "trap_state",
    .version_id = 1,
    .minimum_version_id = 1,
    .minimum_version_id_old = 1,
    .fields = (VMStateField[]) {
        VMSTATE_UINT64(tpc, trap_state),
        VMSTATE_UINT64(tnpc, trap_state),
        VMSTATE_UINT64(tstate, trap_state),
        VMSTATE_UINT32(tt, trap_state),
        VMSTATE_END_OF_LIST()
    }
};

static const VMStateDescription vmstate_tlb_entry = {
    .name = "tlb_entry",
    .version_id = 1,
    .minimum_version_id = 1,
    .minimum_version_id_old = 1,
    .fields = (VMStateField[]) {
        VMSTATE_UINT64(tag, SparcTLBEntry),
        VMSTATE_UINT64(tte, SparcTLBEntry),
        VMSTATE_END_OF_LIST()
    }
};
#endif

static int get_psr(QEMUFile *f, void *opaque, size_t size)
{
    SPARCCPU *cpu = opaque;
    CPUSPARCState *env = &cpu->env;
    uint32_t val = qemu_get_be32(f);

    /* needed to ensure that the wrapping registers are correctly updated */
    env->cwp = 0;
    cpu_put_psr_raw(env, val);

    return 0;
}

static void put_psr(QEMUFile *f, void *opaque, size_t size)
{
    SPARCCPU *cpu = opaque;
    CPUSPARCState *env = &cpu->env;
    uint32_t val;

    val = cpu_get_psr(env);

    qemu_put_be32(f, val);
}

static const VMStateInfo vmstate_psr = {
    .name = "psr",
    .get = get_psr,
    .put = put_psr,
};

static void cpu_pre_save(void *opaque)
{
    SPARCCPU *cpu = opaque;
    CPUSPARCState *env = &cpu->env;

    /* if env->cwp == env->nwindows - 1, this will set the ins of the last
     * window as the outs of the first window
     */
    cpu_set_cwp(env, env->cwp);
}

const VMStateDescription vmstate_sparc_cpu = {
    .name = "cpu",
    .version_id = 7,
    .minimum_version_id = 7,
    .minimum_version_id_old = 7,
    .pre_save = cpu_pre_save,
    .fields = (VMStateField[]) {
        VMSTATE_UINTTL_ARRAY(env.gregs, SPARCCPU, 8),
        VMSTATE_UINT32(env.nwindows, SPARCCPU),
        VMSTATE_VARRAY_MULTIPLY(env.regbase, SPARCCPU, env.nwindows, 16,
                                vmstate_info_uinttl, target_ulong),
        VMSTATE_CPUDOUBLE_ARRAY(env.fpr, SPARCCPU, TARGET_DPREGS),
        VMSTATE_UINTTL(env.pc, SPARCCPU),
        VMSTATE_UINTTL(env.npc, SPARCCPU),
        VMSTATE_UINTTL(env.y, SPARCCPU),
        {

            .name = "psr",
            .version_id = 0,
            .size = sizeof(uint32_t),
            .info = &vmstate_psr,
            .flags = VMS_SINGLE,
            .offset = 0,
        },
        VMSTATE_UINTTL(env.fsr, SPARCCPU),
        VMSTATE_UINTTL(env.tbr, SPARCCPU),
        VMSTATE_INT32(env.interrupt_index, SPARCCPU),
        VMSTATE_UINT32(env.pil_in, SPARCCPU),
#ifndef TARGET_SPARC64
        /* MMU */
        VMSTATE_UINT32(env.wim, SPARCCPU),
        VMSTATE_UINT32_ARRAY(env.mmuregs, SPARCCPU, 32),
        VMSTATE_UINT64_ARRAY(env.mxccdata, SPARCCPU, 4),
        VMSTATE_UINT64_ARRAY(env.mxccregs, SPARCCPU, 8),
        VMSTATE_UINT32(env.mmubpctrv, SPARCCPU),
        VMSTATE_UINT32(env.mmubpctrc, SPARCCPU),
        VMSTATE_UINT32(env.mmubpctrs, SPARCCPU),
        VMSTATE_UINT64(env.mmubpaction, SPARCCPU),
        VMSTATE_UINT64_ARRAY(env.mmubpregs, SPARCCPU, 4),
#else
        VMSTATE_UINT64(env.lsu, SPARCCPU),
        /* Unfortunately we cannot use vmstate arrays for these because
         * the pre-VMState migration code sent the contents on the wire
         * interleaved rather than one array at a time.
         */
        VMSTATE_UINT64(env.immuregs[0], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[0], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[1], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[1], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[2], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[2], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[3], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[3], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[4], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[4], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[5], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[5], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[6], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[6], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[7], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[7], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[8], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[8], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[9], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[9], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[10], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[10], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[11], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[11], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[12], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[12], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[13], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[13], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[14], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[14], SPARCCPU),
        VMSTATE_UINT64(env.immuregs[15], SPARCCPU),
        VMSTATE_UINT64(env.dmmuregs[15], SPARCCPU),
        VMSTATE_STRUCT(env.itlb[0], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[0], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[1], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[1], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[2], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[2], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[3], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[3], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[4], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[4], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[5], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[5], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[6], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[6], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[7], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[7], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[8], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[8], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[9], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[9], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[10], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[10], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[11], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[11], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[12], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[12], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[13], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[13], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[14], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[14], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[15], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[15], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[16], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[16], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[17], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[17], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[18], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[18], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[19], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[19], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[20], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[20], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[21], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[21], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[22], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[22], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[23], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[23], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[24], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[24], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[25], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[25], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[26], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[26], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[27], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[27], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[28], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[28], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[29], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[29], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[30], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[30], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[31], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[31], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[32], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[32], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[33], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[33], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[34], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[34], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[35], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[35], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[36], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[36], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[37], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[37], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[38], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[38], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[39], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[39], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[40], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[40], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[41], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[41], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[42], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[42], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[43], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[43], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[44], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[44], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[45], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[45], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[46], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[46], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[47], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[47], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[48], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[48], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[49], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[49], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[50], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[50], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[51], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[51], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[52], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[52], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[53], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[53], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[54], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[54], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[55], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[55], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[56], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[56], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[57], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[57], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[58], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[58], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[59], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[59], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[60], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[60], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[61], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[61], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[62], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[62], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.itlb[63], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_STRUCT(env.dtlb[63], SPARCCPU, 0, vmstate_tlb_entry,
                       SparcTLBEntry),
        VMSTATE_UINT32(env.mmu_version, SPARCCPU),
        VMSTATE_STRUCT_ARRAY(env.ts, SPARCCPU, MAXTL_MAX, 0,
                             vmstate_trap_state, trap_state),
        VMSTATE_UINT32(env.xcc, SPARCCPU),
        VMSTATE_UINT32(env.asi, SPARCCPU),
        VMSTATE_UINT32(env.pstate, SPARCCPU),
        VMSTATE_UINT32(env.tl, SPARCCPU),
        VMSTATE_UINT32(env.cansave, SPARCCPU),
        VMSTATE_UINT32(env.canrestore, SPARCCPU),
        VMSTATE_UINT32(env.otherwin, SPARCCPU),
        VMSTATE_UINT32(env.wstate, SPARCCPU),
        VMSTATE_UINT32(env.cleanwin, SPARCCPU),
        VMSTATE_UINT64_ARRAY(env.agregs, SPARCCPU, 8),
        VMSTATE_UINT64_ARRAY(env.bgregs, SPARCCPU, 8),
        VMSTATE_UINT64_ARRAY(env.igregs, SPARCCPU, 8),
        VMSTATE_UINT64_ARRAY(env.mgregs, SPARCCPU, 8),
        VMSTATE_UINT64(env.fprs, SPARCCPU),
        VMSTATE_UINT64(env.tick_cmpr, SPARCCPU),
        VMSTATE_UINT64(env.stick_cmpr, SPARCCPU),
        VMSTATE_CPU_TIMER(env.tick, SPARCCPU),
        VMSTATE_CPU_TIMER(env.stick, SPARCCPU),
        VMSTATE_UINT64(env.gsr, SPARCCPU),
        VMSTATE_UINT32(env.gl, SPARCCPU),
        VMSTATE_UINT64(env.hpstate, SPARCCPU),
        VMSTATE_UINT64_ARRAY(env.htstate, SPARCCPU, MAXTL_MAX),
        VMSTATE_UINT64(env.hintp, SPARCCPU),
        VMSTATE_UINT64(env.htba, SPARCCPU),
        VMSTATE_UINT64(env.hver, SPARCCPU),
        VMSTATE_UINT64(env.hstick_cmpr, SPARCCPU),
        VMSTATE_UINT64(env.ssr, SPARCCPU),
        VMSTATE_CPU_TIMER(env.hstick, SPARCCPU),
#endif
        VMSTATE_END_OF_LIST()
    },
};