Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0756b7fb authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'kvm-4.14-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM updates from Radim Krčmář:
 "First batch of KVM changes for 4.14

  Common:
   - improve heuristic for boosting preempted spinlocks by ignoring
     VCPUs in user mode

  ARM:
   - fix for decoding external abort types from guests

   - added support for migrating the active priority of interrupts when
     running a GICv2 guest on a GICv3 host

   - minor cleanup

  PPC:
   - expose storage keys to userspace

   - merge kvm-ppc-fixes with a fix that missed 4.13 because of
     vacations

   - fixes

  s390:
   - merge of kvm/master to avoid conflicts with additional sthyi fixes

   - wire up the no-dat enhancements in KVM

   - multiple epoch facility (z14 feature)

   - Configuration z/Architecture Mode

   - more sthyi fixes

   - gdb server range checking fix

   - small code cleanups

  x86:
   - emulate Hyper-V TSC frequency MSRs

   - add nested INVPCID

   - emulate EPTP switching VMFUNC

   - support Virtual GIF

   - support 5 level page tables

   - speedup nested VM exits by packing byte operations

   - speedup MMIO by using hardware provided physical address

   - a lot of fixes and cleanups, especially nested"

* tag 'kvm-4.14-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (67 commits)
  KVM: arm/arm64: Support uaccess of GICC_APRn
  KVM: arm/arm64: Extract GICv3 max APRn index calculation
  KVM: arm/arm64: vITS: Drop its_ite->lpi field
  KVM: arm/arm64: vgic: constify seq_operations and file_operations
  KVM: arm/arm64: Fix guest external abort matching
  KVM: PPC: Book3S HV: Fix memory leak in kvm_vm_ioctl_get_htab_fd
  KVM: s390: vsie: cleanup mcck reinjection
  KVM: s390: use WARN_ON_ONCE only for checking
  KVM: s390: guestdbg: fix range check
  KVM: PPC: Book3S HV: Report storage key support to userspace
  KVM: PPC: Book3S HV: Fix case where HDEC is treated as 32-bit on POWER9
  KVM: PPC: Book3S HV: Fix invalid use of register expression
  KVM: PPC: Book3S HV: Fix H_REGISTER_VPA VPA size validation
  KVM: PPC: Book3S HV: Fix setting of storage key in H_ENTER
  KVM: PPC: e500mc: Fix a NULL dereference
  KVM: PPC: e500: Fix some NULL dereferences on error
  KVM: PPC: Book3S HV: Protect updates to spapr_tce_tables list
  KVM: s390: we are always in czam mode
  KVM: s390: expose no-DAT to guest and migration support
  KVM: s390: sthyi: remove invalid guest write access
  ...
parents 6d621897 5f54c8b2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -83,6 +83,11 @@ Groups:

    Bits for undefined preemption levels are RAZ/WI.

    Note that this differs from a CPU's view of the APRs on hardware in which
    a GIC without the security extensions expose group 0 and group 1 active
    priorities in separate register groups, whereas we show a combined view
    similar to GICv2's GICH_APR.

    For historical reasons and to provide ABI compatibility with userspace we
    export the GICC_PMR register in the format of the GICH_VMCR.VMPriMask
    field in the lower 5 bits of a word, meaning that userspace must always
+13 −1
Original line number Diff line number Diff line
@@ -176,7 +176,8 @@ Architectures: s390

3.1. ATTRIBUTE: KVM_S390_VM_TOD_HIGH

Allows user space to set/get the TOD clock extension (u8).
Allows user space to set/get the TOD clock extension (u8) (superseded by
KVM_S390_VM_TOD_EXT).

Parameters: address of a buffer in user space to store the data (u8) to
Returns:    -EFAULT if the given address is not accessible from kernel space
@@ -190,6 +191,17 @@ the POP (u64).
Parameters: address of a buffer in user space to store the data (u64) to
Returns:    -EFAULT if the given address is not accessible from kernel space

3.3. ATTRIBUTE: KVM_S390_VM_TOD_EXT
Allows user space to set/get bits 0-63 of the TOD clock register as defined in
the POP (u64). If the guest CPU model supports the TOD clock extension (u8), it
also allows user space to get/set it. If the guest CPU model does not support
it, it is stored as 0 and not allowed to be set to a value != 0.

Parameters: address of a buffer in user space to store the data
            (kvm_s390_vm_tod_clock) to
Returns:    -EFAULT if the given address is not accessible from kernel space
	    -EINVAL if setting the TOD clock extension to != 0 is not supported

4. GROUP: KVM_S390_VM_CRYPTO
Architectures: s390

