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

Commit edc5b055 authored by David Hildenbrand's avatar David Hildenbrand Committed by Christian Borntraeger
Browse files

KVM: s390: support NQ only if the facility is enabled for the guest



While we can not fully fence of the Nonquiescing Key-Setting facility,
we should as try our best to hide it.

Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent 4a5e7e38
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -670,8 +670,9 @@ static int handle_pfmf(struct kvm_vcpu *vcpu)
	if (vcpu->run->s.regs.gprs[reg1] & PFMF_RESERVED)
	if (vcpu->run->s.regs.gprs[reg1] & PFMF_RESERVED)
		return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
		return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);


	/* Only provide non-quiescing support if the host supports it */
	/* Only provide non-quiescing support if enabled for the guest */
	if (vcpu->run->s.regs.gprs[reg1] & PFMF_NQ && !test_facility(14))
	if (vcpu->run->s.regs.gprs[reg1] & PFMF_NQ &&
	    !test_kvm_facility(vcpu->kvm, 14))
		return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
		return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);


	/* No support for conditional-SSKE */
	/* No support for conditional-SSKE */