KVM: s390: vsie: fix riccbd
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Fri, 2 Sep 2016 10:33:49 +0000 (12:33 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 5 Sep 2016 11:48:50 +0000 (13:48 +0200)
We store the address of riccbd at the wrong location, overwriting
gvrd. This means that our nested guest will not be able to use runtime
instrumentation. Also, a memory leak, if our KVM guest actually sets gvrd.

Not noticed until now, as KVM guests never make use of gvrd and runtime
instrumentation wasn't completely tested yet.

Reported-by: Fan Zhang <zhangfan@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
arch/s390/kvm/vsie.c

index c106488b41371b2c8cc188df7ba5e8e5d7c06f31..d8673e243f13bf7315e36203890401cae191cea2 100644 (file)
@@ -584,7 +584,7 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
                /* Validity 0x0044 will be checked by SIE */
                if (rc)
                        goto unpin;
-               scb_s->gvrd = hpa;
+               scb_s->riccbd = hpa;
        }
        return 0;
 unpin: