]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Sep 2013 01:15:06 +0000 (18:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Sep 2013 01:15:06 +0000 (18:15 -0700)
Pull KVM updates from Gleb Natapov:
 "The highlights of the release are nested EPT and pv-ticketlocks
  support (hypervisor part, guest part, which is most of the code, goes
  through tip tree).  Apart of that there are many fixes for all arches"

Fix up semantic conflicts as discussed in the pull request thread..

* 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (88 commits)
  ARM: KVM: Add newlines to panic strings
  ARM: KVM: Work around older compiler bug
  ARM: KVM: Simplify tracepoint text
  ARM: KVM: Fix kvm_set_pte assignment
  ARM: KVM: vgic: Bump VGIC_NR_IRQS to 256
  ARM: KVM: Bugfix: vgic_bytemap_get_reg per cpu regs
  ARM: KVM: vgic: fix GICD_ICFGRn access
  ARM: KVM: vgic: simplify vgic_get_target_reg
  KVM: MMU: remove unused parameter
  KVM: PPC: Book3S PR: Rework kvmppc_mmu_book3s_64_xlate()
  KVM: PPC: Book3S PR: Make instruction fetch fallback work for system calls
  KVM: PPC: Book3S PR: Don't corrupt guest state when kernel uses VMX
  KVM: x86: update masterclock when kvmclock_offset is calculated (v2)
  KVM: PPC: Book3S: Fix compile error in XICS emulation
  KVM: PPC: Book3S PR: return appropriate error when allocation fails
  arch: powerpc: kvm: add signed type cast for comparation
  KVM: x86: add comments where MMIO does not return to the emulator
  KVM: vmx: count exits to userspace during invalid guest emulation
  KVM: rename __kvm_io_bus_sort_cmp to kvm_io_bus_cmp
  kvm: optimize away THP checks in kvm_is_mmio_pfn()
  ...

12 files changed:
1  2 
arch/arm/configs/keystone_defconfig
arch/arm/configs/omap2plus_defconfig
arch/arm/configs/tegra_defconfig
arch/powerpc/kernel/asm-offsets.c
arch/s390/include/asm/mmu_context.h
arch/s390/include/asm/pgtable.h
arch/s390/include/asm/processor.h
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/priv.c
arch/s390/mm/pgtable.c
include/linux/sched.h
kernel/sched/core.c

index 62e968cac9dc132f66c7c2d397c689a19aeda295,62e968cac9dc132f66c7c2d397c689a19aeda295..1f36b823905f1d6e1c16eeb9e0554efc1678bcf0
@@@ -104,6 -104,6 +104,7 @@@ CONFIG_IP_SCTP=
  CONFIG_VLAN_8021Q=y
  CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
  CONFIG_CMA=y
++CONFIG_DMA_CMA=y
  CONFIG_MTD=y
  CONFIG_MTD_CMDLINE_PARTS=y
  CONFIG_MTD_BLOCK=y
index 5339e6a4d639dccaca9144eb0df3101b692d0df2,5339e6a4d639dccaca9144eb0df3101b692d0df2..5465f564fdf3c8e5a9af125182f6fdfd983e5ab1
@@@ -78,6 -78,6 +78,7 @@@ CONFIG_MAC80211_RC_PID=
  CONFIG_MAC80211_RC_DEFAULT_PID=y
  CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
  CONFIG_CMA=y
++CONFIG_DMA_CMA=y
  CONFIG_CONNECTOR=y
  CONFIG_DEVTMPFS=y
  CONFIG_DEVTMPFS_MOUNT=y
index 1effb43dab80833f2b0df2a520fc61f7f2db6028,1effb43dab80833f2b0df2a520fc61f7f2db6028..92d0a149aeb5e58094ad3d3765fec5e878065d4a
@@@ -79,6 -79,6 +79,7 @@@ CONFIG_DEVTMPFS=
  CONFIG_DEVTMPFS_MOUNT=y
  # CONFIG_FIRMWARE_IN_KERNEL is not set
  CONFIG_CMA=y
++CONFIG_DMA_CMA=y
  CONFIG_MTD=y
  CONFIG_MTD_M25P80=y
  CONFIG_PROC_DEVICETREE=y
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 6d16132d08501bb40fd4598d4dae951601bd37b5,967d0bf1c059593002acff3aca0bcbfeaa3824bd..bf7c0dc64a76111d307b7b48585cc40ecb6741aa
@@@ -751,11 -755,10 +756,11 @@@ static inline unsigned long *page_table
        mp->vmaddr = vmaddr & PMD_MASK;
        INIT_LIST_HEAD(&mp->mapper);
        page->index = (unsigned long) mp;
-       atomic_set(&page->_mapcount, 3);
+       atomic_set(&page->_mapcount, 0);
        table = (unsigned long *) page_to_phys(page);
 -      clear_table(table, _PAGE_TYPE_EMPTY, PAGE_SIZE/2);
 -      clear_table(table + PTRS_PER_PTE, 0, PAGE_SIZE/2);
 +      clear_table(table, _PAGE_INVALID, PAGE_SIZE/2);
 +      clear_table(table + PTRS_PER_PTE, PGSTE_HR_BIT | PGSTE_HC_BIT,
 +                  PAGE_SIZE/2);
        return table;
  }
  
@@@ -1069,57 -1166,16 +1163,16 @@@ int s390_enable_sie(void
        if (mm_has_pgste(tsk->mm))
                return 0;
  
-       /* lets check if we are allowed to replace the mm */
-       task_lock(tsk);
-       if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
- #ifdef CONFIG_AIO
-           !hlist_empty(&tsk->mm->ioctx_list) ||
- #endif
-           tsk->mm != tsk->active_mm) {
-               task_unlock(tsk);
-               return -EINVAL;
-       }
-       task_unlock(tsk);
-       /* we copy the mm and let dup_mm create the page tables with_pgstes */
-       tsk->mm->context.alloc_pgste = 1;
-       /* make sure that both mms have a correct rss state */
-       sync_mm_rss(tsk->mm);
-       mm = dup_mm(tsk);
-       tsk->mm->context.alloc_pgste = 0;
-       if (!mm)
-               return -ENOMEM;
- #ifdef CONFIG_TRANSPARENT_HUGEPAGE
+       down_write(&mm->mmap_sem);
        /* split thp mappings and disable thp for future mappings */
        thp_split_mm(mm);
-       mm->def_flags |= VM_NOHUGEPAGE;
- #endif
-       /* Now lets check again if something happened */
-       task_lock(tsk);
-       if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
- #ifdef CONFIG_AIO
-           !hlist_empty(&tsk->mm->ioctx_list) ||
- #endif
-           tsk->mm != tsk->active_mm) {
-               mmput(mm);
-               task_unlock(tsk);
-               return -EINVAL;
-       }
-       /* ok, we are alone. No ptrace, no threads, etc. */
-       old_mm = tsk->mm;
-       tsk->mm = tsk->active_mm = mm;
-       preempt_disable();
-       update_mm(mm, tsk);
-       atomic_inc(&mm->context.attach_count);
-       atomic_dec(&old_mm->context.attach_count);
-       cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
-       preempt_enable();
-       task_unlock(tsk);
-       mmput(old_mm);
-       return 0;
+       /* Reallocate the page tables with pgstes */
+       mm->context.has_pgste = 1;
 -      tlb_gather_mmu(&tlb, mm, 0);
++      tlb_gather_mmu(&tlb, mm, 0, TASK_SIZE);
+       page_table_realloc(&tlb, mm, 0, TASK_SIZE);
 -      tlb_finish_mmu(&tlb, 0, -1);
++      tlb_finish_mmu(&tlb, 0, TASK_SIZE);
+       up_write(&mm->mmap_sem);
+       return mm->context.has_pgste ? 0 : -ENOMEM;
  }
  EXPORT_SYMBOL_GPL(s390_enable_sie);
  
Simple merge
Simple merge