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

« back to all changes in this revision

Viewing changes to target-mips/op_helper.c

  • 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:
1696
1696
 
1697
1697
target_ulong helper_dvpe(CPUMIPSState *env)
1698
1698
{
1699
 
    CPUMIPSState *other_cpu_env = first_cpu;
 
1699
    CPUState *other_cs = first_cpu;
1700
1700
    target_ulong prev = env->mvp->CP0_MVPControl;
1701
1701
 
1702
1702
    do {
 
1703
        MIPSCPU *other_cpu = MIPS_CPU(other_cs);
1703
1704
        /* Turn off all VPEs except the one executing the dvpe.  */
1704
 
        if (other_cpu_env != env) {
1705
 
            MIPSCPU *other_cpu = mips_env_get_cpu(other_cpu_env);
1706
 
 
1707
 
            other_cpu_env->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
 
1705
        if (&other_cpu->env != env) {
 
1706
            other_cpu->env.mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
1708
1707
            mips_vpe_sleep(other_cpu);
1709
1708
        }
1710
 
        other_cpu_env = other_cpu_env->next_cpu;
1711
 
    } while (other_cpu_env);
 
1709
        other_cs = other_cs->next_cpu;
 
1710
    } while (other_cs);
1712
1711
    return prev;
1713
1712
}
1714
1713
 
1715
1714
target_ulong helper_evpe(CPUMIPSState *env)
1716
1715
{
1717
 
    CPUMIPSState *other_cpu_env = first_cpu;
 
1716
    CPUState *other_cs = first_cpu;
1718
1717
    target_ulong prev = env->mvp->CP0_MVPControl;
1719
1718
 
1720
1719
    do {
1721
 
        MIPSCPU *other_cpu = mips_env_get_cpu(other_cpu_env);
 
1720
        MIPSCPU *other_cpu = MIPS_CPU(other_cs);
1722
1721
 
1723
 
        if (other_cpu_env != env
 
1722
        if (&other_cpu->env != env
1724
1723
            /* If the VPE is WFI, don't disturb its sleep.  */
1725
1724
            && !mips_vpe_is_wfi(other_cpu)) {
1726
1725
            /* Enable the VPE.  */
1727
 
            other_cpu_env->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
 
1726
            other_cpu->env.mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
1728
1727
            mips_vpe_wake(other_cpu); /* And wake it up.  */
1729
1728
        }
1730
 
        other_cpu_env = other_cpu_env->next_cpu;
1731
 
    } while (other_cpu_env);
 
1729
        other_cs = other_cs->next_cpu;
 
1730
    } while (other_cs);
1732
1731
    return prev;
1733
1732
}
1734
1733
#endif /* !CONFIG_USER_ONLY */
1736
1735
void helper_fork(target_ulong arg1, target_ulong arg2)
1737
1736
{
1738
1737
    // arg1 = rt, arg2 = rs
1739
 
    arg1 = 0;
1740
1738
    // TODO: store to TC register
1741
1739
}
1742
1740
 
2147
2145
    }
2148
2146
}
2149
2147
 
2150
 
void cpu_unassigned_access(CPUMIPSState *env, hwaddr addr,
2151
 
                           int is_write, int is_exec, int unused, int size)
 
2148
void mips_cpu_unassigned_access(CPUState *cs, hwaddr addr,
 
2149
                                bool is_write, bool is_exec, int unused,
 
2150
                                unsigned size)
2152
2151
{
2153
 
    if (is_exec)
 
2152
    MIPSCPU *cpu = MIPS_CPU(cs);
 
2153
    CPUMIPSState *env = &cpu->env;
 
2154
 
 
2155
    if (is_exec) {
2154
2156
        helper_raise_exception(env, EXCP_IBE);
2155
 
    else
 
2157
    } else {
2156
2158
        helper_raise_exception(env, EXCP_DBE);
 
2159
    }
2157
2160
}
2158
2161
#endif /* !CONFIG_USER_ONLY */
2159
2162