1. 05 3月, 2014 1 次提交
  2. 04 3月, 2014 1 次提交
  3. 20 2月, 2014 1 次提交
  4. 09 1月, 2014 2 次提交
    • M
      target-arm: A64: support for ld/st/cl exclusive · fa2ef212
      Michael Matz 提交于
      This implement exclusive loads/stores for aarch64 along the lines of
      arm32 and ppc implementations. The exclusive load remembers the address
      and loaded value. The exclusive store throws an an exception which uses
      those values to check for equality in a proper exclusive region.
      
      This is not actually the architecture mandated semantics (for either
      AArch32 or AArch64) but it is close enough for typical guest code
      sequences to work correctly, and saves us from having to monitor all
      guest stores. It's fairly easy to come up with test cases where we
      don't behave like hardware - we don't for example model cache line
      behaviour. However in the common patterns this works, and the existing
      32 bit ARM exclusive access implementation has the same limitations.
      
      AArch64 also implements new acquire/release loads/stores (which may be
      either exclusive or non-exclusive). These imposes extra ordering
      constraints on memory operations (ie they act as if they have an implicit
      barrier built into them). As TCG is single-threaded all our barriers
      are no-ops, so these just behave like normal loads and stores.
      Signed-off-by: NMichael Matz <matz@suse.de>
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      fa2ef212
    • P
      target-arm: Widen exclusive-access support struct fields to 64 bits · 03d05e2d
      Peter Maydell 提交于
      In preparation for adding support for A64 load/store exclusive instructions,
      widen the fields in the CPU state struct that deal with address and data values
      for exclusives from 32 to 64 bits. Although in practice AArch64 and AArch32
      exclusive accesses will be generally separate there are some odd theoretical
      corner cases (eg you should be able to do the exclusive load in AArch32, take
      an exception to AArch64 and successfully do the store exclusive there), and it's
      also easier to reason about.
      
      The changes in semantics for the variables are:
       exclusive_addr  -> extended to 64 bits; -1ULL for "monitor lost",
         otherwise always < 2^32 for AArch32
       exclusive_val   -> extended to 64 bits. 64 bit exclusives in AArch32 now
         use the high half of exclusive_val instead of a separate exclusive_high
       exclusive_high  -> is no longer used in AArch32; extended to 64 bits as
         it will be needed for AArch64's pair-of-64-bit-values exclusives.
       exclusive_test  -> extended to 64 bits, as it is an address. Since this is
         a linux-user-only field, in arm-linux-user it will always have the top
         32 bits zero.
       exclusive_info  -> stays 32 bits, as it is neither data nor address, but
         simply holds register indexes etc. AArch64 will be able to fit all its
         information into 32 bits as well.
      
      Note that the refactoring of gen_store_exclusive() coincidentally fixes
      a minor bug where ldrexd would incorrectly update the first CPU register
      even if the load for the second register faulted.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      03d05e2d
  5. 08 1月, 2014 4 次提交
    • M
      target-arm: A64: support for ld/st/cl exclusive · 2df75664
      Michael Matz 提交于
      This implement exclusive loads/stores for aarch64 along the lines of
      arm32 and ppc implementations. The exclusive load remembers the address
      and loaded value. The exclusive store throws an an exception which uses
      those values to check for equality in a proper exclusive region.
      
      This is not actually the architecture mandated semantics (for either
      AArch32 or AArch64) but it is close enough for typical guest code
      sequences to work correctly, and saves us from having to monitor all
      guest stores. It's fairly easy to come up with test cases where we
      don't behave like hardware - we don't for example model cache line
      behaviour. However in the common patterns this works, and the existing
      32 bit ARM exclusive access implementation has the same limitations.
      
      AArch64 also implements new acquire/release loads/stores (which may be
      either exclusive or non-exclusive). These imposes extra ordering
      constraints on memory operations (ie they act as if they have an implicit
      barrier built into them). As TCG is single-threaded all our barriers
      are no-ops, so these just behave like normal loads and stores.
      Signed-off-by: NMichael Matz <matz@suse.de>
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      2df75664
    • P
      target-arm: Widen exclusive-access support struct fields to 64 bits · 90ba562c
      Peter Maydell 提交于
      In preparation for adding support for A64 load/store exclusive instructions,
      widen the fields in the CPU state struct that deal with address and data values
      for exclusives from 32 to 64 bits. Although in practice AArch64 and AArch32
      exclusive accesses will be generally separate there are some odd theoretical
      corner cases (eg you should be able to do the exclusive load in AArch32, take
      an exception to AArch64 and successfully do the store exclusive there), and it's
      also easier to reason about.
      
      The changes in semantics for the variables are:
       exclusive_addr  -> extended to 64 bits; -1ULL for "monitor lost",
         otherwise always < 2^32 for AArch32
       exclusive_val   -> extended to 64 bits. 64 bit exclusives in AArch32 now
         use the high half of exclusive_val instead of a separate exclusive_high
       exclusive_high  -> is no longer used in AArch32; extended to 64 bits as
         it will be needed for AArch64's pair-of-64-bit-values exclusives.
       exclusive_test  -> extended to 64 bits, as it is an address. Since this is
         a linux-user-only field, in arm-linux-user it will always have the top
         32 bits zero.
       exclusive_info  -> stays 32 bits, as it is neither data nor address, but
         simply holds register indexes etc. AArch64 will be able to fit all its
         information into 32 bits as well.
      
      Note that the refactoring of gen_store_exclusive() coincidentally fixes
      a minor bug where ldrexd would incorrectly update the first CPU register
      even if the load for the second register faulted.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      90ba562c
    • P
      target-arm: Widen thread-local register state fields to 64 bits · e4fe830b
      Peter Maydell 提交于
      The common pattern for system registers in a 64-bit capable ARM
      CPU is that when in AArch32 the cp15 register is a view of the
      bottom 32 bits of the 64-bit AArch64 system register; writes in
      AArch32 leave the top half unchanged. The most natural way to
      model this is to have the state field in the CPU struct be a
      64 bit value, and simply have the AArch32 TCG code operate on
      a pointer to its lower half.
      
      For aarch64-linux-user the only registers we need to share like
      this are the thread-local-storage ones. Widen their fields to
      64 bits and provide the 64 bit reginfo struct to make them
      visible in AArch64 state. Note that minor cleanup of the AArch64
      system register encoding space means We can share the TPIDR_EL1
      reginfo but need split encodings for TPIDR_EL0 and TPIDRRO_EL0.
      
      Since we're touching almost every line in QEMU that uses the
      c13_tls* fields in this patch anyway, we take the opportunity
      to rename them in line with the standard ARM architectural names
      for these registers.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      e4fe830b
    • P
      target-arm: Widen thread-local register state fields to 64 bits · 19917791
      Peter Maydell 提交于
      The common pattern for system registers in a 64-bit capable ARM
      CPU is that when in AArch32 the cp15 register is a view of the
      bottom 32 bits of the 64-bit AArch64 system register; writes in
      AArch32 leave the top half unchanged. The most natural way to
      model this is to have the state field in the CPU struct be a
      64 bit value, and simply have the AArch32 TCG code operate on
      a pointer to its lower half.
      
      For aarch64-linux-user the only registers we need to share like
      this are the thread-local-storage ones. Widen their fields to
      64 bits and provide the 64 bit reginfo struct to make them
      visible in AArch64 state. Note that minor cleanup of the AArch64
      system register encoding space means We can share the TPIDR_EL1
      reginfo but need split encodings for TPIDR_EL0 and TPIDRRO_EL0.
      
      Since we're touching almost every line in QEMU that uses the
      c13_tls* fields in this patch anyway, we take the opportunity
      to rename them in line with the standard ARM architectural names
      for these registers.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      19917791
  6. 30 11月, 2013 3 次提交
  7. 07 10月, 2013 2 次提交
  8. 24 9月, 2013 3 次提交
  9. 11 9月, 2013 3 次提交
    • A
      linux-user: Add AArch64 support · 99033cae
      Alexander Graf 提交于
      This patch adds support for AArch64 in all the small corners of
      linux-user (primarily in image loading and startup code).
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NJohn Rigby <john.rigby@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1378235544-22290-22-git-send-email-peter.maydell@linaro.org
      Message-id: 1368505980-17151-11-git-send-email-john.rigby@linaro.org
      [PMM:
       * removed some unnecessary #defines from syscall.h
       * catch attempts to use a 32 bit only cpu with aarch64-linux-user
       * termios stuff moved into its own patch
       * we specify our minimum uname version here now
      ]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      99033cae
    • P
      linux-user: Allow targets to specify a minimum uname release · 4a24a758
      Peter Maydell 提交于
      For newer target architectures, glibc can be picky about the kernel
      version: for example, it will not run on an aarch64 system unless
      the kernel reports itself as at least 3.8.0. Accommodate this by
      enhancing the existing support for faking the kernel version so
      that each target can optionally specify a minimum version: if
      the user doesn't force a specific fake version then we will override
      with the minimum required version only if the real host kernel
      version is insufficient.
      
      Use this facility to let aarch64 report a minimum of 3.8.0.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1378235544-22290-21-git-send-email-peter.maydell@linaro.org
      4a24a758
    • P
      linux-user: Add cpu loop for AArch64 · 1861c454
      Peter Maydell 提交于
      Add the main linux-user cpu loop for AArch64. Since AArch64
      has a different system call interface, doesn't need to worry
      about FPA emulation and may in the future keep the prefetch/data
      abort information in different system registers, it's simplest
      just to use a completely separate loop from the 32 bit ARM
      target, rather than peppering it with ifdefs.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1378235544-22290-14-git-send-email-peter.maydell@linaro.org
      1861c454
  10. 03 9月, 2013 1 次提交
  11. 29 7月, 2013 1 次提交
  12. 27 7月, 2013 2 次提交
  13. 23 7月, 2013 4 次提交
  14. 19 7月, 2013 1 次提交
  15. 10 7月, 2013 3 次提交
  16. 28 6月, 2013 2 次提交
  17. 14 6月, 2013 1 次提交
  18. 02 5月, 2013 1 次提交
    • E
      target-i386: Replace cpuid_*features fields with a feature word array · 0514ef2f
      Eduardo Habkost 提交于
      This replaces the feature-bit fields on both X86CPU and x86_def_t
      structs with an array.
      
      With this, we will be able to simplify code that simply does the same
      operation on all feature words (e.g. kvm_check_features_against_host(),
      filter_features_for_kvm(), add_flagname_to_bitmaps(), CPU feature-bit
      property lookup/registration, and the proposed "feature-words" property)
      
      The following field replacements were made on X86CPU and x86_def_t:
      
        (cpuid_)features         -> features[FEAT_1_EDX]
        (cpuid_)ext_features     -> features[FEAT_1_ECX]
        (cpuid_)ext2_features    -> features[FEAT_8000_0001_EDX]
        (cpuid_)ext3_features    -> features[FEAT_8000_0001_ECX]
        (cpuid_)ext4_features    -> features[FEAT_C000_0001_EDX]
        (cpuid_)kvm_features     -> features[FEAT_KVM]
        (cpuid_)svm_features     -> features[FEAT_SVM]
        (cpuid_)7_0_ebx_features -> features[FEAT_7_0_EBX]
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      0514ef2f
  19. 11 3月, 2013 1 次提交
    • P
      linux-user: Fix layout of usage table to account for option text · 63ec54d7
      Peter Maydell 提交于
      The linux-user usage message attempts to line up the columns in
      its table by calculating the maximum width of any item in them.
      However for the 'Argument' column it was only accounting for the
      length of the option switch (eg "-d"), not the additional example
      text (eg "item[,...]"). This currently has no adverse effects
      because the widest item in the column happens to be the argumentless
      "-singlestep" option, but improving the "-d" option help to read
      "-d item[,...]" exceeds that limit.
      
      Fix this by correctly calculating maxarglen as the width of the
      first column text including a possible option argument, and
      adjusting its uses to match.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      63ec54d7
  20. 05 3月, 2013 2 次提交
  21. 27 2月, 2013 1 次提交
    • P
      qemu-log: default to stderr for logging output · 989b697d
      Peter Maydell 提交于
      Switch the default for qemu_log logging output from "/tmp/qemu.log"
      to stderr. This is an incompatible change in some sense, but logging
      is mostly used for debugging purposes so it shouldn't affect production
      use. The previous behaviour can be obtained by adding "-D /tmp/qemu.log"
      to the command line.
      
      This change requires us to:
       * update all the documentation/help text (we take the opportunity
         to smooth out minor inconsistencies between the phrasing in
         linux-user/bsd-user/system help messages)
       * make linux-user and bsd-user defer to qemu-log for the default
         logging destination rather than overriding it themselves
       * ensure that all logfile closing is done via qemu_log_close()
         and that that function doesn't close stderr
      as well as the obvious change to the behaviour of do_qemu_set_log()
      when no logfile name has been specified.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1361901160-28729-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      989b697d