Commit e42b4a50 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

Merge tag 'kvmarm-for-v4.20' of...

Merge tag 'kvmarm-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm updates for 4.20

- Improved guest IPA space support (32 to 52 bits)
- RAS event delivery for 32bit
- PMU fixes
- Guest entry hardening
- Various cleanups
parents 1e58e5e5 e4e11cc0
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -123,6 +123,37 @@ memory layout to fit in user mode), check KVM_CAP_MIPS_VZ and use the
flag KVM_VM_MIPS_VZ.


On arm64, the physical address size for a VM (IPA Size limit) is limited
to 40bits by default. The limit can be configured if the host supports the
extension KVM_CAP_ARM_VM_IPA_SIZE. When supported, use
KVM_VM_TYPE_ARM_IPA_SIZE(IPA_Bits) to set the size in the machine type
identifier, where IPA_Bits is the maximum width of any physical
address used by the VM. The IPA_Bits is encoded in bits[7-0] of the
machine type identifier.

e.g, to configure a guest to use 48bit physical address size :

    vm_fd = ioctl(dev_fd, KVM_CREATE_VM, KVM_VM_TYPE_ARM_IPA_SIZE(48));

The requested size (IPA_Bits) must be :
  0 - Implies default size, 40bits (for backward compatibility)

  or

  N - Implies N bits, where N is a positive integer such that,
      32 <= N <= Host_IPA_Limit

Host_IPA_Limit is the maximum possible value for IPA_Bits on the host and
is dependent on the CPU capability and the kernel configuration. The limit can
be retrieved using KVM_CAP_ARM_VM_IPA_SIZE of the KVM_CHECK_EXTENSION
ioctl() at run-time.

Please note that configuring the IPA size does not affect the capability
exposed by the guest CPUs in ID_AA64MMFR0_EL1[PARange]. It only affects
size of the address translated by the stage2 level (guest physical to
host physical address translations).


4.3 KVM_GET_MSR_INDEX_LIST, KVM_GET_MSR_FEATURE_INDEX_LIST

Capability: basic, KVM_CAP_GET_MSR_FEATURES for KVM_GET_MSR_FEATURE_INDEX_LIST
+11 −0
Original line number Diff line number Diff line
@@ -12260,6 +12260,7 @@ F: Documentation/networking/rds.txt

RDT - RESOURCE ALLOCATION
M:	Fenghua Yu <fenghua.yu@intel.com>
M:	Reinette Chatre <reinette.chatre@intel.com>
L:	linux-kernel@vger.kernel.org
S:	Supported
F:	arch/x86/kernel/cpu/intel_rdt*
@@ -15924,6 +15925,7 @@ F: net/x25/
X86 ARCHITECTURE (32-BIT AND 64-BIT)
M:	Thomas Gleixner <tglx@linutronix.de>
M:	Ingo Molnar <mingo@redhat.com>
M:	Borislav Petkov <bp@alien8.de>
R:	"H. Peter Anvin" <hpa@zytor.com>
M:	x86@kernel.org
L:	linux-kernel@vger.kernel.org
@@ -15952,6 +15954,15 @@ M: Borislav Petkov <bp@alien8.de>
S:	Maintained
F:	arch/x86/kernel/cpu/microcode/*

X86 MM
M:	Dave Hansen <dave.hansen@linux.intel.com>
M:	Andy Lutomirski <luto@kernel.org>
M:	Peter Zijlstra <peterz@infradead.org>
L:	linux-kernel@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/mm
S:	Maintained
F:	arch/x86/mm/

X86 PLATFORM DRIVERS
M:	Darren Hart <dvhart@infradead.org>
M:	Andy Shevchenko <andy@infradead.org>
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 0
EXTRAVERSION = -rc4
EXTRAVERSION = -rc5
NAME = Merciless Moray

# *DOCUMENTATION*
+1 −2
Original line number Diff line number Diff line
@@ -133,8 +133,7 @@
 * space.
 */
#define KVM_PHYS_SHIFT	(40)
#define KVM_PHYS_SIZE	(_AC(1, ULL) << KVM_PHYS_SHIFT)
#define KVM_PHYS_MASK	(KVM_PHYS_SIZE - _AC(1, ULL))

#define PTRS_PER_S2_PGD	(_AC(1, ULL) << (KVM_PHYS_SHIFT - 30))

/* Virtualization Translation Control Register (VTCR) bits */
+12 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ static inline void __cpu_init_stage2(void)
	kvm_call_hyp(__init_stage2_translation);
}

static inline int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
static inline int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
{
	return 0;
}
@@ -354,4 +354,15 @@ static inline void kvm_vcpu_put_sysregs(struct kvm_vcpu *vcpu) {}
struct kvm *kvm_arch_alloc_vm(void);
void kvm_arch_free_vm(struct kvm *kvm);

static inline int kvm_arm_setup_stage2(struct kvm *kvm, unsigned long type)
{
	/*
	 * On 32bit ARM, VMs get a static 40bit IPA stage2 setup,
	 * so any non-zero value used as type is illegal.
	 */
	if (type)
		return -EINVAL;
	return 0;
}

#endif /* __ARM_KVM_HOST_H__ */
Loading