Merge branch 'kvm-updates/2.6.39' of git://git.kernel.org/pub/scm/virt/kvm/kvm
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Mar 2011 01:40:35 +0000 (18:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Mar 2011 01:40:35 +0000 (18:40 -0700)
* 'kvm-updates/2.6.39' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (55 commits)
  KVM: unbreak userspace that does not sets tss address
  KVM: MMU: cleanup pte write path
  KVM: MMU: introduce a common function to get no-dirty-logged slot
  KVM: fix rcu usage in init_rmode_* functions
  KVM: fix kvmclock regression due to missing clock update
  KVM: emulator: Fix permission checking in io permission bitmap
  KVM: emulator: Fix io permission checking for 64bit guest
  KVM: SVM: Load %gs earlier if CONFIG_X86_32_LAZY_GS=n
  KVM: x86: Remove useless regs_page pointer from kvm_lapic
  KVM: improve comment on rcu use in irqfd_deassign
  KVM: MMU: remove unused macros
  KVM: MMU: cleanup page alloc and free
  KVM: MMU: do not record gfn in kvm_mmu_pte_write
  KVM: MMU: move mmu pages calculated out of mmu lock
  KVM: MMU: set spte accessed bit properly
  KVM: MMU: fix kvm_mmu_slot_remove_write_access dropping intermediate W bits
  KVM: Start lock documentation
  KVM: better readability of efer_reserved_bits
  KVM: Clear async page fault hash after switching to real mode
  KVM: VMX: Initialize vm86 TSS only once.
  ...

1  2 
include/linux/mm.h

diff --combined include/linux/mm.h
@@@ -402,23 -402,16 +402,23 @@@ static inline void init_page_count(stru
  /*
   * PageBuddy() indicate that the page is free and in the buddy system
   * (see mm/page_alloc.c).
 + *
 + * PAGE_BUDDY_MAPCOUNT_VALUE must be <= -2 but better not too close to
 + * -2 so that an underflow of the page_mapcount() won't be mistaken
 + * for a genuine PAGE_BUDDY_MAPCOUNT_VALUE. -128 can be created very
 + * efficiently by most CPU architectures.
   */
 +#define PAGE_BUDDY_MAPCOUNT_VALUE (-128)
 +
  static inline int PageBuddy(struct page *page)
  {
 -      return atomic_read(&page->_mapcount) == -2;
 +      return atomic_read(&page->_mapcount) == PAGE_BUDDY_MAPCOUNT_VALUE;
  }
  
  static inline void __SetPageBuddy(struct page *page)
  {
        VM_BUG_ON(atomic_read(&page->_mapcount) != -1);
 -      atomic_set(&page->_mapcount, -2);
 +      atomic_set(&page->_mapcount, PAGE_BUDDY_MAPCOUNT_VALUE);
  }
  
  static inline void __ClearPageBuddy(struct page *page)
@@@ -972,6 -965,10 +972,10 @@@ static inline int handle_mm_fault(struc
  extern int make_pages_present(unsigned long addr, unsigned long end);
  extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
  
+ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+                    unsigned long start, int len, unsigned int foll_flags,
+                    struct page **pages, struct vm_area_struct **vmas,
+                    int *nonblocking);
  int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                        unsigned long start, int nr_pages, int write, int force,
                        struct page **pages, struct vm_area_struct **vmas);
@@@ -1535,6 -1532,7 +1539,7 @@@ struct page *follow_page(struct vm_area
  #define FOLL_FORCE    0x10    /* get_user_pages read/write w/o permission */
  #define FOLL_MLOCK    0x40    /* mark page as mlocked */
  #define FOLL_SPLIT    0x80    /* don't return transhuge pages, split them */
+ #define FOLL_HWPOISON 0x100   /* check page is hwpoisoned */
  
  typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
                        void *data);
@@@ -1627,14 -1625,6 +1632,6 @@@ extern int sysctl_memory_failure_recove
  extern void shake_page(struct page *p, int access);
  extern atomic_long_t mce_bad_pages;
  extern int soft_offline_page(struct page *page, int flags);
- #ifdef CONFIG_MEMORY_FAILURE
- int is_hwpoison_address(unsigned long addr);
- #else
- static inline int is_hwpoison_address(unsigned long addr)
- {
-       return 0;
- }
- #endif
  
  extern void dump_page(struct page *page);