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

Commit a0046b6d authored by Christian Borntraeger's avatar Christian Borntraeger Committed by Avi Kivity
Browse files

KVM: s390: Make facility bits future-proof



Heiko Carstens pointed out, that its safer to activate working facilities
instead of disabling problematic facilities. The new code uses the host
facility bits and masks it with known good ones.

Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent a89c1ad2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -157,8 +157,8 @@ static int handle_stfl(struct kvm_vcpu *vcpu)
	int rc;

	vcpu->stat.instruction_stfl++;
	facility_list &= ~(1UL<<24); /* no stfle */
	facility_list &= ~(1UL<<23); /* no large pages */
	/* only pass the facility bits, which we can handle */
	facility_list &= 0xfe00fff3;

	rc = copy_to_guest(vcpu, offsetof(struct _lowcore, stfl_fac_list),
			   &facility_list, sizeof(facility_list));