1. 27 6月, 2014 9 次提交
    • A
      spapr_iommu: Make in-kernel TCE table optional · 9bb62a07
      Alexey Kardashevskiy 提交于
      POWER KVM supports an KVM_CAP_SPAPR_TCE capability which allows allocating
      TCE tables in the host kernel memory and handle H_PUT_TCE requests
      targeted to specific LIOBN (logical bus number) right in the host without
      switching to QEMU. At the moment this is used for emulated devices only
      and the handler only puts TCE to the table. If the in-kernel H_PUT_TCE
      handler finds a LIOBN and corresponding table, it will put a TCE to
      the table and complete hypercall execution. The user space will not be
      notified.
      
      Upcoming VFIO support is going to use the same sPAPRTCETable device class
      so KVM_CAP_SPAPR_TCE is going to be used as well. That means that TCE
      tables for VFIO are going to be allocated in the host as well.
      However VFIO operates with real IOMMU tables and simple copying of
      a TCE to the real hardware TCE table will not work as guest physical
      to host physical address translation is requited.
      
      So until the host kernel gets VFIO support for H_PUT_TCE, we better not
      to register VFIO's TCE in the host.
      
      This adds a place holder for KVM_CAP_SPAPR_TCE_VFIO capability. It is not
      in upstream yet and being discussed so now it is always false which means
      that in-kernel VFIO acceleration is not supported.
      
      This adds a bool @vfio_accel flag to the sPAPRTCETable device telling
      that sPAPRTCETable should not try allocating TCE table in the host kernel
      for VFIO. The flag is false now as at the moment there is no VFIO.
      
      This adds an vfio_accel parameter to spapr_tce_new_table(), the semantic
      is the same. Since there is only emulated PCI and VIO now, the flag is set
      to false. Upcoming VFIO support will set it to true.
      
      This is a preparation patch so no change in behaviour is expected
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      9bb62a07
    • A
      spapr: Fix RTAS token numbers · 3a3b8502
      Alexey Kardashevskiy 提交于
      At the moment spapr_rtas_register() allocates a new token number for every
      new RTAS callback so numbers are not fixed and depend on the number of
      supported RTAS handlers and the exact order of spapr_rtas_register() calls.
      These tokens are copied into the device tree and remain the same during
      the guest lifetime.
      
      When we start another guest to receive a migration, it calls
      spapr_rtas_register() as well. If the number of RTAS handlers or their
      order is different in QEMU on source and destination sides, the "/rtas"
      node in the device tree will differ. Since migration overwrites the device
      tree (as it overwrites the entire RAM), the actual RTAS config on
      the destination side gets broken.
      
      This defines global contant values for every RTAS token which QEMU
      is using today.
      
      This changes spapr_rtas_register() to accept a token number instead of
      allocating one. This changes all users of spapr_rtas_register().
      
      This changes XICS-KVM not to cache tokens registered with KVM as they
      constant now.
      
      This makes TOKEN_BASE global as RTAS_XXX use TOKEN_BASE as
      a base. TOKEN_MAX is moved and renamed too and its value is changed
      to the last token + 1. Boundary checks for token values are adjusted.
      
      This reserves token numbers for "os-term" handlers and PCI hotplug
      which we are working on.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      3a3b8502
    • A
      PPC: Add support for Apple gdb in gdbstub · b3cad3ab
      Alexander Graf 提交于
      The Apple gdbstub protocol is different from the normal gdbstub protocol
      used on PowerPC. Add support for the different variant, so that we can use
      Apple's gdb to debug guest code.
      
      Keep in mind that the switch is a compile time option. We can't detect
      during runtime whether a gdb connecting to us is an upstream gdb or an
      Apple gdb.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b3cad3ab
    • S
      target-ppc: fixed translation of mcrxr instruction · 294d1292
      Sorav Bansal 提交于
      Fixed bug in gen_mcrxr() in target-ppc/translate.c:
      The XER[SO], XER[OV], and XER[CA] flags are stored in the least
      significant bit (bit 0) of their respective registers. They need
      to be shifted left (by their respective offsets) to generate the final
      XER value. The old translation code for the 'mcrxr' instruction
      was assuming that  the flags are stored in bit 2, and was shifting them
      right (incorrectly)
      Signed-off-by: NSorav Bansal <sbansal@cse.iitd.ernet.in>
      Reviewed-by: NTom Musta <tommusta@gmail.com>
      Tested-by: NTom Musta <tommusta@gmail.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      294d1292
    • A
      spapr: Add "qemu, boot-menu" property to /chosen · cc84c0f3
      Avik Sil 提交于
      This is required to enable boot menu display during booting
      Signed-off-by: NAvik Sil <aviksil@linux.vnet.ibm.com>
      Signed-off-by: NNikunj A Dadhania <nikunj@linux.vnet.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      cc84c0f3
    • T
      linux-user: Support HWCAP2 in PowerPC · a60438dd
      Tom Musta 提交于
      Set bits in the AT_HWCAP2 entry of the AUXV.  Specifically, detect and set bits
      for bctar, ISEL and ISA 2.07.
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a60438dd
    • T
      linux-user: Identify Addition Hardware Capabilities for PowerPC · 0e019746
      Tom Musta 提交于
      Add VSX, DFP and ISA 2.06 to the bits identified in the AT_HWCAP
      entry of the AUXV.
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      0e019746
    • T
      target-ppc: Add DFP to Emulated Instructions Flag · b2f13550
      Tom Musta 提交于
      Decimal Floating Point is emulated, so add it the mask.  This will
      fix the erroneous message:
      
        Warning: Disabling some instructions which are not emulated by TCG (0x0, 0x4)
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b2f13550
    • T
      linux-user: Correct AUXV Cache Line Sizes for PowerPC · 623e250a
      Tom Musta 提交于
      Set the AT_ICACHEBSIZE and AT_DCACHEBSIZE entries of the AUXV to match the
      CPU model's cache line sizes.  This fixes memory clobbering problems on more
      recent Book 3s implementations; memset(p, 0, N) will use the dcbz instruction
      when N is sufficiently large and many of the newer server CPUs have cache lines
      sizes of 128 bytes.
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      623e250a
  2. 26 6月, 2014 23 次提交
  3. 25 6月, 2014 8 次提交