Merge tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 5 May 2013 21:47:31 +0000 (14:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 5 May 2013 21:47:31 +0000 (14:47 -0700)
Pull kvm updates from Gleb Natapov:
 "Highlights of the updates are:

  general:
   - new emulated device API
   - legacy device assignment is now optional
   - irqfd interface is more generic and can be shared between arches

  x86:
   - VMCS shadow support and other nested VMX improvements
   - APIC virtualization and Posted Interrupt hardware support
   - Optimize mmio spte zapping

  ppc:
    - BookE: in-kernel MPIC emulation with irqfd support
    - Book3S: in-kernel XICS emulation (incomplete)
    - Book3S: HV: migration fixes
    - BookE: more debug support preparation
    - BookE: e6500 support

  ARM:
   - reworking of Hyp idmaps

  s390:
   - ioeventfd for virtio-ccw

  And many other bug fixes, cleanups and improvements"

* tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits)
  kvm: Add compat_ioctl for device control API
  KVM: x86: Account for failing enable_irq_window for NMI window request
  KVM: PPC: Book3S: Add API for in-kernel XICS emulation
  kvm/ppc/mpic: fix missing unlock in set_base_addr()
  kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write
  kvm/ppc/mpic: remove users
  kvm/ppc/mpic: fix mmio region lists when multiple guests used
  kvm/ppc/mpic: remove default routes from documentation
  kvm: KVM_CAP_IOMMU only available with device assignment
  ARM: KVM: iterate over all CPUs for CPU compatibility check
  KVM: ARM: Fix spelling in error message
  ARM: KVM: define KVM_ARM_MAX_VCPUS unconditionally
  KVM: ARM: Fix API documentation for ONE_REG encoding
  ARM: KVM: promote vfp_host pointer to generic host cpu context
  ARM: KVM: add architecture specific hook for capabilities
  ARM: KVM: perform HYP initilization for hotplugged CPUs
  ARM: KVM: switch to a dual-step HYP init code
  ARM: KVM: rework HYP page table freeing
  ARM: KVM: enforce maximum size for identity mapped code
  ARM: KVM: move to a KVM provided HYP idmap
  ...

18 files changed:
1  2 
arch/arm/kernel/asm-offsets.c
arch/arm/kvm/arm.c
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/e500mc.c
arch/powerpc/sysdev/xics/icp-native.c
arch/x86/include/uapi/asm/msr-index.h
arch/x86/kernel/irq.c
arch/x86/kvm/lapic.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
drivers/s390/kvm/virtio_ccw.c
include/linux/kvm_host.h
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
index f77df1c5de6eeb4ac341b9a9ac7f6afdb054b658,e29883c604ff02c232a769663cf33a4d6f80379c..e1adbb4aca753657bfa246ecf56e3b52b130a9ab
@@@ -1857,9 -1854,37 +1854,37 @@@ int kvm_lapic_enable_pv_eoi(struct kvm_
        if (!pv_eoi_enabled(vcpu))
                return 0;
        return kvm_gfn_to_hva_cache_init(vcpu->kvm, &vcpu->arch.pv_eoi.data,
 -                                       addr);
 +                                       addr, sizeof(u8));
  }
  
+ void kvm_apic_accept_events(struct kvm_vcpu *vcpu)
+ {
+       struct kvm_lapic *apic = vcpu->arch.apic;
+       unsigned int sipi_vector;
+       if (!kvm_vcpu_has_lapic(vcpu))
+               return;
+       if (test_and_clear_bit(KVM_APIC_INIT, &apic->pending_events)) {
+               kvm_lapic_reset(vcpu);
+               kvm_vcpu_reset(vcpu);
+               if (kvm_vcpu_is_bsp(apic->vcpu))
+                       vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
+               else
+                       vcpu->arch.mp_state = KVM_MP_STATE_INIT_RECEIVED;
+       }
+       if (test_and_clear_bit(KVM_APIC_SIPI, &apic->pending_events) &&
+           vcpu->arch.mp_state == KVM_MP_STATE_INIT_RECEIVED) {
+               /* evaluate pending_events before reading the vector */
+               smp_rmb();
+               sipi_vector = apic->sipi_vector;
+               pr_debug("vcpu %d received sipi with vector # %x\n",
+                        vcpu->vcpu_id, sipi_vector);
+               kvm_vcpu_deliver_sipi_vector(vcpu, sipi_vector);
+               vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
+       }
+ }
  void kvm_lapic_init(void)
  {
        /* do not patch jump label more than once per second */
Simple merge
Simple merge
Simple merge
index fb877b59ec57a472e74e314a7c8afb98c245b64a,5948f2a7b0800a7152bd1a6bbed7010ef3431ed6..779dc5136291610f28361b7386151cc1bb4b9372
@@@ -166,7 -170,8 +170,7 @@@ static void virtio_ccw_kvm_notify(struc
  
        vcdev = to_vc_device(info->vq->vdev);
        ccw_device_get_schid(vcdev->cdev, &schid);
-       do_kvm_notify(schid, vq->index);
 -      info->cookie = do_kvm_notify(schid, virtqueue_get_queue_index(vq),
 -                                   info->cookie);
++      info->cookie = do_kvm_notify(schid, vq->index, info->cookie);
  }
  
  static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev,
Simple merge
Simple merge