• David Hildenbrand's avatar
    KVM: s390: vsie: use READ_ONCE to access some SCB fields · b3ecd4aa
    David Hildenbrand authored
    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: default avatarDavid Hildenbrand <david@redhat.com>
    Message-Id: <20180116171526.12343-2-david@redhat.com>
    Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    Acked-by: default avatarCornelia Huck <cohuck@redhat.com>
    Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    b3ecd4aa
vsie.c 32.4 KB