+26 −11
Original line number Diff line number Diff line
@@ -7464,18 +7464,30 @@ L: kvm@vger.kernel.org
W:	http://www.linux-kvm.org
T:	git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
S:	Supported
F:	Documentation/*/kvm*.txt
F:	Documentation/virtual/kvm/
F:	arch/*/kvm/
F:	arch/x86/kernel/kvm.c
F:	arch/x86/kernel/kvmclock.c
F:	arch/*/include/asm/kvm*
F:	include/linux/kvm*
F:	include/trace/events/kvm.h
F:	include/uapi/asm-generic/kvm*
F:	include/uapi/linux/kvm*
F:	virt/kvm/
F:	include/asm-generic/kvm*
F:	include/linux/kvm*
F:	include/kvm/iodev.h
F:	virt/kvm/*
F:	tools/kvm/

KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V
KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)
M:	Paolo Bonzini <pbonzini@redhat.com>
M:	Radim KrÄmář <rkrcmar@redhat.com>
L:	kvm@vger.kernel.org
W:	http://www.linux-kvm.org
T:	git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
S:	Supported
F:	arch/x86/kvm/
F:	arch/x86/include/uapi/asm/kvm*
F:	arch/x86/include/asm/kvm*
F:	arch/x86/kernel/kvm.c
F:	arch/x86/kernel/kvmclock.c

KERNEL VIRTUAL MACHINE FOR AMD-V (KVM/amd)
M:	Joerg Roedel <joro@8bytes.org>
L:	kvm@vger.kernel.org
W:	http://www.linux-kvm.org/
@@ -7483,7 +7495,7 @@ S: Maintained
F:	arch/x86/include/asm/svm.h
F:	arch/x86/kvm/svm.c

KERNEL VIRTUAL MACHINE (KVM) FOR ARM
KERNEL VIRTUAL MACHINE FOR ARM (KVM/arm)
M:	Christoffer Dall <christoffer.dall@linaro.org>
M:	Marc Zyngier <marc.zyngier@arm.com>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -7497,14 +7509,16 @@ F: arch/arm/kvm/
F:	virt/kvm/arm/
F:	include/kvm/arm_*

KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC
KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc)
M:	Alexander Graf <agraf@suse.com>
L:	kvm-ppc@vger.kernel.org
W:	http://www.linux-kvm.org/
T:	git git://github.com/agraf/linux-2.6.git
S:	Supported
F:	arch/powerpc/include/uapi/asm/kvm*
F:	arch/powerpc/include/asm/kvm*
F:	arch/powerpc/kvm/
F:	arch/powerpc/kernel/kvm*

KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)
M:	Christoffer Dall <christoffer.dall@linaro.org>
@@ -7531,7 +7545,8 @@ L: linux-s390@vger.kernel.org
W:	http://www.ibm.com/developerworks/linux/linux390/
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git
S:	Supported
F:	Documentation/s390/kvm.txt
F:	arch/s390/include/uapi/asm/kvm*
F:	arch/s390/include/asm/gmap.h
F:	arch/s390/include/asm/kvm*
F:	arch/s390/kvm/
F:	arch/s390/mm/gmap.c
+0 −1
Original line number Diff line number Diff line
@@ -227,7 +227,6 @@

#define HSR_DABT_S1PTW		(_AC(1, UL) << 7)
#define HSR_DABT_CM		(_AC(1, UL) << 8)
#define HSR_DABT_EA		(_AC(1, UL) << 9)

#define kvm_arm_exception_type	\
	{0, "RESET" }, 		\
+19 −5
Original line number Diff line number Diff line
@@ -149,11 +149,6 @@ static inline int kvm_vcpu_dabt_get_rd(struct kvm_vcpu *vcpu)
	return (kvm_vcpu_get_hsr(vcpu) & HSR_SRT_MASK) >> HSR_SRT_SHIFT;
}

static inline bool kvm_vcpu_dabt_isextabt(struct kvm_vcpu *vcpu)
{
	return kvm_vcpu_get_hsr(vcpu) & HSR_DABT_EA;
}

static inline bool kvm_vcpu_dabt_iss1tw(struct kvm_vcpu *vcpu)
{
	return kvm_vcpu_get_hsr(vcpu) & HSR_DABT_S1PTW;
@@ -206,6 +201,25 @@ static inline u8 kvm_vcpu_trap_get_fault_type(struct kvm_vcpu *vcpu)
	return kvm_vcpu_get_hsr(vcpu) & HSR_FSC_TYPE;
}

static inline bool kvm_vcpu_dabt_isextabt(struct kvm_vcpu *vcpu)
{
	switch (kvm_vcpu_trap_get_fault_type(vcpu)) {
	case FSC_SEA:
	case FSC_SEA_TTW0:
	case FSC_SEA_TTW1:
	case FSC_SEA_TTW2:
	case FSC_SEA_TTW3:
	case FSC_SECC:
	case FSC_SECC_TTW0:
	case FSC_SECC_TTW1:
	case FSC_SECC_TTW2:
	case FSC_SECC_TTW3:
		return true;
	default:
		return false;
	}
}

static inline u32 kvm_vcpu_hvc_get_imm(struct kvm_vcpu *vcpu)
{
	return kvm_vcpu_get_hsr(vcpu) & HSR_HVC_IMM_MASK;
Loading