]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
KVM: s390: vsie: use READ_ONCE to access some SCB fields
authorDavid Hildenbrand <david@redhat.com>
Tue, 16 Jan 2018 17:15:25 +0000 (18:15 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 24 Jan 2018 13:05:00 +0000 (14:05 +0100)
commitb3ecd4aa8632a86428605ab73393d14779019d82
tree14c9937dd7e97d95de04446c5336805be7c5b696
parentc0b4bd219124fdb7306fb67b571aff4c56a5e8f9
KVM: s390: vsie: use READ_ONCE to access some SCB fields

Another VCPU might try to modify the SCB while we are creating the
shadow SCB. In general this is no problem - unless the compiler decides
to not load values once, but e.g. twice.

For us, this is only relevant when checking/working with such values.
E.g. the prefix value, the mso, state of transactional execution and
addresses of satellite blocks.

E.g. if we blindly forward values (e.g. general purpose registers or
execution controls after masking), we don't care.

Leaving unpin_blocks() untouched for now, will handle it separately.

The worst thing right now that I can see would be a missed prefix
un/remap (mso, prefix, tx) or using wrong guest addresses. Nothing
critical, but let's try to avoid unpredictable behavior.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180116171526.12343-2-david@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/vsie.c