1. 11 5月, 2017 1 次提交
    • D
      target/ppc: Allow workarounds for POWER9 DD1 · 5f3066d8
      David Gibson 提交于
      POWER9 DD1 silicon has some bugs which mean it a) isn't really compliant
      with the ISA v3.00 and b) require a number of special workarounds in the
      kernel.
      
      At the moment, qemu isn't aware of DD1.  For TCG we don't really want it to
      be (why bother emulating buggy silicon).  But with KVM, the guest does need
      to be aware of DD1 so it can apply the necessary workarounds.
      
      Meanwhile, the feature negotiation between qemu and the guest strongly
      favours architected compatibility modes to "raw" CPU modes.  In combination
      with the above, this means the guest sees architected POWER9 mode, and
      doesn't apply the DD1 workarounds.  Well, unless it has yet another
      workaround to partially ignore what qemu tells it.
      
      This patch addresses this by disabling support for compatibility modes when
      using KVM on a POWER9 DD1 host.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      5f3066d8
  2. 31 1月, 2017 1 次提交
  3. 21 12月, 2016 1 次提交
    • T
      Move target-* CPU file into a target/ folder · fcf5ef2a
      Thomas Huth 提交于
      We've currently got 18 architectures in QEMU, and thus 18 target-xxx
      folders in the root folder of the QEMU source tree. More architectures
      (e.g. RISC-V, AVR) are likely to be included soon, too, so the main
      folder of the QEMU sources slowly gets quite overcrowded with the
      target-xxx folders.
      To disburden the main folder a little bit, let's move the target-xxx
      folders into a dedicated target/ folder, so that target-xxx/ simply
      becomes target/xxx/ instead.
      
      Acked-by: Laurent Vivier <laurent@vivier.eu> [m68k part]
      Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> [tricore part]
      Acked-by: Michael Walle <michael@walle.cc> [lm32 part]
      Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x part]
      Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> [s390x part]
      Acked-by: Eduardo Habkost <ehabkost@redhat.com> [i386 part]
      Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> [sparc part]
      Acked-by: Richard Henderson <rth@twiddle.net> [alpha part]
      Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa part]
      Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [ppc part]
      Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> [cris&microblaze part]
      Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32 part]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fcf5ef2a
  4. 15 11月, 2016 1 次提交
    • D
      ppc: Remove some stub POWER6 models · e0aa3116
      David Gibson 提交于
      The CPU model table includes stub (commented out) definitions for
      CPU_POWERPC_POWER6_5 and CPU_POWERPC_POWER6A.  These are not real cpu
      models, but represent the POWER6 in some compatiblity modes.  If we ever
      do implement POWER6 (unlikely), we'll implement its compatibility modes in
      a different way (similar to what we do for POWER7 and POWER8).  So these
      stub definitions can be removed.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      e0aa3116
  5. 07 9月, 2016 1 次提交
  6. 16 3月, 2016 1 次提交
  7. 30 1月, 2016 1 次提交
  8. 26 3月, 2015 1 次提交
  9. 09 3月, 2015 1 次提交
    • A
      target-ppc: Add versions to server CPU descriptions · d7586dc4
      Alexey Kardashevskiy 提交于
      5b79b1ca "target-ppc: Create versionless CPU class per family if KVM" added
      a dynamic CPU class registration with the name of the CPU family which
      QEMU is running on. For example, this allowed specifying "-cpu POWER7"
      on every version of POWER7 machine, not just the one which POWER7 was
      an alias of. I.e. before 5b79b1ca, "-cpu POWER7" would not work on real
      POWER7 2.1 and would work on POWER7 2.3 only. The same story for POWER8.
      
      However that patch broke POWER5+ support as POWER5+ CPU uses the same
      name as the CPU class so dynamic registering of the POWER5+ class failed.
      
      This redefines POWER5+ server CPUs by adding a version to them and adding
      an alias for TCG case. KVM will use dynamically registered CPUs.
      
      While we are here, do the same for 970 CPU.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d7586dc4
  10. 08 7月, 2014 1 次提交
    • A
      target-ppc: Add pvr_match() callback · 03ae4133
      Alexey Kardashevskiy 提交于
      So far it was enough to have a base PVR value and mask per CPU
      family such as POWER7 or POWER8. However there CPUs which are
      completely architecturally compatible but have different PVRs such
      as POWER7/POWER7+ and POWER8/POWER8E. For these CPUs, top 16 bits
      are CPU family and low 16 bits are the version. The families have
      PVR base values different enough so defining a mask which
      would cover both (or potentially more) CPUs within the family is
      not possible.
      
      This adds a pvr_match() callback to PowerPCCPUClass. The default
      handler simply compares PVR defined in the class.
      
      This implements ppc_pvr_match_power7/ppc_pvr_match_power8 callbacks
      for POWER7/8 families. These check for POWER7/POWER7+ and POWER8/POWER8E.
      
      This changes ppc_cpu_compare_class_pvr_mask() not to check masks but
      use the pvr_match() callback.
      
      Since all server CPUs use the same mask, this defines one mask
      value - CPU_POWERPC_POWER_SERVER_MASK - which is used everywhere now.
      This removes other mask definitions.
      
      This removes pvr_mask from PowerPCCPUClass as it is not used anymore.
      This removes pvr initialization for POWER7/8 families as it is not used
      to find the class, the pvr_match() callback is used instead.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      03ae4133
  11. 27 6月, 2014 1 次提交
    • A
      target-ppc: Add support for POWER8 pvr 0x4D0000 · f6c3ebcc
      Alexey Kardashevskiy 提交于
      At the moment QEMU knows about one version of POWER8 CPU with
      PVR 0x4B.0000. This CPU class is defined as "POWER8". The linux
      kernel names it as "POWER8E" which is different from the name QEMU uses.
      
      Now we get another version of POWER8 which is architecturally equivalent
      to POWER8E but has different PVR 0x4D.0000 so QEMU fails to find
      a PPC CPU class on these machines. The linux kernel names these CPUs as
      "POWER8".
      
      This renames the existing "POWER8" to "POWER8E" to be more precise and
      stay in sync with the linux kernel.
      
      This adds a new "POWER8" family which calls POWER8E class init function
      and defines own PVR mask (used to match a CPU class) and desc (used to
      create dynamic version-less CPU class).
      
      This does not change CPU class fw_name attribute as the host POWER8
      firmware keeps using "PowerPC,POWER8" on both POWER8 and POWER8E.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      f6c3ebcc
  12. 16 6月, 2014 2 次提交
    • A
      target-ppc: Add "compat" CPU option · 8dfa3a5e
      Alexey Kardashevskiy 提交于
      PowerISA defines a compatibility mode for server POWERPC CPUs which
      is supported by the PCR special register which is hypervisor privileged.
      To support this mode for guests, SPAPR defines a set of virtual PVRs,
      one per PowerISA spec version. When a hypervisor needs a guest to work in
      a compatibility mode, it puts a virtual PVR value into @cpu-version
      property of a CPU node.
      
      This introduces a "compat" CPU option which defines maximal compatibility
      mode enabled. The supported modes are power6/power7/power8.
      
      This does not change the existing behaviour, new property will be used
      by next patches.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      8dfa3a5e
    • A
      target-ppc: Remove redundant POWER7 declarations · 70d246c3
      Alexey Kardashevskiy 提交于
      At the moment there are 3 versions of POWER7 CPUs defined. However
      we do not emulate these CPUs diffent and it does not make much
      sense to keep them all.
      
      This removes POWER7_v2.0 and POWER7_v2.1 and leaves just one versioned
      CPU per family which is POWER7_v2.3 with POWER7 alias.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      70d246c3
  13. 05 3月, 2014 1 次提交
  14. 20 12月, 2013 2 次提交
    • A
      target-ppc: move POWER7+ to a separate family · b650d6a2
      Alexey Kardashevskiy 提交于
      So far POWER7+ was a part of POWER7 family. However it has a different
      PVR base value so in order to support PVR masks, it needs a separate
      family class.
      
      This adds a new family class, PVR base and mask values and moves
      Power7+ v2.1 CPU to a new family. The class init function is copied
      from the POWER7 family.
      
      This defines a firmware name for the new family as "PowerPC,POWER7+"
      instead of previously used "PowerPC,POWER7" from the POWER7 family.
      The reason for that is that the Sapphire firmware (a h0st firmware)
      uses "PowerPC,POWER7+" already and since no specification defines
      exactly the CPU nodes naming in the device tree, we better stay
      in sync with the host firmware.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b650d6a2
    • A
      powerpc: add PVR mask support · 3bc9ccc0
      Alexey Kardashevskiy 提交于
      IBM POWERPC processors encode PVR as a CPU family in higher 16 bits and
      a CPU version in lower 16 bits. Since there is no significant change
      in behavior between versions, there is no point to add every single CPU
      version in QEMU's CPU list. Also, new CPU versions of already supported
      CPU won't break the existing code.
      
      This adds PVR value/mask support for KVM, i.e. for -cpu host option.
      
      As CPU family class name for POWER7 is "POWER7-family", there is no need
      to touch aliases.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      3bc9ccc0
  15. 08 8月, 2013 4 次提交
  16. 06 8月, 2013 1 次提交
  17. 12 7月, 2013 2 次提交
  18. 01 7月, 2013 1 次提交
    • A
      PPC: Introduce an alias cache for faster lookups · 9761ad75
      Alexander Graf 提交于
      When running QEMU with "-cpu ?" we walk through every alias for every
      target CPU we know about. This takes several seconds on my very fast
      host system.
      
      Let's introduce a class object cache in the alias table. Using that we
      don't have to go through the tedious work of finding our target class.
      Instead, we can just go directly from the alias name to the target class
      pointer.
      
      This patch brings -cpu "?" to reasonable times again.
      
      Before:
        real    0m4.716s
      
      After:
        real    0m0.025s
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      9761ad75
  19. 09 3月, 2013 2 次提交