1. 10 1月, 2013 1 次提交
    • I
      powerpc: Disable relocation on exceptions whenever PR KVM is active · a413f474
      Ian Munsie 提交于
      For PR KVM we allow userspace to map 0xc000000000000000. Because
      transitioning from userspace to the guest kernel may use the relocated
      exception vectors we have to disable relocation on exceptions whenever
      PR KVM is active as we cannot trust that address.
      
      This issue does not apply to HV KVM, since changing from a guest to the
      hypervisor will never use the relocated exception vectors.
      
      Currently the hypervisor interface only allows us to toggle relocation
      on exceptions on a partition wide scope, so we need to globally disable
      relocation on exceptions when the first PR KVM instance is started and
      only re-enable them when all PR KVM instances have been destroyed.
      
      It's a bit heavy handed, but until the hypervisor gives us a lightweight
      way to toggle relocation on exceptions on a single thread it's only real
      option.
      Signed-off-by: NIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a413f474
  2. 15 11月, 2012 2 次提交
  3. 10 9月, 2012 1 次提交
  4. 14 5月, 2012 1 次提交
  5. 08 4月, 2012 1 次提交
    • P
      KVM: PPC: Book3S HV: Make virtual processor area registration more robust · 2e25aa5f
      Paul Mackerras 提交于
      The PAPR API allows three sorts of per-virtual-processor areas to be
      registered (VPA, SLB shadow buffer, and dispatch trace log), and
      furthermore, these can be registered and unregistered for another
      virtual CPU.  Currently we just update the vcpu fields pointing to
      these areas at the time of registration or unregistration.  If this
      is done on another vcpu, there is the possibility that the target vcpu
      is using those fields at the time and could end up using a bogus
      pointer and corrupting memory.
      
      This fixes the race by making the target cpu itself do the update, so
      we can be sure that the update happens at a time when the fields
      aren't being used.  Each area now has a struct kvmppc_vpa which is
      used to manage these updates.  There is also a spinlock which protects
      access to all of the kvmppc_vpa structs, other than to the pinned_addr
      fields.  (We could have just taken the spinlock when using the vpa,
      slb_shadow or dtl fields, but that would mean taking the spinlock on
      every guest entry and exit.)
      
      This also changes 'struct dtl' (which was undefined) to 'struct dtl_entry',
      which is what the rest of the kernel uses.
      
      Thanks to Michael Ellerman <michael@ellerman.id.au> for pointing out
      the need to initialize vcpu->arch.vpa_update_lock.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      2e25aa5f
  6. 12 7月, 2011 1 次提交
    • P
      KVM: PPC: Handle some PAPR hcalls in the kernel · a8606e20
      Paul Mackerras 提交于
      This adds the infrastructure for handling PAPR hcalls in the kernel,
      either early in the guest exit path while we are still in real mode,
      or later once the MMU has been turned back on and we are in the full
      kernel context.  The advantage of handling hcalls in real mode if
      possible is that we avoid two partition switches -- and this will
      become more important when we support SMT4 guests, since a partition
      switch means we have to pull all of the threads in the core out of
      the guest.  The disadvantage is that we can only access the kernel
      linear mapping, not anything vmalloced or ioremapped, since the MMU
      is off.
      
      This also adds code to handle the following hcalls in real mode:
      
      H_ENTER       Add an HPTE to the hashed page table
      H_REMOVE      Remove an HPTE from the hashed page table
      H_READ        Read HPTEs from the hashed page table
      H_PROTECT     Change the protection bits in an HPTE
      H_BULK_REMOVE Remove up to 4 HPTEs from the hashed page table
      H_SET_DABR    Set the data address breakpoint register
      
      Plus code to handle the following hcalls in the kernel:
      
      H_CEDE        Idle the vcpu until an interrupt or H_PROD hcall arrives
      H_PROD        Wake up a ceded vcpu
      H_REGISTER_VPA Register a virtual processor area (VPA)
      
      The code that runs in real mode has to be in the base kernel, not in
      the module, if KVM is compiled as a module.  The real-mode code can
      only access the kernel linear mapping, not vmalloc or ioremap space.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a8606e20
  7. 26 5月, 2011 1 次提交
  8. 04 5月, 2011 1 次提交
  9. 31 3月, 2011 1 次提交
  10. 29 11月, 2010 2 次提交
    • J
      powerpc: Add VPHN firmware feature · 36f567b4
      Jesse Larrew 提交于
      This simple patch adds the firmware feature for VPHN to the firmware
      features bitmask.
      Signed-off-by: NJesse Larrew <jlarrew@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      36f567b4
    • V
      powerpc: Add support for new hcall H_BEST_ENERGY · 5742bd85
      Vaidyanathan Srinivasan 提交于
      Create sysfs interface to export data from H_BEST_ENERGY hcall
      that can be used by administrative tools on supported pseries
      platforms for energy management	optimizations.
      
      sys/device/system/cpu/pseries_(de)activate_hint_list and
      sys/device/system/cpu/cpuN/pseries_(de)activate_hint will provide
      hints for activation and deactivation of cpus respectively.
      
      These hints are abstract number given by the hypervisor based
      on the extended knowledge the hypervisor has regarding the
      system topology and resource mappings.
      
      The activate and the deactivate sysfs entry is for the two
      distinct operations that we could do for energy savings.  When
      we have more capacity than required, we could deactivate few
      core to save energy.  The choice of the core to deactivate
      will be based on /sys/devices/system/cpu/deactivate_hint_list.
      The comma separated list of cpus (cores) will be the preferred
      choice.  If we have to activate some of the deactivated cores,
      then /sys/devices/system/cpu/activate_hint_list will be used.
      
      The per-cpu file
      /sys/device/system/cpu/cpuN/pseries_(de)activate_hint further
      provide more fine grain information by exporting the value of
      the hint itself.
      
      Added new driver module
      	arch/powerpc/platforms/pseries/pseries_energy.c
      under new config option CONFIG_PSERIES_ENERGY
      Signed-off-by: NVaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5742bd85
  11. 09 7月, 2010 1 次提交
  12. 21 5月, 2010 1 次提交
  13. 07 4月, 2010 1 次提交
  14. 24 11月, 2009 1 次提交
  15. 28 10月, 2009 1 次提交
    • A
      powerpc: tracing: Add hypervisor call tracepoints · c8cd093a
      Anton Blanchard 提交于
      Add hcall_entry and hcall_exit tracepoints.  This replaces the inline
      assembly HCALL_STATS code and converts it to use the new tracepoints.
      
      To keep the disabled case as quick as possible, we embed a status word
      in the TOC so we can get at it with a single load.  By doing so we
      keep the overhead at a minimum.  Time taken for a null hcall:
      
      No tracepoint code:	135.79 cycles
      Disabled tracepoints:	137.95 cycles
      
      For reference, before this patch enabling HCALL_STATS resulted in a null
      hcall of 201.44 cycles!
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c8cd093a
  16. 18 8月, 2008 1 次提交
  17. 04 8月, 2008 1 次提交
  18. 25 7月, 2008 2 次提交
  19. 11 7月, 2007 1 次提交
  20. 22 3月, 2007 1 次提交
  21. 07 2月, 2007 1 次提交
  22. 09 1月, 2007 1 次提交
    • A
      [POWERPC] Fix bugs in the hypervisor call stats code · dc40127c
      Anton Blanchard 提交于
      There were a few issues with the HCALL_STATS code:
      
      - PURR cpu feature checks were backwards
      - We iterated one entry off the end of the hcall_stats array
      - Remove dead update_hcall_stats() function prototype
      
      I noticed one thing while debugging, and that is we call H_ENTER (to set
      up the MMU hashtable in early init) before we have done the cpu fixups.
      This means we will execute the PURR SPR reads even on a CPU that isnt
      capable of it. I wonder if we can move the CPU feature fixups earlier.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      dc40127c
  23. 13 9月, 2006 1 次提交
  24. 01 8月, 2006 1 次提交
    • A
      [POWERPC] clean up pseries hcall interfaces · b9377ffc
      Anton Blanchard 提交于
      Our pseries hcall interfaces are out of control:
      
      	plpar_hcall_norets
      	plpar_hcall
      	plpar_hcall_8arg_2ret
      	plpar_hcall_4out
      	plpar_hcall_7arg_7ret
      	plpar_hcall_9arg_9ret
      
      Create 3 interfaces to cover all cases:
      
      	plpar_hcall_norets:	7 arguments no returns
      	plpar_hcall:		6 arguments 4 returns
      	plpar_hcall9:		9 arguments 9 returns
      
      There are only 2 cases in the kernel that need plpar_hcall9, hopefully
      we can keep it that way.
      
      Pass in a buffer to stash return parameters so we avoid the &dummy1,
      &dummy2 madness.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      --
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b9377ffc
  25. 31 7月, 2006 1 次提交
  26. 15 6月, 2006 1 次提交
  27. 01 4月, 2006 2 次提交
  28. 27 3月, 2006 1 次提交
    • P
      powerpc: Simplify pSeries idle loop · fbd7740f
      Paul Mackerras 提交于
      Since pSeries only wants to do something different in the idle loop when
      there is no work to do, we can simplify the code by implementing
      ppc_md.power_save functions instead of complete idle loops.  There are
      two versions: one for shared-processor partitions and one for dedicated-
      processor partitions.
      
      With this we also do a cede_processor() call on dedicated processor
      partitions if the poll_pending() call indicates that the hypervisor
      has work it wants to do.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      fbd7740f
  29. 13 1月, 2006 1 次提交
  30. 09 1月, 2006 1 次提交
  31. 10 11月, 2005 1 次提交
    • D
      [PATCH] powerpc: Move more ppc64 files with no ppc32 equivalent to powerpc · d3d2176a
      David Gibson 提交于
      This patch moves a bunch more files from arch/ppc64 and
      include/asm-ppc64 which have no equivalents in ppc32 code into
      arch/powerpc and include/asm-powerpc.  The file affected are:
      	hvcall.h
      	proc_ppc64.c
      	sysfs.c
      	lparcfg.c
      	rtas_pci.c
      
      The only changes apart from the move and corresponding Makefile
      changes are:
      	- #ifndef/#define in includes updated to _ASM_POWERPC_ form
      	- trailing whitespace removed
      	- comments giving full paths removed
      
      Built and booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64), built
      for 32-bit powermac (ARCH=powerpc).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d3d2176a
  32. 12 9月, 2005 1 次提交
  33. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4