[GIT PULL] First batch of KVM changes for 4.15

From: Radim KrÄmÃÅ
Date: Thu Nov 16 2017 - 12:04:34 EST


test merge showed a conflict in arch/arm64/kvm/inject_fault.c and
arch/arm/kvm/emulate.c that should be handled as in next.
(The desired result is the same as "pull -s recursive -X theirs".)

Also, a simple future merge conflict was reported with the kspp tree,

The following changes since commit 38c53af853069adf87181684370d7b8866d6387b:

KVM: PPC: Book3S HV: Fix exclusion between HPT resizing and other HPT updates (2017-11-08 15:14:02 +1100)

are available in the git repository at:

git://git.kernel.org/pub/scm/virt/kvm/kvm tags/kvm-4.15-1

for you to fetch changes up to a6014f1ab7088dc02b58991cfb6b32a34afdbf12:

Merge tag 'kvm-s390-next-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux (2017-11-16 14:39:46 +0100)

First batch of KVM changes for 4.15

- Python 3 support in kvm_stat

- Accounting of slabs to kmemcg

- Optimized arch timer handling for KVM/ARM

- Improvements to the VGIC ITS code and introduction of an ITS reset

- Unification of the 32-bit fault injection logic

- More exact external abort matching logic

- Support for running hashed page table (HPT) MMU mode on a host that
is using the radix MMU mode; single threaded mode on POWER 9 is
added as a pre-requisite

- Resolution of merge conflicts with the last second 4.14 HPT fixes

- Fixes and cleanups

- Some initial preparation patches for exitless interrupts and crypto

- New capability for AIS migration

- Fixes

- Improved emulation of LAPIC timer mode changes, MCi_STATUS MSRs, and
after-reset state

- Refined dependencies for VMX features

- Fixes for nested SMI injection

- A lot of cleanups

Alexey Kardashevskiy (1):
KVM: PPC: Book3S PR: Enable in-kernel TCE handlers for PR KVM

Christian Borntraeger (3):
Merge branch 'sthyi' of git://git.kernel.org/.../s390/linux into kvms390/next
KVM: s390: document memory ordering for kvm_s390_vcpu_wakeup
KVM: s390: provide a capability for AIS state migration

Christoffer Dall (19):
arm64: Implement arch_counter_get_cntpct to read the physical counter
arm64: Use physical counter for in-kernel reads when booted in EL2
KVM: arm/arm64: Guard kvm_vgic_map_is_active against !vgic_initialized
KVM: arm/arm64: Support calling vgic_update_irq_pending from irq context
KVM: arm/arm64: Check that system supports split eoi/deactivate
KVM: arm/arm64: Make timer_arm and timer_disarm helpers more generic
KVM: arm/arm64: Rename soft timer to bg_timer
KVM: arm/arm64: Move timer/vgic flush/sync under disabled irq
KVM: arm/arm64: Use separate timer for phys timer emulation
KVM: arm/arm64: Move timer save/restore out of the hyp code
KVM: arm/arm64: Set VCPU affinity for virt timer irq
KVM: arm/arm64: Avoid timer save/restore in vcpu entry/exit
KVM: arm/arm64: Support EL1 phys timer register access in set/get reg
KVM: arm/arm64: Use kvm_arm_timer_set/get_reg for guest register traps
KVM: arm/arm64: Move phys_timer_emulate function
KVM: arm/arm64: Avoid phys timer emulation in vcpu entry/exit
KVM: arm/arm64: Get rid of kvm_timer_flush_hwstate
KVM: arm/arm64: Rework kvm_timer_should_fire
arm/arm64: KVM: Load the timer state when enabling the timer

David Hildenbrand (16):
KVM: x86: mmu: returning void in a void function is strange
KVM: x86: mmu: free_page can handle NULL
KVM: x86: drop BUG_ON(vcpu->kvm)
KVM: VMX: vmx_vcpu_setup() cannot fail
KVM: x86: no need to inititalize vcpu members to 0
KVM: VMX: drop enable_ept check from ept_sync_context()
KVM: VMX: call ept_sync_global() with enable_ept only
KVM: VMX: drop unnecessary function declarations
KVM: nVMX: no need to set vcpu->cpu when switching vmcs
KVM: nVMX: no need to set ept/vpid caps to 0
KVM: VMX: cleanup init_rmode_identity_map()
KVM: x86: document special identity map address value
KVM: x86: allow setting identity map addr with no vcpus only
KVM: VMX: rename RDSEED and RDRAND vmx ctrls to reflect exiting
KVM: s390: vsie: use common code functions for pinning

Dongjiu Geng (1):
KVM: arm/arm64: fix the incompatible matching for external abort

