Commit 24f9515d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull kvm fixes from Paolo Bonzini:
 "ARM:

   - Clear the pending exception state from a vcpu coming out of reset,
     as it could otherwise affect the first instruction executed in the
     guest

   - Fix pointer arithmetic in address translation emulation, so that
     the Hardware Access bit is set on the correct PTE instead of some
     other location

  s390:

   - Fix deadlock in new memory management

   - Properly handle kernel faults on donated memory

   - Fix bounds checking for irq routing, with selftest

   - Fix invalid machine checks and log all of them"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: arm64: Fix the descriptor address in __kvm_at_swap_desc()
  KVM: s390: vsie: Avoid injecting machine check on signal
  KVM: s390: log machine checks more aggressively
  KVM: s390: selftests: Add IRQ routing address offset tests
  KVM: s390: Limit adapter indicator access to mapped page
  s390/mm: Add missing secure storage access fixups for donated memory
  KVM: arm64: Discard PC update state on vcpu reset
  KVM: s390: Fix a deadlock
parents 45f667eb 52dad81e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1753,7 +1753,7 @@ int __kvm_at_swap_desc(struct kvm *kvm, gpa_t ipa, u64 old, u64 new)
	if (!writable)
		return -EPERM;

	ptep = (u64 __user *)hva + offset;
	ptep = (void __user *)hva + offset;
	if (cpus_have_final_cap(ARM64_HAS_LSE_ATOMICS))
		r = __lse_swap_desc(ptep, old, new);
	else
+14 −0
Original line number Diff line number Diff line
@@ -247,6 +247,20 @@ void kvm_reset_vcpu(struct kvm_vcpu *vcpu)
			kvm_vcpu_set_be(vcpu);

		*vcpu_pc(vcpu) = target_pc;

		/*
		 * We may come from a state where either a PC update was
		 * pending (SMC call resulting in PC being increpented to
		 * skip the SMC) or a pending exception. Make sure we get
		 * rid of all that, as this cannot be valid out of reset.
		 *
		 * Note that clearing the exception mask also clears PC
		 * updates, but that's an implementation detail, and we
		 * really want to make it explicit.
		 */
		vcpu_clear_flag(vcpu, PENDING_EXCEPTION);
		vcpu_clear_flag(vcpu, EXCEPT_MASK);
		vcpu_clear_flag(vcpu, INCREMENT_PC);
		vcpu_set_reg(vcpu, 0, reset_state.r0);
	}

+3 −0
Original line number Diff line number Diff line
@@ -710,6 +710,9 @@ void kvm_arch_crypto_clear_masks(struct kvm *kvm);
void kvm_arch_crypto_set_masks(struct kvm *kvm, unsigned long *apm,
			       unsigned long *aqm, unsigned long *adm);

#define SIE64_RETURN_NORMAL	0
#define SIE64_RETURN_MCCK	1

int __sie64a(phys_addr_t sie_block_phys, struct kvm_s390_sie_block *sie_block, u64 *rsa,
	     unsigned long gasce);

+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ struct stack_frame {
		struct {
			unsigned long sie_control_block;
			unsigned long sie_savearea;
			unsigned long sie_reason;
			unsigned long sie_return;
			unsigned long sie_flags;
			unsigned long sie_control_block_phys;
			unsigned long sie_guest_asce;
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ int main(void)
	OFFSET(__SF_EMPTY, stack_frame, empty[0]);
	OFFSET(__SF_SIE_CONTROL, stack_frame, sie_control_block);
	OFFSET(__SF_SIE_SAVEAREA, stack_frame, sie_savearea);
	OFFSET(__SF_SIE_REASON, stack_frame, sie_reason);
	OFFSET(__SF_SIE_RETURN, stack_frame, sie_return);
	OFFSET(__SF_SIE_FLAGS, stack_frame, sie_flags);
	OFFSET(__SF_SIE_CONTROL_PHYS, stack_frame, sie_control_block_phys);
	OFFSET(__SF_SIE_GUEST_ASCE, stack_frame, sie_guest_asce);
Loading