]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: s390: Make facility bits future-proof
authorChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 29 Aug 2008 11:29:45 +0000 (13:29 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 15 Oct 2008 08:15:24 +0000 (10:15 +0200)
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: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/s390/kvm/priv.c

index d1faf5c544057f718c3737faf2340dfbaf3914c1..cce40ff2913bbf851059c8ea0f8d604d4eb94304 100644 (file)
@@ -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));