Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Mar 2016 16:55:35 +0000 (09:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Mar 2016 16:55:35 +0000 (09:55 -0700)
Pull KVM updates from Paolo Bonzini:
 "One of the largest releases for KVM...  Hardly any generic
  changes, but lots of architecture-specific updates.

  ARM:
   - VHE support so that we can run the kernel at EL2 on ARMv8.1 systems
   - PMU support for guests
   - 32bit world switch rewritten in C
   - various optimizations to the vgic save/restore code.

  PPC:
   - enabled KVM-VFIO integration ("VFIO device")
   - optimizations to speed up IPIs between vcpus
   - in-kernel handling of IOMMU hypercalls
   - support for dynamic DMA windows (DDW).

  s390:
   - provide the floating point registers via sync regs;
   - separated instruction vs.  data accesses
   - dirty log improvements for huge guests
   - bugfixes and documentation improvements.

  x86:
   - Hyper-V VMBus hypercall userspace exit
   - alternative implementation of lowest-priority interrupts using
     vector hashing (for better VT-d posted interrupt support)
   - fixed guest debugging with nested virtualizations
   - improved interrupt tracking in the in-kernel IOAPIC
   - generic infrastructure for tracking writes to guest
     memory - currently its only use is to speedup the legacy shadow
     paging (pre-EPT) case, but in the future it will be used for
     virtual GPUs as well
   - much cleanup (LAPIC, kvmclock, MMU, PIT), including ubsan fixes"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (217 commits)
  KVM: x86: remove eager_fpu field of struct kvm_vcpu_arch
  KVM: x86: disable MPX if host did not enable MPX XSAVE features
  arm64: KVM: vgic-v3: Only wipe LRs on vcpu exit
  arm64: KVM: vgic-v3: Reset LRs at boot time
  arm64: KVM: vgic-v3: Do not save an LR known to be empty
  arm64: KVM: vgic-v3: Save maintenance interrupt state only if required
  arm64: KVM: vgic-v3: Avoid accessing ICH registers
  KVM: arm/arm64: vgic-v2: Make GICD_SGIR quicker to hit
  KVM: arm/arm64: vgic-v2: Only wipe LRs on vcpu exit
  KVM: arm/arm64: vgic-v2: Reset LRs at boot time
  KVM: arm/arm64: vgic-v2: Do not save an LR known to be empty
  KVM: arm/arm64: vgic-v2: Move GICH_ELRSR saving to its own function
  KVM: arm/arm64: vgic-v2: Save maintenance interrupt state only if required
  KVM: arm/arm64: vgic-v2: Avoid accessing GICH registers
  KVM: s390: allocate only one DMA page per VM
  KVM: s390: enable STFLE interpretation only if enabled for the guest
  KVM: s390: wake up when the VCPU cpu timer expires
  KVM: s390: step the VCPU timer while in enabled wait
  KVM: s390: protect VCPU cpu timer with a seqcount
  KVM: s390: step VCPU cpu timer during kvm_run ioctl
  ...

18 files changed:
1  2 
Documentation/virtual/kvm/mmu.txt
arch/arm/kvm/arm.c
arch/arm/kvm/guest.c
arch/arm64/kvm/guest.c
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kernel/smp.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/interrupt.c
arch/s390/kvm/kvm-s390.c
arch/x86/kvm/lapic.c
arch/x86/kvm/mmu.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
drivers/clocksource/arm_arch_timer.c
virt/kvm/async_pf.c
virt/kvm/kvm_main.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index f0dd9d42bc7b1c9b55f48719cd0f3ded16bbe00f,ffe9d1c6b5884637c3c5c00153565a7fc8730235..5152b389815500a77a95cffe69a0602379d4f570
@@@ -271,16 -263,20 +271,22 @@@ static void __arch_timer_setup(unsigne
                clk->name = "arch_sys_timer";
                clk->rating = 450;
                clk->cpumask = cpumask_of(smp_processor_id());
-               if (arch_timer_use_virtual) {
-                       clk->irq = arch_timer_ppi[VIRT_PPI];
+               clk->irq = arch_timer_ppi[arch_timer_uses_ppi];
+               switch (arch_timer_uses_ppi) {
+               case VIRT_PPI:
                        clk->set_state_shutdown = arch_timer_shutdown_virt;
 +                      clk->set_state_oneshot_stopped = arch_timer_shutdown_virt;
                        clk->set_next_event = arch_timer_set_next_event_virt;
-               } else {
-                       clk->irq = arch_timer_ppi[PHYS_SECURE_PPI];
+                       break;
+               case PHYS_SECURE_PPI:
+               case PHYS_NONSECURE_PPI:
+               case HYP_PPI:
                        clk->set_state_shutdown = arch_timer_shutdown_phys;
 +                      clk->set_state_oneshot_stopped = arch_timer_shutdown_phys;
                        clk->set_next_event = arch_timer_set_next_event_phys;
+                       break;
+               default:
+                       BUG();
                }
        } else {
                clk->features |= CLOCK_EVT_FEAT_DYNIRQ;
Simple merge
index 5af50c3ddd535a5094b8de788bd88cc17085fb17,1eae05236347f1d1c4c6cc9912a524a845c53218..7ba1d10ffed2d5a416701153caea619c7ab22f8d
@@@ -1942,18 -1946,16 +1945,19 @@@ EXPORT_SYMBOL_GPL(kvm_vcpu_mark_page_di
  
  static void grow_halt_poll_ns(struct kvm_vcpu *vcpu)
  {
-       int old, val;
+       unsigned int old, val, grow;
  
        old = val = vcpu->halt_poll_ns;
+       grow = READ_ONCE(halt_poll_ns_grow);
        /* 10us base */
-       if (val == 0 && halt_poll_ns_grow)
+       if (val == 0 && grow)
                val = 10000;
        else
-               val *= halt_poll_ns_grow;
+               val *= grow;
  
 +      if (val > halt_poll_ns)
 +              val = halt_poll_ns;
 +
        vcpu->halt_poll_ns = val;
        trace_kvm_halt_poll_ns_grow(vcpu->vcpu_id, val, old);
  }