]> git.baikalelectronics.ru Git - kernel.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)
commitf45b334016a4b689c3e818964983e0545293c069
tree14c9937dd7e97d95de04446c5336805be7c5b696
parentca007c9546de02dcafc81528ccad6ac46df0884c
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