~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to target-ppc/cpu.h

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
886
886
/* The whole PowerPC CPU context */
887
887
#define NB_MMU_MODES 3
888
888
 
 
889
#define PPC_CPU_OPCODES_LEN 0x40
 
890
 
889
891
struct CPUPPCState {
890
892
    /* First are the most commonly used resources
891
893
     * during translated code execution
946
948
#if defined(TARGET_PPC64)
947
949
    /* PowerPC 64 SLB area */
948
950
    ppc_slb_t slb[64];
949
 
    int slb_nr;
 
951
    int32_t slb_nr;
950
952
#endif
951
953
    /* segment registers */
952
954
    hwaddr htab_base;
955
957
    /* externally stored hash table */
956
958
    uint8_t *external_htab;
957
959
    /* BATs */
958
 
    int nb_BATs;
 
960
    uint32_t nb_BATs;
959
961
    target_ulong DBAT[2][8];
960
962
    target_ulong IBAT[2][8];
961
963
    /* PowerPC TLB registers (for 4xx, e500 and 60x software driven TLBs) */
962
 
    int nb_tlb;      /* Total number of TLB                                  */
 
964
    int32_t nb_tlb;      /* Total number of TLB                              */
963
965
    int tlb_per_way; /* Speed-up helper: used to avoid divisions at run time */
964
966
    int nb_ways;     /* Number of ways in the TLB set                        */
965
967
    int last_way;    /* Last used way used to allocate TLB in a LRU way      */
1039
1041
 
1040
1042
    /* Those resources are used only during code translation */
1041
1043
    /* opcode handlers */
1042
 
    opc_handler_t *opcodes[0x40];
 
1044
    opc_handler_t *opcodes[PPC_CPU_OPCODES_LEN];
1043
1045
 
1044
1046
    /* Those resources are used only in QEMU core */
1045
1047
    target_ulong hflags;      /* hflags is a MSR & HFLAGS_MASK         */
1174
1176
#define cpu_signal_handler cpu_ppc_signal_handler
1175
1177
#define cpu_list ppc_cpu_list
1176
1178
 
1177
 
#define CPU_SAVE_VERSION 4
1178
 
 
1179
1179
/* MMU modes definitions */
1180
1180
#define MMU_MODE0_SUFFIX _user
1181
1181
#define MMU_MODE1_SUFFIX _kernel
1186
1186
    return env->mmu_idx;
1187
1187
}
1188
1188
 
1189
 
#if defined(CONFIG_USER_ONLY)
1190
 
static inline void cpu_clone_regs(CPUPPCState *env, target_ulong newsp)
1191
 
{
1192
 
    if (newsp)
1193
 
        env->gpr[1] = newsp;
1194
 
    env->gpr[3] = 0;
1195
 
}
1196
 
#endif
1197
 
 
1198
1189
#include "exec/cpu-all.h"
1199
1190
 
1200
1191
/*****************************************************************************/
2034
2025
    *flags = env->hflags;
2035
2026
}
2036
2027
 
2037
 
static inline void cpu_set_tls(CPUPPCState *env, target_ulong newtls)
2038
 
{
2039
 
#if defined(TARGET_PPC64)
2040
 
    /* The kernel checks TIF_32BIT here; we don't support loading 32-bit
2041
 
       binaries on PPC64 yet. */
2042
 
    env->gpr[13] = newtls;
2043
 
#else
2044
 
    env->gpr[2] = newtls;
2045
 
#endif
2046
 
}
2047
 
 
2048
2028
#if !defined(CONFIG_USER_ONLY)
2049
2029
static inline int booke206_tlbm_id(CPUPPCState *env, ppcmas_tlb_t *tlbm)
2050
2030
{
2162
2142
 
2163
2143
#include "exec/exec-all.h"
2164
2144
 
2165
 
static inline void cpu_pc_from_tb(CPUPPCState *env, TranslationBlock *tb)
2166
 
{
2167
 
    env->nip = tb->pc;
2168
 
}
2169
 
 
2170
2145
void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env);
2171
2146
 
2172
2147
#endif /* !defined (__CPU_PPC_H__) */