1. 16 8月, 2012 1 次提交
  2. 14 8月, 2012 1 次提交
  3. 25 6月, 2012 1 次提交
  4. 24 6月, 2012 8 次提交
  5. 02 5月, 2012 1 次提交
    • A
      PPC: Fix up e500 cache size setting · 892c587f
      Alexander Graf 提交于
      When initializing the e500 code, we need to expose its
      cache line size for user and system mode, while the mmu
      details are only interesting for system emulation.
      
      Split the 2 switch statements apart, allowing us to #ifdef
      out the mmu parts for user mode emulation while keeping all
      cache information consistent.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      892c587f
  6. 16 4月, 2012 1 次提交
  7. 15 4月, 2012 5 次提交
  8. 07 4月, 2012 1 次提交
  9. 15 3月, 2012 4 次提交
  10. 02 2月, 2012 5 次提交
  11. 21 1月, 2012 1 次提交
  12. 03 1月, 2012 1 次提交
  13. 31 10月, 2011 6 次提交
    • D
      ppc: Alter CPU state to mask out TCG unimplemented instructions as appropriate · 02d4eae4
      David Gibson 提交于
      The CPU state contains two bitmaps, initialized from the CPU spec
      which describes which instructions are implemented on the CPU.  A
      couple of bits are defined which cover instructions (VSX and DFP)
      which are not currently implemented in TCG.  So far, these are only
      used to handle the case of -cpu host because a KVM guest can use
      the instructions when the host CPU supports them.
      
      However, it's a mild layering violation to simply not include those
      bits in the CPU descriptions for those CPUs that do support them,
      just because we can't handle them in TCG.  This patch corrects the
      situation, so that the instruction bits _are_ shown correctly in the
      cpu spec table, but are masked out from the cpu state in the non-KVM
      case.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      02d4eae4
    • D
      pseries: Correct vmx/dfp handling in both KVM and TCG cases · a7342588
      David Gibson 提交于
      Currently, when KVM is enabled, the pseries machine checks if the host
      CPU supports VMX, VSX and/or DFP instructions and advertises
      accordingly in the guest device tree.  It does this regardless of what
      CPU is selected on the command line.  On the other hand, when in TCG
      mode, it never advertises any of these facilities, even basic VMX
      (Altivec) which is supported in TCG.
      
      Now that we have a -cpu host option for ppc, it is fairly
      straightforward to fix both problems.  This patch changes the -cpu
      host code to override the basic cpu spec derived from the PVR with
      information queried from the host avout VMX, VSX and DFP capability.
      The pseries code then uses the instruction availability advertised in
      the cpu state to set the guest device tree correctly for both the KVM
      and TCG cases.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a7342588
    • A
      PPC: Disable non-440 CPUs for ppcemb target · f0ad8c34
      Alexander Graf 提交于
      The sole reason we have the ppcemb target is to support MMUs that have
      less than the usual 4k possible page size. There are very few of these
      chips and I don't want to add additional QA and testing burden to everyone
      to ensure that code still works when TARGET_PAGE_SIZE is not 4k.
      
      So this patch disables all CPUs except for MMU_BOOKE capable ones from
      the ppcemb target.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      f0ad8c34
    • D
      ppc: Add cpu defs for POWER7 revisions 2.1 and 2.3 · 37e305ce
      David Gibson 提交于
      This patch adds cpu specs to the table for POWER7 revisions 2.1 and 2.3.
      This allows -cpu host to be used on these host cpus.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      37e305ce
    • D
      ppc: First cut implementation of -cpu host · a1e98583
      David Gibson 提交于
      For convenience with kvm, x86 allows the user to specify -cpu host on the
      qemu command line, which means make the guest cpu the same as the host
      cpu.  This patch implements the same option for ppc targets.
      
      For now, this just read the host PVR (Processor Version Register) and
      selects one of our existing CPU specs based on it.  This means that the
      option will not work if the host cpu is not supported by TCG, even if that
      wouldn't matter for use under kvm.
      
      In future, we can extend this in future to override parts of the cpu spec
      based on information obtained from the host (via /proc/cpuinfo, the host
      device tree, or explicit KVM calls).  That will let us handle cases where
      the real kvm-virtualized CPU doesn't behave exactly like the TCG-emulated
      CPU.  With appropriate annotation of the CPU specs we'll also then be able
      to use host cpus under kvm even when there isn't a matching full TCG model.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a1e98583
    • D
      ppc: Remove broken partial PVR matching · be40edcd
      David Gibson 提交于
      The ppc target contains a ppc_find_by_pvr() function, which looks up a
      CPU spec based on a PVR (that is, based on the value in the target cpu's
      Processor Version Register).  PVR values contain information on both the
      cpu model (upper 16 bits, usually) and on the precise revision (low 16
      bits, usually).
      
      ppc_find_by_pvr, as well as making exact PVR matches, attempts to find
      "close" PVR matches, when we don't have a CPU spec for the exact revision
      specified.  This sounds like a good idea, execpt that the current logic
      is completely nonsensical.
      
      It seems to assume CPU families are subdivided bit by bit in the PVR in a
      way they just aren't.  Specifically, it requires a match on all bits of the
      specified pvr up to the last non-zero bit.  This has the bizarre effect
      that when the low bits are simply a sequential revision number (a common
      though not universal pattern), then odd specified revisions must be matched
      exactly, whereas even specified revisions will also match the next odd
      revision, likewise for powers of 4, 8 and so forth.
      
      To correctly do inexact matching we'd need to re-organize the table of CPU
      specs to include a mask showing what PVR range the spec is compatible with
      (similar to the cputable code in the Linux kernel).
      
      For now, just remove the bogosity by only permitting exact PVR matches.
      That at least makes the matching simple and consistent.  If we need inexact
      matching we can add the necessary per-subfamily masks later.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      be40edcd
  14. 06 10月, 2011 3 次提交
  15. 21 8月, 2011 1 次提交