Eric Auger (4):
KVM: arm/arm64: vgic-its: Remove kvm_its_unmap_device
KVM: arm/arm64: vgic-its: Free caches when GITS_BASER Valid bit is cleared
KVM: arm/arm64: Document KVM_DEV_ARM_ITS_CTRL_RESET
KVM: arm/arm64: vgic-its: Implement KVM_DEV_ARM_ITS_CTRL_RESET

Greg Kurz (1):
KVM: PPC: Book3S PR: Only install valid SLBs during KVM_SET_SREGS

Jeremy Cline (1):
tools/kvm_stat: Add Python 3 support to kvm_stat

Ladi Prosek (7):
KVM: x86: introduce ISA specific SMM entry/exit callbacks
KVM: x86: introduce ISA specific smi_allowed callback
KVM: nVMX: set IDTR and GDTR limits when loading L1 host state
KVM: nVMX: fix SMI injection in guest mode
KVM: nSVM: refactor nested_svm_vmrun
KVM: nSVM: fix SMI injection in guest mode
KVM: SVM: detect opening of SMI window using STGI intercept

Marc Zyngier (1):
KVM: arm/arm64: Unify 32bit fault injection

Markus Elfring (1):
KVM: PPC: Book3S HV: Delete an error message for a failed memory allocation in kvmppc_allocate_hpt()

Michael Ellerman (1):
KVM: PPC: Tie KVM_CAP_PPC_HTM to the user-visible TM feature

Michael Mueller (2):
KVM: s390: abstract conversion between isc and enum irq_types
KVM: s390: clear_io_irq() requests are not expected for adapter interrupts

Nicholas Piggin (1):
KVM: PPC: Book3S: Fix gas warning due to using r0 as immediate 0

Paolo Bonzini (4):
KVM: SVM: unconditionally wake up VCPU on IOMMU interrupt
KVM: SVM: limit kvm_handle_page_fault to #PF handling
KVM: x86: extend usage of RET_MMIO_PF_* constants
Merge branch 'kvm-ppc-next' of git://git.kernel.org/.../paulus/powerpc into HEAD

Paul Mackerras (13):
KVM: PPC: Book3S HV: Handle unexpected interrupts better
KVM: PPC: Book3S HV: Explicitly disable HPT operations on radix guests
Revert "KVM: PPC: Book3S HV: POWER9 does not require secondary thread management"
KVM: PPC: Book3S HV: Don't call real-mode XICS hypercall handlers if not enabled
Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next
KVM: PPC: Book3S HV: Don't rely on host's page size information
KVM: PPC: Book3S HV: Rename hpte_setup_done to mmu_ready
KVM: PPC: Book3S HV: Unify dirty page map between HPT and radix
KVM: PPC: Book3S HV: Add infrastructure for running HPT guests on radix host
KVM: PPC: Book3S HV: Allow for running POWER9 host in single-threaded mode
KVM: PPC: Book3S HV: Run HPT guests on POWER9 radix hosts
Merge branch 'kvm-ppc-fixes' into kvm-ppc-next
KVM: PPC: Book3S HV: Cosmetic post-merge cleanups

Radim KrÄmÃÅ (6):
KVM: x86: handle 0 write to TSC_DEADLINE MSR
KVM: x86: really disarm lapic timer when clearing TMICT
KVM: x86: thoroughly disarm LAPIC timer around TSC deadline switch
Merge tag 'kvm-arm-for-v4.15' of git://git.kernel.org/.../kvmarm/kvmarm into next
Merge tag 'kvm-ppc-next-4.15-2' of git://git.kernel.org/.../paulus/powerpc
Merge tag 'kvm-s390-next-4.15-1' of git://git.kernel.org/.../kvms390/linux

Shakeel Butt (1):
kvm, mm: account kvm related kmem slabs to kmemcg

Thomas Meyer (2):
KVM: PPC: Book3S HV: Use ARRAY_SIZE macro
KVM: PPC: BookE: Use vma_pages function

Tim Hansen (1):
arch/x86: remove redundant null checks before kmem_cache_destroy

Tony Krowiak (1):
KVM: s390: SIE considerations for AP Queue virtualization

Wanpeng Li (10):
KVM: VMX: Don't expose PLE enable if there is no hardware support
KVM: LAPIC: Fix lapic timer mode transition
KVM: LAPIC: Introduce limit_periodic_timer_frequency
KVM: LAPIC: Keep timer running when switching between one-shot and periodic mode
KVM: LAPIC: Apply change to TDCR right away to the timer
KVM: X86: Processor States following Reset or INIT
KVM: VMX: Don't expose unrestricted_guest is enabled if ept is disabled
KVM: nVMX: Fix EPT switching advertising
KVM: VMX: Fix VPID capability detection
KVM: X86: #GP when guest attempts to write MCi_STATUS register w/o 0

