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

Commit 5e1b59ab authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull KVM fixes from Radim Krčmář:
 "ARM fixes:
   - Wrong indentation in the PMU code from the merge window
   - A long-time bug occuring with running ntpd on the host, candidate
     for stable
   - Properly handle (and warn about) the unsupported configuration of
     running on systems with less than 40 bits of PA space
   - More fixes to the PM and hotplug notifier stuff from the merge
     window

  x86:
   - leak of guest xcr0 (typically shows up as SIGILL)
   - new maintainer (who is sending the pull request too)
   - fix for merge window regression
   - fix for guest CPUID"

Paolo Bonzini points out:
 "For the record, this tag is signed by me because I prepared the pull
  request.  Further pull requests for 4.6 will be signed and sent out by
  Radim directly"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: mask CPUID(0xD,0x1).EAX against host value
  kvm: x86: do not leak guest xcr0 into host interrupt handlers
  KVM: MMU: fix permission_fault()
  KVM: new maintainer on the block
  arm64: KVM: unregister notifiers in hyp mode teardown path
  arm64: KVM: Warn when PARange is less than 40 bits
  KVM: arm/arm64: Handle forward time correction gracefully
  arm64: KVM: Add braces to multi-line if statement in virtual PMU code
parents 1c74a7f8 316314ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6252,8 +6252,8 @@ S: Maintained
F:	tools/testing/selftests

KERNEL VIRTUAL MACHINE (KVM)
M:	Gleb Natapov <gleb@kernel.org>
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
+10 −3
Original line number Diff line number Diff line
@@ -1112,10 +1112,17 @@ static void __init hyp_cpu_pm_init(void)
{
	cpu_pm_register_notifier(&hyp_init_cpu_pm_nb);
}
static void __init hyp_cpu_pm_exit(void)
{
	cpu_pm_unregister_notifier(&hyp_init_cpu_pm_nb);
}
#else
static inline void hyp_cpu_pm_init(void)
{
}
static inline void hyp_cpu_pm_exit(void)
{
}
#endif

static void teardown_common_resources(void)
@@ -1141,9 +1148,7 @@ static int init_subsystems(void)
	/*
	 * Register CPU Hotplug notifier
	 */
	cpu_notifier_register_begin();
	err = __register_cpu_notifier(&hyp_init_cpu_nb);
	cpu_notifier_register_done();
	err = register_cpu_notifier(&hyp_init_cpu_nb);
	if (err) {
		kvm_err("Cannot register KVM init CPU notifier (%d)\n", err);
		return err;
@@ -1193,6 +1198,8 @@ static void teardown_hyp_mode(void)
	free_hyp_pgds();
	for_each_possible_cpu(cpu)
		free_page(per_cpu(kvm_arm_hyp_stack_page, cpu));
	unregister_cpu_notifier(&hyp_init_cpu_nb);
	hyp_cpu_pm_exit();
}

static int init_vhe_mode(void)
+2 −4
Original line number Diff line number Diff line
@@ -151,8 +151,7 @@
 */
#define VTCR_EL2_FLAGS		(VTCR_EL2_TG0_64K | VTCR_EL2_SH0_INNER | \
				 VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \
				 VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B | \
				 VTCR_EL2_RES1)
				 VTCR_EL2_SL0_LVL1 | VTCR_EL2_RES1)
#define VTTBR_X		(38 - VTCR_EL2_T0SZ_40B)
#else
/*
@@ -163,8 +162,7 @@
 */
#define VTCR_EL2_FLAGS		(VTCR_EL2_TG0_4K | VTCR_EL2_SH0_INNER | \
				 VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \
				 VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B | \
				 VTCR_EL2_RES1)
				 VTCR_EL2_SL0_LVL1 | VTCR_EL2_RES1)
#define VTTBR_X		(37 - VTCR_EL2_T0SZ_40B)
#endif

+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ extern void __vgic_v3_init_lrs(void);

extern u32 __kvm_get_mdcr_el2(void);

extern void __init_stage2_translation(void);
extern u32 __init_stage2_translation(void);

#endif

+4 −3
Original line number Diff line number Diff line
@@ -369,11 +369,12 @@ int kvm_arm_vcpu_arch_get_attr(struct kvm_vcpu *vcpu,
int kvm_arm_vcpu_arch_has_attr(struct kvm_vcpu *vcpu,
			       struct kvm_device_attr *attr);

/* #define kvm_call_hyp(f, ...) __kvm_call_hyp(kvm_ksym_ref(f), ##__VA_ARGS__) */

static inline void __cpu_init_stage2(void)
{
	kvm_call_hyp(__init_stage2_translation);
	u32 parange = kvm_call_hyp(__init_stage2_translation);

	WARN_ONCE(parange < 40,
		  "PARange is %d bits, unsupported configuration!", parange);
}

#endif /* __ARM64_KVM_HOST_H__ */
Loading