1. 27 11月, 2018 1 次提交
  2. 13 11月, 2018 1 次提交
    • P
      target/arm: Track the state of our irq lines from the GIC explicitly · ed89f078
      Peter Maydell 提交于
      Currently we track the state of the four irq lines from the GIC
      only via the cs->interrupt_request or KVM irq state. That means
      that we assume that an interrupt is asserted if and only if the
      external line is set. This assumption is incorrect for VIRQ
      and VFIQ, because the HCR_EL2.{VI,VF} bits allow assertion
      of VIRQ and VFIQ separately from the state of the external line.
      
      To handle this, start tracking the state of the external lines
      explicitly in a CPU state struct field, as is common practice
      for devices.
      
      The complicated part of this is dealing with inbound migration
      from an older QEMU which didn't have this state. We assume in
      that case that the older QEMU did not implement the HCR_EL2.{VI,VF}
      bits as generating interrupts, and so the line state matches
      the current state in cs->interrupt_request. (This is not quite
      true between commit 8a0fc3a2 and its revert, but
      that commit is broken and never made it into any released QEMU
      version.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 20181109134731.11605-3-peter.maydell@linaro.org
      ed89f078
  3. 24 10月, 2018 2 次提交
  4. 06 8月, 2018 1 次提交
  5. 16 2月, 2018 5 次提交
  6. 09 2月, 2018 2 次提交
  7. 25 1月, 2018 1 次提交
  8. 06 10月, 2017 2 次提交
  9. 27 9月, 2017 1 次提交
  10. 07 9月, 2017 15 次提交
  11. 04 9月, 2017 2 次提交
    • P
      target/arm: Don't use cpsr_write/cpsr_read to transfer M profile XPSR · eeade001
      Peter Maydell 提交于
      For M profile the XPSR is a similar but not identical format to the
      A profile CPSR/SPSR. (For instance the Thumb bit is in a different
      place.) For guest accesses we make the M profile code go through
      xpsr_read() and xpsr_write() which handle the different layout.
      However for migration we use cpsr_read() and cpsr_write() to
      marshal state into and out of the migration data stream. This
      is pretty confusing and works more by luck than anything else.
      Make M profile migration use xpsr_read() and xpsr_write() instead.
      
      The most complicated part of this is handling the possibility
      that the migration source is an older QEMU which hands us a
      CPSR format value; helpfully we can always tell the two apart.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 1501692241-23310-11-git-send-email-peter.maydell@linaro.org
      eeade001
    • P
      target/arm: Don't store M profile PRIMASK and FAULTMASK in daif · e6ae5981
      Peter Maydell 提交于
      We currently store the M profile CPU register state PRIMASK and
      FAULTMASK in the daif field of the CPU state in its I and F
      bits. This is a legacy from the original implementation, which
      tried to share the cpu_exec_interrupt code between A profile
      and M profile. We've since separated out the two cases because
      they are significantly different, so now there is no common
      code between M and A profile which looks at env->daif: all the
      uses are either in A-only or M-only code paths. Sharing the state
      fields now is just confusing, and will make things awkward
      when we implement v8M, where the PRIMASK and FAULTMASK
      registers are banked between security states.
      
      Switch M profile over to using v7m.faultmask and v7m.primask
      fields for these registers.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 1501692241-23310-10-git-send-email-peter.maydell@linaro.org
      e6ae5981
  12. 31 7月, 2017 2 次提交
  13. 02 6月, 2017 2 次提交
    • M
      arm: add MPU support to M profile CPUs · 29c483a5
      Michael Davidsaver 提交于
      The M series MPU is almost the same as the already implemented R
      profile MPU (v7 PMSA).  So all we need to implement here is the MPU
      register interface in the system register space.
      
      This implementation has the same restriction as the R profile MPU
      that it doesn't permit regions to be sized down smaller than 1K.
      
      We also do not yet implement support for MPU_CTRL.HFNMIENA; this
      bit should if zero disable use of the MPU when running HardFault,
      NMI or with FAULTMASK set to 1 (ie at an execution priority of
      less than zero) -- if the MPU is enabled we don't treat these
      cases any differently.
      Signed-off-by: NMichael Davidsaver <mdavidsaver@gmail.com>
      Message-id: 1493122030-32191-13-git-send-email-peter.maydell@linaro.org
      [PMM: Keep all the bits in mpu_ctrl field, rather than
       using SCTLR bits for them; drop broken HFNMIENA support;
       various cleanup]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      29c483a5
    • P
      arm: Clean up handling of no-MPU PMSA CPUs · 452a0955
      Peter Maydell 提交于
      ARM CPUs come in two flavours:
       * proper MMU ("VMSA")
       * only an MPU ("PMSA")
      For PMSA, the MPU may be implemented, or not (in which case there
      is default "always acts the same" behaviour, but it isn't guest
      programmable).
      
      QEMU is a bit confused about how we indicate this: we have an
      ARM_FEATURE_MPU, but it's not clear whether this indicates
      "PMSA, not VMSA" or "PMSA and MPU present" , and sometimes we
      use it for one purpose and sometimes the other.
      
      Currently trying to implement a PMSA-without-MPU core won't
      work correctly because we turn off the ARM_FEATURE_MPU bit
      and then a lot of things which should still exist get
      turned off too.
      
      As the first step in cleaning this up, rename the feature
      bit to ARM_FEATURE_PMSA, which indicates a PMSA CPU (with
      or without MPU).
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 1493122030-32191-5-git-send-email-peter.maydell@linaro.org
      452a0955
  14. 24 2月, 2017 1 次提交
  15. 27 1月, 2017 2 次提交