1. 27 4月, 2013 18 次提交
  2. 17 4月, 2013 3 次提交
  3. 22 3月, 2013 7 次提交
  4. 17 3月, 2013 1 次提交
  5. 05 3月, 2013 3 次提交
  6. 28 2月, 2013 1 次提交
    • S
      hlist: drop the node parameter from iterators · b67bfe0d
      Sasha Levin 提交于
      I'm not sure why, but the hlist for each entry iterators were conceived
      
              list_for_each_entry(pos, head, member)
      
      The hlist ones were greedy and wanted an extra parameter:
      
              hlist_for_each_entry(tpos, pos, head, member)
      
      Why did they need an extra pos parameter? I'm not quite sure. Not only
      they don't really need it, it also prevents the iterator from looking
      exactly like the list iterator, which is unfortunate.
      
      Besides the semantic patch, there was some manual work required:
      
       - Fix up the actual hlist iterators in linux/list.h
       - Fix up the declaration of other iterators based on the hlist ones.
       - A very small amount of places were using the 'node' parameter, this
       was modified to use 'obj->member' instead.
       - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
       properly, so those had to be fixed up manually.
      
      The semantic patch which is mostly the work of Peter Senna Tschudin is here:
      
      @@
      iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
      
      type T;
      expression a,c,d,e;
      identifier b;
      statement S;
      @@
      
      -T b;
          <+... when != b
      (
      hlist_for_each_entry(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue(a,
      - b,
      c) S
      |
      hlist_for_each_entry_from(a,
      - b,
      c) S
      |
      hlist_for_each_entry_rcu(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_rcu_bh(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue_rcu_bh(a,
      - b,
      c) S
      |
      for_each_busy_worker(a, c,
      - b,
      d) S
      |
      ax25_uid_for_each(a,
      - b,
      c) S
      |
      ax25_for_each(a,
      - b,
      c) S
      |
      inet_bind_bucket_for_each(a,
      - b,
      c) S
      |
      sctp_for_each_hentry(a,
      - b,
      c) S
      |
      sk_for_each(a,
      - b,
      c) S
      |
      sk_for_each_rcu(a,
      - b,
      c) S
      |
      sk_for_each_from
      -(a, b)
      +(a)
      S
      + sk_for_each_from(a) S
      |
      sk_for_each_safe(a,
      - b,
      c, d) S
      |
      sk_for_each_bound(a,
      - b,
      c) S
      |
      hlist_for_each_entry_safe(a,
      - b,
      c, d, e) S
      |
      hlist_for_each_entry_continue_rcu(a,
      - b,
      c) S
      |
      nr_neigh_for_each(a,
      - b,
      c) S
      |
      nr_neigh_for_each_safe(a,
      - b,
      c, d) S
      |
      nr_node_for_each(a,
      - b,
      c) S
      |
      nr_node_for_each_safe(a,
      - b,
      c, d) S
      |
      - for_each_gfn_sp(a, c, d, b) S
      + for_each_gfn_sp(a, c, d) S
      |
      - for_each_gfn_indirect_valid_sp(a, c, d, b) S
      + for_each_gfn_indirect_valid_sp(a, c, d) S
      |
      for_each_host(a,
      - b,
      c) S
      |
      for_each_host_safe(a,
      - b,
      c, d) S
      |
      for_each_mesh_entry(a,
      - b,
      c, d) S
      )
          ...+>
      
      [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
      [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
      [akpm@linux-foundation.org: checkpatch fixes]
      [akpm@linux-foundation.org: fix warnings]
      [akpm@linux-foudnation.org: redo intrusive kvm changes]
      Tested-by: NPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b67bfe0d
  7. 15 2月, 2013 2 次提交
    • P
      powerpc/kvm/book3s_pr: Fix compilation on 32-bit machines · deb26c27
      Paul Mackerras 提交于
      Commit a413f474 ("powerpc: Disable relocation on exceptions whenever
      PR KVM is active") added calls to pSeries_disable_reloc_on_exc() and
      pSeries_enable_reloc_on_exc() to book3s_pr.c, and added declarations
      of those functions to <asm/hvcall.h>, but didn't add an include of
      <asm/hvcall.h> to book3s_pr.c.  64-bit kernels seem to get hvcall.h
      included via some other path, but 32-bit kernels fail to compile with:
      
      arch/powerpc/kvm/book3s_pr.c: In function ‘kvmppc_core_init_vm’:
      arch/powerpc/kvm/book3s_pr.c:1300:4: error: implicit declaration of function ‘pSeries_disable_reloc_on_exc’ [-Werror=implicit-function-declaration]
      arch/powerpc/kvm/book3s_pr.c: In function ‘kvmppc_core_destroy_vm’:
      arch/powerpc/kvm/book3s_pr.c:1316:4: error: implicit declaration of function ‘pSeries_enable_reloc_on_exc’ [-Werror=implicit-function-declaration]
      cc1: all warnings being treated as errors
      make[2]: *** [arch/powerpc/kvm/book3s_pr.o] Error 1
      make[1]: *** [arch/powerpc/kvm] Error 2
      make: *** [sub-make] Error 2
      
      This fixes it by adding an include of hvcall.h.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      deb26c27
    • P
      powerpc/kvm/book3s_hv: Preserve guest CFAR register value · 0acb9111
      Paul Mackerras 提交于
      The CFAR (Come-From Address Register) is a useful debugging aid that
      exists on POWER7 processors.  Currently HV KVM doesn't save or restore
      the CFAR register for guest vcpus, making the CFAR of limited use in
      guests.
      
      This adds the necessary code to capture the CFAR value saved in the
      early exception entry code (it has to be saved before any branch is
      executed), save it in the vcpu.arch struct, and restore it on entry
      to the guest.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      0acb9111
  8. 13 2月, 2013 3 次提交
  9. 25 1月, 2013 2 次提交
    • A
      KVM: PPC: E500: Remove kvmppc_e500_tlbil_all usage from guest TLB code · b9e3e208
      Alexander Graf 提交于
      The guest TLB handling code should not have any insight into how the host
      TLB shadow code works.
      
      kvmppc_e500_tlbil_all() is a function that is used for distinction between
      e500v2 and e500mc (E.HV) on how to flush shadow entries. This function really
      is private between the e500.c/e500mc.c file and e500_mmu_host.c.
      
      Instead of this one, use the public kvmppc_core_flush_tlb() function to flush
      all shadow TLB entries. As a nice side effect, with this we also end up
      flushing TLB1 entries which we forgot to do before.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b9e3e208
    • A
      KVM: PPC: E500: Make clear_tlb_refs and clear_tlb1_bitmap static · 483ba97c
      Alexander Graf 提交于
      Host shadow TLB flushing is logic that the guest TLB code should have
      no insight about. Declare the internal clear_tlb_refs and clear_tlb1_bitmap
      functions static to the host TLB handling file.
      
      Instead of these, we can use the already exported kvmppc_core_flush_tlb().
      This gives us a common API across the board to say "please flush any
      pending host shadow translation".
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      483ba97c