1. 24 3月, 2016 3 次提交
  2. 17 3月, 2016 1 次提交
    • E
      machine: Use type_init() to register machine classes · 0e6aac87
      Eduardo Habkost 提交于
      Change all machine_init() users that simply call type_register*()
      to use type_init().
      
      Cc: Evgeny Voevodin <e.voevodin@samsung.com>
      Cc: Maksim Kozlov <m.kozlov@samsung.com>
      Cc: Igor Mitsyanko <i.mitsyanko@gmail.com>
      Cc: Dmitry Solodkiy <d.solodkiy@samsung.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: "Hervé Poussineau" <hpoussin@reactos.org>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      0e6aac87
  3. 16 3月, 2016 2 次提交
    • D
      target-ppc: Eliminate kvmppc_kern_htab global · c18ad9a5
      David Gibson 提交于
      fa48b432 "target-ppc: Remove hack for ppc_hash64_load_hpte*() with HV KVM"
      purports to remove a hack in the handling of hash page tables (HPTs)
      managed by KVM instead of qemu.  However, it actually went in the wrong
      direction.
      
      That patch requires anything looking for an external HPT (that is one not
      managed by the guest itself) to check both env->external_htab (for a qemu
      managed HPT) and kvmppc_kern_htab (for a KVM managed HPT).  That's a
      problem because kvmppc_kern_htab is local to mmu-hash64.c, but some places
      which need to check for an external HPT are outside that, such as
      kvm_arch_get_registers().  The latter was subtly broken by the earlier
      patch such that gdbstub can no longer access memory.
      
      Basically a KVM managed HPT is much more like a qemu managed HPT than it is
      like a guest managed HPT, so the original "hack" was actually on the right
      track.
      
      This partially reverts fa48b432, so we again mark a KVM managed external HPT
      by putting a special but non-NULL value in env->external_htab.  It then
      goes further, using that marker to eliminate the kvmppc_kern_htab global
      entirely.  The ppc_hash64_set_external_hpt() helper function is extended
      to set that marker if passed a NULL value (if you're setting an external
      HPT, but don't have an actual HPT to set, the assumption is that it must
      be a KVM managed HPT).
      
      This also has some flow-on changes to the HPT access helpers, required by
      the above changes.
      Reported-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Tested-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      c18ad9a5
    • D
      target-ppc: Add helpers for updating a CPU's SDR1 and external HPT · e5c0d3ce
      David Gibson 提交于
      When a Power cpu with 64-bit hash MMU has it's hash page table (HPT)
      pointer updated by a write to the SDR1 register we need to update some
      derived variables.  Likewise, when the cpu is configured for an external
      HPT (one not in the guest memory space) some derived variables need to be
      updated.
      
      Currently the logic for this is (partially) duplicated in ppc_store_sdr1()
      and in spapr_cpu_reset().  In future we're going to need it in some other
      places, so make some common helpers for this update.
      
      In addition the new ppc_hash64_set_external_hpt() helper also updates
      SDR1 in KVM - it's not updated by the normal runtime KVM <-> qemu CPU
      synchronization.  In a sense this belongs logically in the
      ppc_hash64_set_sdr1() helper, but that is called from
      kvm_arch_get_registers() so can't itself call cpu_synchronize_state()
      without infinite recursion.  In practice this doesn't matter because
      the only other caller is TCG specific.
      
      Currently there aren't situations where updating SDR1 at runtime in KVM
      matters, but there are going to be in future.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      e5c0d3ce
  4. 11 3月, 2016 1 次提交
  5. 04 3月, 2016 1 次提交
    • P
      loader: Add data swap option to load-elf · 7ef295ea
      Peter Crosthwaite 提交于
      Some CPUs are of an opposite data-endianness to other components in the
      system. Sometimes elfs have the data sections layed out with this CPU
      data-endianness accounting for when loaded via the CPU, so byte swaps
      (relative to other system components) will occur.
      
      The leading example, is ARM's BE32 mode, which is is basically LE with
      address manipulation on half-word and byte accesses to access the
      hw/byte reversed address. This means that word data is invariant
      across LE and BE32. This also means that instructions are still LE.
      The expectation is that the elf will be loaded via the CPU in this
      endianness scheme, which means the data in the elf is reversed at
      compile time.
      
      As QEMU loads via the system memory directly, rather than the CPU, we
      need a mechanism to reverse elf data endianness to implement this
      possibility.
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7ef295ea
  6. 28 2月, 2016 2 次提交
  7. 25 2月, 2016 1 次提交
  8. 17 2月, 2016 6 次提交
  9. 30 1月, 2016 8 次提交
  10. 29 1月, 2016 1 次提交
    • P
      ppc: Clean up includes · 0d75590d
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-6-git-send-email-peter.maydell@linaro.org
      0d75590d
  11. 13 1月, 2016 3 次提交
  12. 11 1月, 2016 11 次提交