Commit 76599a47 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

Merge tag 'kvmarm-fixes-5.19-1' of...

Merge tag 'kvmarm-fixes-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 5.19, take #1

- Properly reset the SVE/SME flags on vcpu load

- Fix a vgic-v2 regression regarding accessing the pending
  state of a HW interrupt from userspace (and make the code
  common with vgic-v3)

- Fix access to the idreg range for protected guests

- Ignore 'kvm-arm.mode=protected' when using VHE

- Return an error from kvm_arch_init_vm() on allocation failure

- A bunch of small cleanups (comments, annotations, indentation)
parents 66da6500 bcbfb588
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2469,7 +2469,6 @@

			protected: nVHE-based mode with support for guests whose
				   state is kept private from the host.
				   Not valid if the kernel is running in EL2.

			Defaults to VHE/nVHE based on hardware support. Setting
			mode to "protected" will disable kexec and hibernation
+0 −5
Original line number Diff line number Diff line
@@ -362,11 +362,6 @@ struct kvm_vcpu_arch {
	struct arch_timer_cpu timer_cpu;
	struct kvm_pmu pmu;

	/*
	 * Anything that is not used directly from assembly code goes
	 * here.
	 */

	/*
	 * Guest registers we preserve during guest debugging.
	 *
+3 −0
Original line number Diff line number Diff line
@@ -113,6 +113,9 @@ static __always_inline bool has_vhe(void)
	/*
	 * Code only run in VHE/NVHE hyp context can assume VHE is present or
	 * absent. Otherwise fall back to caps.
	 * This allows the compiler to discard VHE-specific code from the
	 * nVHE object, reducing the number of external symbol references
	 * needed to link.
	 */
	if (is_vhe_hyp_code())
		return true;
+1 −9
Original line number Diff line number Diff line
@@ -1974,15 +1974,7 @@ static void cpu_enable_mte(struct arm64_cpu_capabilities const *cap)
#ifdef CONFIG_KVM
static bool is_kvm_protected_mode(const struct arm64_cpu_capabilities *entry, int __unused)
{
	if (kvm_get_mode() != KVM_MODE_PROTECTED)
		return false;

	if (is_kernel_in_hyp_mode()) {
		pr_warn("Protected KVM not available with VHE\n");
		return false;
	}

	return true;
	return kvm_get_mode() == KVM_MODE_PROTECTED;
}
#endif /* CONFIG_KVM */

+3 −0
Original line number Diff line number Diff line
@@ -1230,6 +1230,9 @@ bool kvm_arch_timer_get_input_level(int vintid)
	struct kvm_vcpu *vcpu = kvm_get_running_vcpu();
	struct arch_timer_context *timer;

	if (WARN(!vcpu, "No vcpu context!\n"))
		return false;

	if (vintid == vcpu_vtimer(vcpu)->irq.irq)
		timer = vcpu_vtimer(vcpu);
	else if (vintid == vcpu_ptimer(vcpu)->irq.irq)
Loading