1. 23 6月, 2016 7 次提交
  2. 22 6月, 2016 6 次提交
    • A
      memory: Add reporting of supported page sizes · f682e9c2
      Alexey Kardashevskiy 提交于
      Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate
      uses when translating, however this information is not available outside
      the translate context for various checks.
      
      This adds a get_min_page_size callback to MemoryRegionIOMMUOps and
      a wrapper for it so IOMMU users (such as VFIO) can know the minimum
      actual page size supported by an IOMMU.
      
      As IOMMU MR represents a guest IOMMU, this uses TARGET_PAGE_SIZE
      as fallback.
      
      This removes vfio_container_granularity() and uses new helper in
      memory_region_iommu_replay() when replaying IOMMU mappings on added
      IOMMU memory region.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Acked-by: NAlex Williamson <alex.williamson@redhat.com>
      [dwg: Removed an unnecessary calculation]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      f682e9c2
    • B
      ppc: Improve emulation of THRM registers · f0278900
      Benjamin Herrenschmidt 提交于
      The 75x and 74xx processors have some thermal monitoring SPRs that
      some OSes such as MacOS do use. Our current "dumb" implementation
      isn't good enough and will cause some versions of MacOS to hang during
      boot.
      
      This lifts an improved emulation from MacOnLinux and adapts it to
      qemu, thus fixing the problem.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [dwg: Fixed typo in comment, a number of minor checkpatch warnings,
       and a compile failure with CONFIG_USER_ONLY]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      f0278900
    • R
      target-ppc: Fix rlwimi, rlwinm, rlwnm again · 820724d1
      Richard Henderson 提交于
      In 63ae0915, I arranged to use a 32-bit rotate, without
      considering the effect of a mask value that wraps around to
      the high bits of the word.
      
      [dwg: In 2e11b15d this was partially fixed, but an edge case was still
      incorrect, which this fixes]
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      [dwg: Folded with a revert of 2e11b15d, an earlier buggy version of
       this patch which already went upstream]
      Tested-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      820724d1
    • L
      ppc64: disable gen_pause() for linux-user mode · 7f2b1744
      Laurent Vivier 提交于
      While trying to install a fedora container with
      "lxc-create -t fedora -- -I qemu-ppc64" the installation abort with
      the following error:
      
      qemu: fatal: Unknown exception 0x65537. Aborting
      
      NIP 0000004000927924   LR 00000040009e325c CTR 0000004000927480 XER 0000000000000000 CPU#0
      MSR 9000000102806000 HID0 0000000000000000  HF 9000000002806000 iidx 3 didx 3
      TB 00248932 1069155773327487
      GPR00 00000040009e325c 00000040007ff800 0000004000aba098 0000000000000000
      GPR04 00000040007ff878 0000004000dcb588 0000004000dcb830 0000004000a7a098
      GPR08 0000000000000000 0000000000000000 00000040007ff878 0000004000927960
      GPR12 0000000022022448 0000004000e2aef0 0000000000000000 0000000000000000
      GPR16 0000000000000000 0000000000000000 0000000000000002 0000000000000001
      GPR20 0000000000000000 0000000000000000 0000000000000000 0000004000800699
      GPR24 0000004000e13320 0000000000000000 0000004000ac9ad8 0000004000ac9ae0
      GPR28 0000000000000001 00000000100210a0 0000000000000000 0000000000000038
      CR 22022442  [ E  E  -  E  E  G  G  E  ]             RES ffffffffffffffff
      FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      FPSCR 0000000000000000
      /usr/share/lxc/templates/lxc-fedora: line 487: 26661 Aborted                 (core dumped) chroot . yum -y --nogpgcheck --installroot /run/install install python rpm yum
      
      I've bisected until the commit:
      
          commit b68e60e6
          Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
          Date:   Tue May 3 18:03:33 2016 +0200
      
              ppc: Get out of emulation on SMT "OR" ops
      
              Otherwise tight loops at smt_low for example, which OPAL does,
              eat so much CPU that we can't boot a kernel anymore. With that,
              I can boot 8 CPUs just fine with powernv.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      
      We can fix that by preventing to send EXCP_HLT in the case of linux-user mode,
      as the main loop doesn't know how to manage it.
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      7f2b1744
    • T
      tests: Use '+=' to add additional tests, not '=' · 0ccac16f
      Thomas Huth 提交于
      The recent commit that added the prom-env-test accidentially
      overwrote the check-qtest-ppc-y, check-qtest-ppc64-y and
      check-qtest-sparc-y variables instead of extending them.
      
      Fixes: fcbf4a3cSigned-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      0ccac16f
    • A
      powerpc/mm: Update the WIMG check during H_ENTER · c1175907
      Aneesh Kumar K.V 提交于
      Support for 0 value for memeory coherence is optional and with ppc64
      we can always enable memory coherence. Linux kernel did that during
      the development of 4.7 kernel. But that resulted in failure in Qemu
      in H_ENTER hcall due to below check. The mentioned change was reverted
      in the kernel and kernel right now enable memory coherence only if
      cache inhibited is not set. Nevertheless update qemu WIMG flag check
      to cover the case where we enable memory coherence along with cache
      inhibited flag.
      
      In order to handle older and newer kernel version consider both Cache
      inhibitted and (cache inhibitted | memory conference) as valid values
      for wimg flags.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      c1175907
  3. 21 6月, 2016 27 次提交