wanghaibin (1):
KVM: arm/arm64: vgic-its: New helper functions to free the caches

Documentation/virtual/kvm/api.txt | 13 +
Documentation/virtual/kvm/devices/arm-vgic-its.txt | 20 +
Documentation/virtual/kvm/devices/s390_flic.txt | 5 +
arch/arm/include/asm/kvm_asm.h | 2 +
arch/arm/include/asm/kvm_emulate.h | 38 +-
arch/arm/include/asm/kvm_hyp.h | 4 +-
arch/arm/include/uapi/asm/kvm.h | 7 +
arch/arm/kvm/emulate.c | 137 -------
arch/arm/kvm/hyp/switch.c | 7 +-
arch/arm64/include/asm/arch_timer.h | 8 +-
arch/arm64/include/asm/kvm_asm.h | 2 +
arch/arm64/include/asm/kvm_emulate.h | 5 +-
arch/arm64/include/asm/kvm_hyp.h | 4 +-
arch/arm64/include/asm/timex.h | 2 +-
arch/arm64/include/uapi/asm/kvm.h | 7 +
arch/arm64/kvm/hyp/switch.c | 6 +-
arch/arm64/kvm/inject_fault.c | 88 +---
arch/arm64/kvm/sys_regs.c | 41 +-
arch/powerpc/include/asm/kvm_book3s.h | 3 +-
arch/powerpc/include/asm/kvm_book3s_64.h | 140 ++++++-
arch/powerpc/include/asm/kvm_book3s_asm.h | 17 +-
arch/powerpc/include/asm/kvm_host.h | 6 +-
arch/powerpc/include/asm/kvm_ppc.h | 3 +
arch/powerpc/kernel/asm-offsets.c | 3 +
arch/powerpc/kernel/idle_book3s.S | 35 +-
arch/powerpc/kvm/book3s_64_mmu_hv.c | 128 +++---
arch/powerpc/kvm/book3s_64_mmu_radix.c | 51 +--
arch/powerpc/kvm/book3s_64_slb.S | 2 +-
arch/powerpc/kvm/book3s_hv.c | 360 +++++++++-------
arch/powerpc/kvm/book3s_hv_builtin.c | 117 +++++-
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 65 +--
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 205 +++++++++-
arch/powerpc/kvm/book3s_pr.c | 16 +-
arch/powerpc/kvm/book3s_pr_papr.c | 2 +
arch/powerpc/kvm/e500_mmu_host.c | 2 +-
arch/powerpc/kvm/powerpc.c | 6 +-
arch/s390/include/asm/kvm_host.h | 25 +-
arch/s390/kvm/interrupt.c | 26 +-
arch/s390/kvm/kvm-s390.c | 1 +
arch/s390/kvm/vsie.c | 50 +--
arch/x86/include/asm/kvm_emulate.h | 2 +
arch/x86/include/asm/kvm_host.h | 8 +
arch/x86/include/asm/vmx.h | 4 +-
arch/x86/kvm/emulate.c | 9 +
arch/x86/kvm/lapic.c | 91 ++++-
arch/x86/kvm/mmu.c | 115 +++---
arch/x86/kvm/mmu.h | 3 +-
arch/x86/kvm/paging_tmpl.h | 18 +-
arch/x86/kvm/svm.c | 241 +++++++----
arch/x86/kvm/vmx.c | 208 ++++++----
arch/x86/kvm/x86.c | 94 +++--
drivers/clocksource/arm_arch_timer.c | 35 +-
drivers/irqchip/irq-gic-v3.c | 8 +-
drivers/irqchip/irq-gic.c | 6 +-
include/kvm/arm_arch_timer.h | 26 +-
include/linux/kvm_host.h | 1 +
include/uapi/linux/kvm.h | 1 +
tools/kvm/kvm_stat/kvm_stat | 30 +-
virt/kvm/arm/aarch32.c | 97 ++++-
virt/kvm/arm/arch_timer.c | 452 ++++++++++++++-------
virt/kvm/arm/arm.c | 45 +-
virt/kvm/arm/hyp/timer-sr.c | 74 ++--
virt/kvm/arm/vgic/vgic-its.c | 199 ++++-----
virt/kvm/arm/vgic/vgic-mmio-v2.c | 22 +-
virt/kvm/arm/vgic/vgic-mmio-v3.c | 17 +-
virt/kvm/arm/vgic/vgic-mmio.c | 44 +-
virt/kvm/arm/vgic/vgic-v2.c | 5 +-
virt/kvm/arm/vgic/vgic-v3.c | 12 +-
virt/kvm/arm/vgic/vgic.c | 62 +--
virt/kvm/arm/vgic/vgic.h | 3 +-
virt/kvm/kvm_main.c | 6 +-
71 files changed, 2278 insertions(+), 1319 deletions(-)