VirtualBox

source: vbox/trunk/src/recompiler/cpu-all.h@ 36140

Last change on this file since 36140 was 36140, checked in by vboxsync, 14 years ago

rem: Re-synced to svn://svn.savannah.nongnu.org/qemu/trunk@5495 (repo UUID c046a42c-6fe2-441c-8c8c-71466251a162).

  • Property svn:eol-style set to native
File size: 34.3 KB
Line 
1/*
2 * defines common to all virtual CPUs
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#ifndef CPU_ALL_H
31#define CPU_ALL_H
32
33#ifdef VBOX
34# ifndef LOG_GROUP
35# define LOG_GROUP LOG_GROUP_REM
36# endif
37# include <VBox/log.h>
38# include <VBox/vmm/pgm.h> /* PGM_DYNAMIC_RAM_ALLOC */
39#endif
40
41#if defined(__arm__) || defined(__sparc__) || defined(__mips__) || defined(__hppa__)
42#define WORDS_ALIGNED
43#endif
44
45/* some important defines:
46 *
47 * WORDS_ALIGNED : if defined, the host cpu can only make word aligned
48 * memory accesses.
49 *
50 * WORDS_BIGENDIAN : if defined, the host cpu is big endian and
51 * otherwise little endian.
52 *
53 * (TARGET_WORDS_ALIGNED : same for target cpu (not supported yet))
54 *
55 * TARGET_WORDS_BIGENDIAN : same for target cpu
56 */
57
58#include "bswap.h"
59#include "softfloat.h"
60
61#if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
62#define BSWAP_NEEDED
63#endif
64
65#ifdef BSWAP_NEEDED
66
67static inline uint16_t tswap16(uint16_t s)
68{
69 return bswap16(s);
70}
71
72static inline uint32_t tswap32(uint32_t s)
73{
74 return bswap32(s);
75}
76
77static inline uint64_t tswap64(uint64_t s)
78{
79 return bswap64(s);
80}
81
82static inline void tswap16s(uint16_t *s)
83{
84 *s = bswap16(*s);
85}
86
87static inline void tswap32s(uint32_t *s)
88{
89 *s = bswap32(*s);
90}
91
92static inline void tswap64s(uint64_t *s)
93{
94 *s = bswap64(*s);
95}
96
97#else
98
99static inline uint16_t tswap16(uint16_t s)
100{
101 return s;
102}
103
104static inline uint32_t tswap32(uint32_t s)
105{
106 return s;
107}
108
109static inline uint64_t tswap64(uint64_t s)
110{
111 return s;
112}
113
114static inline void tswap16s(uint16_t *s)
115{
116}
117
118static inline void tswap32s(uint32_t *s)
119{
120}
121
122static inline void tswap64s(uint64_t *s)
123{
124}
125
126#endif
127
128#if TARGET_LONG_SIZE == 4
129#define tswapl(s) tswap32(s)
130#define tswapls(s) tswap32s((uint32_t *)(s))
131#define bswaptls(s) bswap32s(s)
132#else
133#define tswapl(s) tswap64(s)
134#define tswapls(s) tswap64s((uint64_t *)(s))
135#define bswaptls(s) bswap64s(s)
136#endif
137
138typedef union {
139 float32 f;
140 uint32_t l;
141} CPU_FloatU;
142
143/* NOTE: arm FPA is horrible as double 32 bit words are stored in big
144 endian ! */
145typedef union {
146 float64 d;
147#if defined(WORDS_BIGENDIAN) \
148 || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
149 struct {
150 uint32_t upper;
151 uint32_t lower;
152 } l;
153#else
154 struct {
155 uint32_t lower;
156 uint32_t upper;
157 } l;
158#endif
159 uint64_t ll;
160} CPU_DoubleU;
161
162#ifdef TARGET_SPARC
163typedef union {
164 float128 q;
165#if defined(WORDS_BIGENDIAN) \
166 || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
167 struct {
168 uint32_t upmost;
169 uint32_t upper;
170 uint32_t lower;
171 uint32_t lowest;
172 } l;
173 struct {
174 uint64_t upper;
175 uint64_t lower;
176 } ll;
177#else
178 struct {
179 uint32_t lowest;
180 uint32_t lower;
181 uint32_t upper;
182 uint32_t upmost;
183 } l;
184 struct {
185 uint64_t lower;
186 uint64_t upper;
187 } ll;
188#endif
189} CPU_QuadU;
190#endif
191
192/* CPU memory access without any memory or io remapping */
193
194/*
195 * the generic syntax for the memory accesses is:
196 *
197 * load: ld{type}{sign}{size}{endian}_{access_type}(ptr)
198 *
199 * store: st{type}{size}{endian}_{access_type}(ptr, val)
200 *
201 * type is:
202 * (empty): integer access
203 * f : float access
204 *
205 * sign is:
206 * (empty): for floats or 32 bit size
207 * u : unsigned
208 * s : signed
209 *
210 * size is:
211 * b: 8 bits
212 * w: 16 bits
213 * l: 32 bits
214 * q: 64 bits
215 *
216 * endian is:
217 * (empty): target cpu endianness or 8 bit access
218 * r : reversed target cpu endianness (not implemented yet)
219 * be : big endian (not implemented yet)
220 * le : little endian (not implemented yet)
221 *
222 * access_type is:
223 * raw : host memory access
224 * user : user mode access using soft MMU
225 * kernel : kernel mode access using soft MMU
226 */
227
228#ifdef VBOX
229void remAbort(int rc, const char *pszTip) __attribute__((__noreturn__));
230
231void remR3PhysRead(RTGCPHYS SrcGCPhys, void *pvDst, unsigned cb);
232RTCCUINTREG remR3PhysReadU8(RTGCPHYS SrcGCPhys);
233RTCCINTREG remR3PhysReadS8(RTGCPHYS SrcGCPhys);
234RTCCUINTREG remR3PhysReadU16(RTGCPHYS SrcGCPhys);
235RTCCINTREG remR3PhysReadS16(RTGCPHYS SrcGCPhys);
236RTCCUINTREG remR3PhysReadU32(RTGCPHYS SrcGCPhys);
237RTCCINTREG remR3PhysReadS32(RTGCPHYS SrcGCPhys);
238uint64_t remR3PhysReadU64(RTGCPHYS SrcGCPhys);
239int64_t remR3PhysReadS64(RTGCPHYS SrcGCPhys);
240void remR3PhysWrite(RTGCPHYS DstGCPhys, const void *pvSrc, unsigned cb);
241void remR3PhysWriteU8(RTGCPHYS DstGCPhys, uint8_t val);
242void remR3PhysWriteU16(RTGCPHYS DstGCPhys, uint16_t val);
243void remR3PhysWriteU32(RTGCPHYS DstGCPhys, uint32_t val);
244void remR3PhysWriteU64(RTGCPHYS DstGCPhys, uint64_t val);
245
246#ifndef REM_PHYS_ADDR_IN_TLB
247void *remR3TlbGCPhys2Ptr(CPUState *env1, target_ulong physAddr, int fWritable);
248#endif
249
250#endif /* VBOX */
251
252#if defined(VBOX) && defined(REM_PHYS_ADDR_IN_TLB)
253
254DECLINLINE(uint8_t) ldub_p(void *ptr)
255{
256 VBOX_CHECK_ADDR(ptr);
257 return remR3PhysReadU8((uintptr_t)ptr);
258}
259
260DECLINLINE(int8_t) ldsb_p(void *ptr)
261{
262 VBOX_CHECK_ADDR(ptr);
263 return remR3PhysReadS8((uintptr_t)ptr);
264}
265
266DECLINLINE(void) stb_p(void *ptr, int v)
267{
268 VBOX_CHECK_ADDR(ptr);
269 remR3PhysWriteU8((uintptr_t)ptr, v);
270}
271
272DECLINLINE(uint32_t) lduw_le_p(void *ptr)
273{
274 VBOX_CHECK_ADDR(ptr);
275 return remR3PhysReadU16((uintptr_t)ptr);
276}
277
278DECLINLINE(int32_t) ldsw_le_p(void *ptr)
279{
280 VBOX_CHECK_ADDR(ptr);
281 return remR3PhysReadS16((uintptr_t)ptr);
282}
283
284DECLINLINE(void) stw_le_p(void *ptr, int v)
285{
286 VBOX_CHECK_ADDR(ptr);
287 remR3PhysWriteU16((uintptr_t)ptr, v);
288}
289
290DECLINLINE(uint32_t) ldl_le_p(void *ptr)
291{
292 VBOX_CHECK_ADDR(ptr);
293 return remR3PhysReadU32((uintptr_t)ptr);
294}
295
296DECLINLINE(void) stl_le_p(void *ptr, int v)
297{
298 VBOX_CHECK_ADDR(ptr);
299 remR3PhysWriteU32((uintptr_t)ptr, v);
300}
301
302DECLINLINE(void) stq_le_p(void *ptr, uint64_t v)
303{
304 VBOX_CHECK_ADDR(ptr);
305 remR3PhysWriteU64((uintptr_t)ptr, v);
306}
307
308DECLINLINE(uint64_t) ldq_le_p(void *ptr)
309{
310 VBOX_CHECK_ADDR(ptr);
311 return remR3PhysReadU64((uintptr_t)ptr);
312}
313
314#undef VBOX_CHECK_ADDR
315
316/* float access */
317
318DECLINLINE(float32) ldfl_le_p(void *ptr)
319{
320 union {
321 float32 f;
322 uint32_t i;
323 } u;
324 u.i = ldl_le_p(ptr);
325 return u.f;
326}
327
328DECLINLINE(void) stfl_le_p(void *ptr, float32 v)
329{
330 union {
331 float32 f;
332 uint32_t i;
333 } u;
334 u.f = v;
335 stl_le_p(ptr, u.i);
336}
337
338DECLINLINE(float64) ldfq_le_p(void *ptr)
339{
340 CPU_DoubleU u;
341 u.l.lower = ldl_le_p(ptr);
342 u.l.upper = ldl_le_p((uint8_t*)ptr + 4);
343 return u.d;
344}
345
346DECLINLINE(void) stfq_le_p(void *ptr, float64 v)
347{
348 CPU_DoubleU u;
349 u.d = v;
350 stl_le_p(ptr, u.l.lower);
351 stl_le_p((uint8_t*)ptr + 4, u.l.upper);
352}
353
354#else /* !VBOX */
355
356static inline int ldub_p(void *ptr)
357{
358 return *(uint8_t *)ptr;
359}
360
361static inline int ldsb_p(void *ptr)
362{
363 return *(int8_t *)ptr;
364}
365
366static inline void stb_p(void *ptr, int v)
367{
368 *(uint8_t *)ptr = v;
369}
370
371/* NOTE: on arm, putting 2 in /proc/sys/debug/alignment so that the
372 kernel handles unaligned load/stores may give better results, but
373 it is a system wide setting : bad */
374#if defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
375
376/* conservative code for little endian unaligned accesses */
377static inline int lduw_le_p(void *ptr)
378{
379#ifdef __powerpc__
380 int val;
381 __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
382 return val;
383#else
384 uint8_t *p = ptr;
385 return p[0] | (p[1] << 8);
386#endif
387}
388
389static inline int ldsw_le_p(void *ptr)
390{
391#ifdef __powerpc__
392 int val;
393 __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
394 return (int16_t)val;
395#else
396 uint8_t *p = ptr;
397 return (int16_t)(p[0] | (p[1] << 8));
398#endif
399}
400
401static inline int ldl_le_p(void *ptr)
402{
403#ifdef __powerpc__
404 int val;
405 __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (ptr));
406 return val;
407#else
408 uint8_t *p = ptr;
409 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
410#endif
411}
412
413static inline uint64_t ldq_le_p(void *ptr)
414{
415 uint8_t *p = ptr;
416 uint32_t v1, v2;
417 v1 = ldl_le_p(p);
418 v2 = ldl_le_p(p + 4);
419 return v1 | ((uint64_t)v2 << 32);
420}
421
422static inline void stw_le_p(void *ptr, int v)
423{
424#ifdef __powerpc__
425 __asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*(uint16_t *)ptr) : "r" (v), "r" (ptr));
426#else
427 uint8_t *p = ptr;
428 p[0] = v;
429 p[1] = v >> 8;
430#endif
431}
432
433static inline void stl_le_p(void *ptr, int v)
434{
435#ifdef __powerpc__
436 __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
437#else
438 uint8_t *p = ptr;
439 p[0] = v;
440 p[1] = v >> 8;
441 p[2] = v >> 16;
442 p[3] = v >> 24;
443#endif
444}
445
446static inline void stq_le_p(void *ptr, uint64_t v)
447{
448 uint8_t *p = ptr;
449 stl_le_p(p, (uint32_t)v);
450 stl_le_p(p + 4, v >> 32);
451}
452
453/* float access */
454
455static inline float32 ldfl_le_p(void *ptr)
456{
457 union {
458 float32 f;
459 uint32_t i;
460 } u;
461 u.i = ldl_le_p(ptr);
462 return u.f;
463}
464
465static inline void stfl_le_p(void *ptr, float32 v)
466{
467 union {
468 float32 f;
469 uint32_t i;
470 } u;
471 u.f = v;
472 stl_le_p(ptr, u.i);
473}
474
475static inline float64 ldfq_le_p(void *ptr)
476{
477 CPU_DoubleU u;
478 u.l.lower = ldl_le_p(ptr);
479 u.l.upper = ldl_le_p(ptr + 4);
480 return u.d;
481}
482
483static inline void stfq_le_p(void *ptr, float64 v)
484{
485 CPU_DoubleU u;
486 u.d = v;
487 stl_le_p(ptr, u.l.lower);
488 stl_le_p(ptr + 4, u.l.upper);
489}
490
491#else
492
493static inline int lduw_le_p(void *ptr)
494{
495 return *(uint16_t *)ptr;
496}
497
498static inline int ldsw_le_p(void *ptr)
499{
500 return *(int16_t *)ptr;
501}
502
503static inline int ldl_le_p(void *ptr)
504{
505 return *(uint32_t *)ptr;
506}
507
508static inline uint64_t ldq_le_p(void *ptr)
509{
510 return *(uint64_t *)ptr;
511}
512
513static inline void stw_le_p(void *ptr, int v)
514{
515 *(uint16_t *)ptr = v;
516}
517
518static inline void stl_le_p(void *ptr, int v)
519{
520 *(uint32_t *)ptr = v;
521}
522
523static inline void stq_le_p(void *ptr, uint64_t v)
524{
525 *(uint64_t *)ptr = v;
526}
527
528/* float access */
529
530static inline float32 ldfl_le_p(void *ptr)
531{
532 return *(float32 *)ptr;
533}
534
535static inline float64 ldfq_le_p(void *ptr)
536{
537 return *(float64 *)ptr;
538}
539
540static inline void stfl_le_p(void *ptr, float32 v)
541{
542 *(float32 *)ptr = v;
543}
544
545static inline void stfq_le_p(void *ptr, float64 v)
546{
547 *(float64 *)ptr = v;
548}
549#endif
550#endif /* !VBOX */
551
552#if !defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
553
554static inline int lduw_be_p(void *ptr)
555{
556#if defined(__i386__)
557 int val;
558 asm volatile ("movzwl %1, %0\n"
559 "xchgb %b0, %h0\n"
560 : "=q" (val)
561 : "m" (*(uint16_t *)ptr));
562 return val;
563#else
564 uint8_t *b = (uint8_t *) ptr;
565 return ((b[0] << 8) | b[1]);
566#endif
567}
568
569static inline int ldsw_be_p(void *ptr)
570{
571#if defined(__i386__)
572 int val;
573 asm volatile ("movzwl %1, %0\n"
574 "xchgb %b0, %h0\n"
575 : "=q" (val)
576 : "m" (*(uint16_t *)ptr));
577 return (int16_t)val;
578#else
579 uint8_t *b = (uint8_t *) ptr;
580 return (int16_t)((b[0] << 8) | b[1]);
581#endif
582}
583
584static inline int ldl_be_p(void *ptr)
585{
586#if defined(__i386__) || defined(__x86_64__)
587 int val;
588 asm volatile ("movl %1, %0\n"
589 "bswap %0\n"
590 : "=r" (val)
591 : "m" (*(uint32_t *)ptr));
592 return val;
593#else
594 uint8_t *b = (uint8_t *) ptr;
595 return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3];
596#endif
597}
598
599static inline uint64_t ldq_be_p(void *ptr)
600{
601 uint32_t a,b;
602 a = ldl_be_p(ptr);
603 b = ldl_be_p((uint8_t *)ptr + 4);
604 return (((uint64_t)a<<32)|b);
605}
606
607static inline void stw_be_p(void *ptr, int v)
608{
609#if defined(__i386__)
610 asm volatile ("xchgb %b0, %h0\n"
611 "movw %w0, %1\n"
612 : "=q" (v)
613 : "m" (*(uint16_t *)ptr), "0" (v));
614#else
615 uint8_t *d = (uint8_t *) ptr;
616 d[0] = v >> 8;
617 d[1] = v;
618#endif
619}
620
621static inline void stl_be_p(void *ptr, int v)
622{
623#if defined(__i386__) || defined(__x86_64__)
624 asm volatile ("bswap %0\n"
625 "movl %0, %1\n"
626 : "=r" (v)
627 : "m" (*(uint32_t *)ptr), "0" (v));
628#else
629 uint8_t *d = (uint8_t *) ptr;
630 d[0] = v >> 24;
631 d[1] = v >> 16;
632 d[2] = v >> 8;
633 d[3] = v;
634#endif
635}
636
637static inline void stq_be_p(void *ptr, uint64_t v)
638{
639 stl_be_p(ptr, v >> 32);
640 stl_be_p((uint8_t *)ptr + 4, v);
641}
642
643/* float access */
644
645static inline float32 ldfl_be_p(void *ptr)
646{
647 union {
648 float32 f;
649 uint32_t i;
650 } u;
651 u.i = ldl_be_p(ptr);
652 return u.f;
653}
654
655static inline void stfl_be_p(void *ptr, float32 v)
656{
657 union {
658 float32 f;
659 uint32_t i;
660 } u;
661 u.f = v;
662 stl_be_p(ptr, u.i);
663}
664
665static inline float64 ldfq_be_p(void *ptr)
666{
667 CPU_DoubleU u;
668 u.l.upper = ldl_be_p(ptr);
669 u.l.lower = ldl_be_p((uint8_t *)ptr + 4);
670 return u.d;
671}
672
673static inline void stfq_be_p(void *ptr, float64 v)
674{
675 CPU_DoubleU u;
676 u.d = v;
677 stl_be_p(ptr, u.l.upper);
678 stl_be_p((uint8_t *)ptr + 4, u.l.lower);
679}
680
681#else
682
683static inline int lduw_be_p(void *ptr)
684{
685 return *(uint16_t *)ptr;
686}
687
688static inline int ldsw_be_p(void *ptr)
689{
690 return *(int16_t *)ptr;
691}
692
693static inline int ldl_be_p(void *ptr)
694{
695 return *(uint32_t *)ptr;
696}
697
698static inline uint64_t ldq_be_p(void *ptr)
699{
700 return *(uint64_t *)ptr;
701}
702
703static inline void stw_be_p(void *ptr, int v)
704{
705 *(uint16_t *)ptr = v;
706}
707
708static inline void stl_be_p(void *ptr, int v)
709{
710 *(uint32_t *)ptr = v;
711}
712
713static inline void stq_be_p(void *ptr, uint64_t v)
714{
715 *(uint64_t *)ptr = v;
716}
717
718/* float access */
719
720static inline float32 ldfl_be_p(void *ptr)
721{
722 return *(float32 *)ptr;
723}
724
725static inline float64 ldfq_be_p(void *ptr)
726{
727 return *(float64 *)ptr;
728}
729
730static inline void stfl_be_p(void *ptr, float32 v)
731{
732 *(float32 *)ptr = v;
733}
734
735static inline void stfq_be_p(void *ptr, float64 v)
736{
737 *(float64 *)ptr = v;
738}
739
740#endif
741
742/* target CPU memory access functions */
743#if defined(TARGET_WORDS_BIGENDIAN)
744#define lduw_p(p) lduw_be_p(p)
745#define ldsw_p(p) ldsw_be_p(p)
746#define ldl_p(p) ldl_be_p(p)
747#define ldq_p(p) ldq_be_p(p)
748#define ldfl_p(p) ldfl_be_p(p)
749#define ldfq_p(p) ldfq_be_p(p)
750#define stw_p(p, v) stw_be_p(p, v)
751#define stl_p(p, v) stl_be_p(p, v)
752#define stq_p(p, v) stq_be_p(p, v)
753#define stfl_p(p, v) stfl_be_p(p, v)
754#define stfq_p(p, v) stfq_be_p(p, v)
755#else
756#define lduw_p(p) lduw_le_p(p)
757#define ldsw_p(p) ldsw_le_p(p)
758#define ldl_p(p) ldl_le_p(p)
759#define ldq_p(p) ldq_le_p(p)
760#define ldfl_p(p) ldfl_le_p(p)
761#define ldfq_p(p) ldfq_le_p(p)
762#define stw_p(p, v) stw_le_p(p, v)
763#define stl_p(p, v) stl_le_p(p, v)
764#define stq_p(p, v) stq_le_p(p, v)
765#define stfl_p(p, v) stfl_le_p(p, v)
766#define stfq_p(p, v) stfq_le_p(p, v)
767#endif
768
769/* MMU memory access macros */
770
771#if defined(CONFIG_USER_ONLY)
772/* On some host systems the guest address space is reserved on the host.
773 * This allows the guest address space to be offset to a convenient location.
774 */
775//#define GUEST_BASE 0x20000000
776#define GUEST_BASE 0
777
778/* All direct uses of g2h and h2g need to go away for usermode softmmu. */
779#define g2h(x) ((void *)((unsigned long)(x) + GUEST_BASE))
780#define h2g(x) ((target_ulong)((unsigned long)(x) - GUEST_BASE))
781
782#define saddr(x) g2h(x)
783#define laddr(x) g2h(x)
784
785#else /* !CONFIG_USER_ONLY */
786/* NOTE: we use double casts if pointers and target_ulong have
787 different sizes */
788#define saddr(x) (uint8_t *)(long)(x)
789#define laddr(x) (uint8_t *)(long)(x)
790#endif
791
792#define ldub_raw(p) ldub_p(laddr((p)))
793#define ldsb_raw(p) ldsb_p(laddr((p)))
794#define lduw_raw(p) lduw_p(laddr((p)))
795#define ldsw_raw(p) ldsw_p(laddr((p)))
796#define ldl_raw(p) ldl_p(laddr((p)))
797#define ldq_raw(p) ldq_p(laddr((p)))
798#define ldfl_raw(p) ldfl_p(laddr((p)))
799#define ldfq_raw(p) ldfq_p(laddr((p)))
800#define stb_raw(p, v) stb_p(saddr((p)), v)
801#define stw_raw(p, v) stw_p(saddr((p)), v)
802#define stl_raw(p, v) stl_p(saddr((p)), v)
803#define stq_raw(p, v) stq_p(saddr((p)), v)
804#define stfl_raw(p, v) stfl_p(saddr((p)), v)
805#define stfq_raw(p, v) stfq_p(saddr((p)), v)
806
807
808#if defined(CONFIG_USER_ONLY)
809
810/* if user mode, no other memory access functions */
811#define ldub(p) ldub_raw(p)
812#define ldsb(p) ldsb_raw(p)
813#define lduw(p) lduw_raw(p)
814#define ldsw(p) ldsw_raw(p)
815#define ldl(p) ldl_raw(p)
816#define ldq(p) ldq_raw(p)
817#define ldfl(p) ldfl_raw(p)
818#define ldfq(p) ldfq_raw(p)
819#define stb(p, v) stb_raw(p, v)
820#define stw(p, v) stw_raw(p, v)
821#define stl(p, v) stl_raw(p, v)
822#define stq(p, v) stq_raw(p, v)
823#define stfl(p, v) stfl_raw(p, v)
824#define stfq(p, v) stfq_raw(p, v)
825
826#define ldub_code(p) ldub_raw(p)
827#define ldsb_code(p) ldsb_raw(p)
828#define lduw_code(p) lduw_raw(p)
829#define ldsw_code(p) ldsw_raw(p)
830#define ldl_code(p) ldl_raw(p)
831#define ldq_code(p) ldq_raw(p)
832
833#define ldub_kernel(p) ldub_raw(p)
834#define ldsb_kernel(p) ldsb_raw(p)
835#define lduw_kernel(p) lduw_raw(p)
836#define ldsw_kernel(p) ldsw_raw(p)
837#define ldl_kernel(p) ldl_raw(p)
838#define ldq_kernel(p) ldq_raw(p)
839#define ldfl_kernel(p) ldfl_raw(p)
840#define ldfq_kernel(p) ldfq_raw(p)
841#define stb_kernel(p, v) stb_raw(p, v)
842#define stw_kernel(p, v) stw_raw(p, v)
843#define stl_kernel(p, v) stl_raw(p, v)
844#define stq_kernel(p, v) stq_raw(p, v)
845#define stfl_kernel(p, v) stfl_raw(p, v)
846#define stfq_kernel(p, vt) stfq_raw(p, v)
847
848#endif /* defined(CONFIG_USER_ONLY) */
849
850/* page related stuff */
851
852#define TARGET_PAGE_SIZE (1 << TARGET_PAGE_BITS)
853#define TARGET_PAGE_MASK ~(TARGET_PAGE_SIZE - 1)
854#define TARGET_PAGE_ALIGN(addr) (((addr) + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK)
855
856/* ??? These should be the larger of unsigned long and target_ulong. */
857extern unsigned long qemu_real_host_page_size;
858extern unsigned long qemu_host_page_bits;
859extern unsigned long qemu_host_page_size;
860extern unsigned long qemu_host_page_mask;
861
862#define HOST_PAGE_ALIGN(addr) (((addr) + qemu_host_page_size - 1) & qemu_host_page_mask)
863
864/* same as PROT_xxx */
865#define PAGE_READ 0x0001
866#define PAGE_WRITE 0x0002
867#define PAGE_EXEC 0x0004
868#define PAGE_BITS (PAGE_READ | PAGE_WRITE | PAGE_EXEC)
869#define PAGE_VALID 0x0008
870/* original state of the write flag (used when tracking self-modifying
871 code */
872#define PAGE_WRITE_ORG 0x0010
873#define PAGE_RESERVED 0x0020
874
875void page_dump(FILE *f);
876int page_get_flags(target_ulong address);
877void page_set_flags(target_ulong start, target_ulong end, int flags);
878int page_check_range(target_ulong start, target_ulong len, int flags);
879void page_unprotect_range(target_ulong data, target_ulong data_size);
880
881#if 0 /* bird: Not there in the code I'm looking at. */
882#define SINGLE_CPU_DEFINES
883#ifdef SINGLE_CPU_DEFINES
884
885#if defined(TARGET_I386)
886
887#define CPUState CPUX86State
888#define cpu_init cpu_x86_init
889#define cpu_exec cpu_x86_exec
890#define cpu_gen_code cpu_x86_gen_code
891#define cpu_signal_handler cpu_x86_signal_handler
892
893#elif defined(TARGET_ARM)
894
895#define CPUState CPUARMState
896#define cpu_init cpu_arm_init
897#define cpu_exec cpu_arm_exec
898#define cpu_gen_code cpu_arm_gen_code
899#define cpu_signal_handler cpu_arm_signal_handler
900
901#elif defined(TARGET_SPARC)
902
903#define CPUState CPUSPARCState
904#define cpu_init cpu_sparc_init
905#define cpu_exec cpu_sparc_exec
906#define cpu_gen_code cpu_sparc_gen_code
907#define cpu_signal_handler cpu_sparc_signal_handler
908
909#elif defined(TARGET_PPC)
910
911#define CPUState CPUPPCState
912#define cpu_init cpu_ppc_init
913#define cpu_exec cpu_ppc_exec
914#define cpu_gen_code cpu_ppc_gen_code
915#define cpu_signal_handler cpu_ppc_signal_handler
916
917#elif defined(TARGET_M68K)
918#define CPUState CPUM68KState
919#define cpu_init cpu_m68k_init
920#define cpu_exec cpu_m68k_exec
921#define cpu_gen_code cpu_m68k_gen_code
922#define cpu_signal_handler cpu_m68k_signal_handler
923
924#elif defined(TARGET_MIPS)
925#define CPUState CPUMIPSState
926#define cpu_init cpu_mips_init
927#define cpu_exec cpu_mips_exec
928#define cpu_gen_code cpu_mips_gen_code
929#define cpu_signal_handler cpu_mips_signal_handler
930
931#elif defined(TARGET_SH4)
932#define CPUState CPUSH4State
933#define cpu_init cpu_sh4_init
934#define cpu_exec cpu_sh4_exec
935#define cpu_gen_code cpu_sh4_gen_code
936#define cpu_signal_handler cpu_sh4_signal_handler
937
938#else
939
940#error unsupported target CPU
941
942#endif
943
944#endif /* SINGLE_CPU_DEFINES */
945#endif /* bird: removed? */
946
947void cpu_dump_state(CPUState *env, FILE *f,
948 int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
949 int flags);
950void cpu_dump_statistics (CPUState *env, FILE *f,
951 int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
952 int flags);
953
954void cpu_abort(CPUState *env, const char *fmt, ...)
955 __attribute__ ((__format__ (__printf__, 2, 3)))
956 __attribute__ ((__noreturn__));
957extern CPUState *first_cpu;
958extern CPUState *cpu_single_env;
959extern int64_t qemu_icount;
960extern int use_icount;
961
962#define CPU_INTERRUPT_EXIT 0x01 /* wants exit from main loop */
963#define CPU_INTERRUPT_HARD 0x02 /* hardware interrupt pending */
964#define CPU_INTERRUPT_EXITTB 0x04 /* exit the current TB (use for x86 a20 case) */
965#define CPU_INTERRUPT_TIMER 0x08 /* internal timer exception pending */
966#define CPU_INTERRUPT_FIQ 0x10 /* Fast interrupt pending. */
967#define CPU_INTERRUPT_HALT 0x20 /* CPU halt wanted */
968#define CPU_INTERRUPT_SMI 0x40 /* (x86 only) SMI interrupt pending */
969#define CPU_INTERRUPT_DEBUG 0x80 /* Debug event occured. */
970#define CPU_INTERRUPT_VIRQ 0x100 /* virtual interrupt pending. */
971#define CPU_INTERRUPT_NMI 0x200 /* NMI pending. */
972
973#ifdef VBOX
974/** Executes a single instruction. cpu_exec() will normally return EXCP_SINGLE_INSTR. */
975# define CPU_INTERRUPT_SINGLE_INSTR 0x0400
976/** Executing a CPU_INTERRUPT_SINGLE_INSTR request, quit the cpu_loop. (for exceptions and suchlike) */
977# define CPU_INTERRUPT_SINGLE_INSTR_IN_FLIGHT 0x0800
978/** VM execution was interrupted by VMR3Reset, VMR3Suspend or VMR3PowerOff. */
979# define CPU_INTERRUPT_RC 0x1000
980/** Exit current TB to process an external interrupt request (also in op.c!!) */
981# define CPU_INTERRUPT_EXTERNAL_EXIT 0x2000
982/** Exit current TB to process an external interrupt request (also in op.c!!) */
983# define CPU_INTERRUPT_EXTERNAL_HARD 0x4000
984/** Exit current TB to process an external interrupt request (also in op.c!!) */
985# define CPU_INTERRUPT_EXTERNAL_TIMER 0x8000
986/** Exit current TB to process an external interrupt request (also in op.c!!) */
987# define CPU_INTERRUPT_EXTERNAL_DMA 0x10000
988#endif /* VBOX */
989void cpu_interrupt(CPUState *s, int mask);
990void cpu_reset_interrupt(CPUState *env, int mask);
991
992int cpu_watchpoint_insert(CPUState *env, target_ulong addr, int type);
993int cpu_watchpoint_remove(CPUState *env, target_ulong addr);
994void cpu_watchpoint_remove_all(CPUState *env);
995int cpu_breakpoint_insert(CPUState *env, target_ulong pc);
996int cpu_breakpoint_remove(CPUState *env, target_ulong pc);
997void cpu_breakpoint_remove_all(CPUState *env);
998
999#define SSTEP_ENABLE 0x1 /* Enable simulated HW single stepping */
1000#define SSTEP_NOIRQ 0x2 /* Do not use IRQ while single stepping */
1001#define SSTEP_NOTIMER 0x4 /* Do not Timers while single stepping */
1002
1003void cpu_single_step(CPUState *env, int enabled);
1004void cpu_reset(CPUState *s);
1005
1006/* Return the physical page corresponding to a virtual one. Use it
1007 only for debugging because no protection checks are done. Return -1
1008 if no page found. */
1009target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr);
1010
1011#define CPU_LOG_TB_OUT_ASM (1 << 0)
1012#define CPU_LOG_TB_IN_ASM (1 << 1)
1013#define CPU_LOG_TB_OP (1 << 2)
1014#define CPU_LOG_TB_OP_OPT (1 << 3)
1015#define CPU_LOG_INT (1 << 4)
1016#define CPU_LOG_EXEC (1 << 5)
1017#define CPU_LOG_PCALL (1 << 6)
1018#define CPU_LOG_IOPORT (1 << 7)
1019#define CPU_LOG_TB_CPU (1 << 8)
1020
1021/* define log items */
1022typedef struct CPULogItem {
1023 int mask;
1024 const char *name;
1025 const char *help;
1026} CPULogItem;
1027
1028extern const CPULogItem cpu_log_items[];
1029
1030void cpu_set_log(int log_flags);
1031void cpu_set_log_filename(const char *filename);
1032int cpu_str_to_log_mask(const char *str);
1033
1034/* IO ports API */
1035
1036/* NOTE: as these functions may be even used when there is an isa
1037 brige on non x86 targets, we always defined them */
1038#ifndef NO_CPU_IO_DEFS
1039void cpu_outb(CPUState *env, int addr, int val);
1040void cpu_outw(CPUState *env, int addr, int val);
1041void cpu_outl(CPUState *env, int addr, int val);
1042int cpu_inb(CPUState *env, int addr);
1043int cpu_inw(CPUState *env, int addr);
1044int cpu_inl(CPUState *env, int addr);
1045#endif
1046
1047/* address in the RAM (different from a physical address) */
1048#ifdef USE_KQEMU
1049typedef uint32_t ram_addr_t;
1050#else
1051typedef unsigned long ram_addr_t;
1052#endif
1053
1054/* memory API */
1055
1056#ifndef VBOX
1057extern ram_addr_t phys_ram_size;
1058extern int phys_ram_fd;
1059extern uint8_t *phys_ram_base;
1060extern uint8_t *phys_ram_dirty;
1061extern ram_addr_t ram_size;
1062#else /* VBOX */
1063extern RTGCPHYS phys_ram_size;
1064/** This is required for bounds checking the phys_ram_dirty accesses. */
1065extern RTGCPHYS phys_ram_dirty_size;
1066extern uint8_t *phys_ram_dirty;
1067#endif /* VBOX */
1068
1069/* physical memory access */
1070
1071/* MMIO pages are identified by a combination of an IO device index and
1072 3 flags. The ROMD code stores the page ram offset in iotlb entry,
1073 so only a limited number of ids are avaiable. */
1074
1075#define IO_MEM_SHIFT 3
1076#define IO_MEM_NB_ENTRIES (1 << (TARGET_PAGE_BITS - IO_MEM_SHIFT))
1077
1078#define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */
1079#define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */
1080#define IO_MEM_UNASSIGNED (2 << IO_MEM_SHIFT)
1081#define IO_MEM_NOTDIRTY (3 << IO_MEM_SHIFT)
1082
1083/* Acts like a ROM when read and like a device when written. */
1084#define IO_MEM_ROMD (1)
1085#define IO_MEM_SUBPAGE (2)
1086#define IO_MEM_SUBWIDTH (4)
1087
1088/* Flags stored in the low bits of the TLB virtual address. These are
1089 defined so that fast path ram access is all zeros. */
1090/* Zero if TLB entry is valid. */
1091#define TLB_INVALID_MASK (1 << 3)
1092/* Set if TLB entry references a clean RAM page. The iotlb entry will
1093 contain the page physical address. */
1094#define TLB_NOTDIRTY (1 << 4)
1095/* Set if TLB entry is an IO callback. */
1096#define TLB_MMIO (1 << 5)
1097
1098typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value);
1099typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr);
1100
1101void cpu_register_physical_memory(target_phys_addr_t start_addr,
1102 ram_addr_t size,
1103 ram_addr_t phys_offset);
1104ram_addr_t cpu_get_physical_page_desc(target_phys_addr_t addr);
1105ram_addr_t qemu_ram_alloc(ram_addr_t);
1106void qemu_ram_free(ram_addr_t addr);
1107int cpu_register_io_memory(int io_index,
1108 CPUReadMemoryFunc **mem_read,
1109 CPUWriteMemoryFunc **mem_write,
1110 void *opaque);
1111CPUWriteMemoryFunc **cpu_get_io_memory_write(int io_index);
1112CPUReadMemoryFunc **cpu_get_io_memory_read(int io_index);
1113
1114void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
1115 int len, int is_write);
1116static inline void cpu_physical_memory_read(target_phys_addr_t addr,
1117 uint8_t *buf, int len)
1118{
1119 cpu_physical_memory_rw(addr, buf, len, 0);
1120}
1121static inline void cpu_physical_memory_write(target_phys_addr_t addr,
1122 const uint8_t *buf, int len)
1123{
1124 cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1);
1125}
1126uint32_t ldub_phys(target_phys_addr_t addr);
1127uint32_t lduw_phys(target_phys_addr_t addr);
1128uint32_t ldl_phys(target_phys_addr_t addr);
1129uint64_t ldq_phys(target_phys_addr_t addr);
1130void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val);
1131void stq_phys_notdirty(target_phys_addr_t addr, uint64_t val);
1132void stb_phys(target_phys_addr_t addr, uint32_t val);
1133void stw_phys(target_phys_addr_t addr, uint32_t val);
1134void stl_phys(target_phys_addr_t addr, uint32_t val);
1135void stq_phys(target_phys_addr_t addr, uint64_t val);
1136
1137void cpu_physical_memory_write_rom(target_phys_addr_t addr,
1138 const uint8_t *buf, int len);
1139int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
1140 uint8_t *buf, int len, int is_write);
1141
1142#define VGA_DIRTY_FLAG 0x01
1143#define CODE_DIRTY_FLAG 0x02
1144#define KQEMU_DIRTY_FLAG 0x04
1145#define MIGRATION_DIRTY_FLAG 0x08
1146
1147/* read dirty bit (return 0 or 1) */
1148#ifndef VBOX
1149static inline int cpu_physical_memory_is_dirty(ram_addr_t addr)
1150{
1151 return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff;
1152}
1153#else
1154DECLINLINE(int) cpu_physical_memory_is_dirty(ram_addr_t addr)
1155{
1156 if (RT_UNLIKELY((addr >> TARGET_PAGE_BITS) >= phys_ram_dirty_size))
1157 {
1158 Log(("cpu_physical_memory_is_dirty: %RGp\n", (RTGCPHYS)addr));
1159 /*AssertMsgFailed(("cpu_physical_memory_is_dirty: %RGp\n", (RTGCPHYS)addr));*/
1160 return 0;
1161 }
1162 return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff;
1163}
1164#endif
1165
1166#ifndef VBOX
1167static inline int cpu_physical_memory_get_dirty(ram_addr_t addr,
1168 int dirty_flags)
1169{
1170 return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags;
1171}
1172#else
1173DECLINLINE(int) cpu_physical_memory_get_dirty(ram_addr_t addr,
1174 int dirty_flags)
1175{
1176 if (RT_UNLIKELY((addr >> TARGET_PAGE_BITS) >= phys_ram_dirty_size))
1177 {
1178 Log(("cpu_physical_memory_is_dirty: %RGp\n", (RTGCPHYS)addr));
1179 /*AssertMsgFailed(("cpu_physical_memory_is_dirty: %RGp\n", (RTGCPHYS)addr));*/
1180 return 0xff & dirty_flags; /** @todo I don't think this is the right thing to return, fix! */
1181 }
1182 return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags;
1183}
1184#endif
1185
1186#ifndef VBOX
1187static inline void cpu_physical_memory_set_dirty(ram_addr_t addr)
1188{
1189 phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff;
1190}
1191#else
1192DECLINLINE(void) cpu_physical_memory_set_dirty(ram_addr_t addr)
1193{
1194 if (RT_UNLIKELY((addr >> TARGET_PAGE_BITS) >= phys_ram_dirty_size))
1195 {
1196 Log(("cpu_physical_memory_is_dirty: %RGp\n", (RTGCPHYS)addr));
1197 /*AssertMsgFailed(("cpu_physical_memory_is_dirty: %RGp\n", (RTGCPHYS)addr));*/
1198 return;
1199 }
1200 phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff;
1201}
1202#endif
1203
1204void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
1205 int dirty_flags);
1206void cpu_tlb_update_dirty(CPUState *env);
1207
1208int cpu_physical_memory_set_dirty_tracking(int enable);
1209
1210int cpu_physical_memory_get_dirty_tracking(void);
1211
1212void dump_exec_info(FILE *f,
1213 int (*cpu_fprintf)(FILE *f, const char *fmt, ...));
1214
1215/*******************************************/
1216/* host CPU ticks (if available) */
1217
1218#if defined(__powerpc__)
1219
1220static inline uint32_t get_tbl(void)
1221{
1222 uint32_t tbl;
1223 asm volatile("mftb %0" : "=r" (tbl));
1224 return tbl;
1225}
1226
1227static inline uint32_t get_tbu(void)
1228{
1229 uint32_t tbl;
1230 asm volatile("mftbu %0" : "=r" (tbl));
1231 return tbl;
1232}
1233
1234static inline int64_t cpu_get_real_ticks(void)
1235{
1236 uint32_t l, h, h1;
1237 /* NOTE: we test if wrapping has occurred */
1238 do {
1239 h = get_tbu();
1240 l = get_tbl();
1241 h1 = get_tbu();
1242 } while (h != h1);
1243 return ((int64_t)h << 32) | l;
1244}
1245
1246#elif defined(__i386__)
1247
1248static inline int64_t cpu_get_real_ticks(void)
1249{
1250 int64_t val;
1251 asm volatile ("rdtsc" : "=A" (val));
1252 return val;
1253}
1254
1255#elif defined(__x86_64__)
1256
1257static inline int64_t cpu_get_real_ticks(void)
1258{
1259 uint32_t low,high;
1260 int64_t val;
1261 asm volatile("rdtsc" : "=a" (low), "=d" (high));
1262 val = high;
1263 val <<= 32;
1264 val |= low;
1265 return val;
1266}
1267
1268#elif defined(__hppa__)
1269
1270static inline int64_t cpu_get_real_ticks(void)
1271{
1272 int val;
1273 asm volatile ("mfctl %%cr16, %0" : "=r"(val));
1274 return val;
1275}
1276
1277#elif defined(__ia64)
1278
1279static inline int64_t cpu_get_real_ticks(void)
1280{
1281 int64_t val;
1282 asm volatile ("mov %0 = ar.itc" : "=r"(val) :: "memory");
1283 return val;
1284}
1285
1286#elif defined(__s390__)
1287
1288static inline int64_t cpu_get_real_ticks(void)
1289{
1290 int64_t val;
1291 asm volatile("stck 0(%1)" : "=m" (val) : "a" (&val) : "cc");
1292 return val;
1293}
1294
1295#elif defined(__sparc_v8plus__) || defined(__sparc_v8plusa__) || defined(__sparc_v9__)
1296
1297static inline int64_t cpu_get_real_ticks (void)
1298{
1299#if defined(_LP64)
1300 uint64_t rval;
1301 asm volatile("rd %%tick,%0" : "=r"(rval));
1302 return rval;
1303#else
1304 union {
1305 uint64_t i64;
1306 struct {
1307 uint32_t high;
1308 uint32_t low;
1309 } i32;
1310 } rval;
1311 asm volatile("rd %%tick,%1; srlx %1,32,%0"
1312 : "=r"(rval.i32.high), "=r"(rval.i32.low));
1313 return rval.i64;
1314#endif
1315}
1316
1317#elif defined(__mips__)
1318
1319static inline int64_t cpu_get_real_ticks(void)
1320{
1321#if __mips_isa_rev >= 2
1322 uint32_t count;
1323 static uint32_t cyc_per_count = 0;
1324
1325 if (!cyc_per_count)
1326 __asm__ __volatile__("rdhwr %0, $3" : "=r" (cyc_per_count));
1327
1328 __asm__ __volatile__("rdhwr %1, $2" : "=r" (count));
1329 return (int64_t)(count * cyc_per_count);
1330#else
1331 /* FIXME */
1332 static int64_t ticks = 0;
1333 return ticks++;
1334#endif
1335}
1336
1337#else
1338/* The host CPU doesn't have an easily accessible cycle counter.
1339 Just return a monotonically increasing value. This will be
1340 totally wrong, but hopefully better than nothing. */
1341static inline int64_t cpu_get_real_ticks (void)
1342{
1343 static int64_t ticks = 0;
1344 return ticks++;
1345}
1346#endif
1347
1348/* profiling */
1349#ifdef CONFIG_PROFILER
1350static inline int64_t profile_getclock(void)
1351{
1352 return cpu_get_real_ticks();
1353}
1354
1355extern int64_t kqemu_time, kqemu_time_start;
1356extern int64_t qemu_time, qemu_time_start;
1357extern int64_t tlb_flush_time;
1358extern int64_t kqemu_exec_count;
1359extern int64_t dev_time;
1360extern int64_t kqemu_ret_int_count;
1361extern int64_t kqemu_ret_excp_count;
1362extern int64_t kqemu_ret_intr_count;
1363#endif
1364
1365#ifdef VBOX
1366void tb_invalidate_virt(CPUState *env, uint32_t eip);
1367#endif /* VBOX */
1368
1369#endif /* CPU_ALL_H */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette