Skip to content
Snippets Groups Projects
  • David Hildenbrand's avatar
    c3562238
    hw/s390x/s390-skeys: lazy storage key enablement under TCG · c3562238
    David Hildenbrand authored
    
    Let's enable storage keys lazily under TCG, just as we do under KVM.
    Only fairly old Linux versions actually make use of storage keys, so it
    can be kind of wasteful to allocate quite some memory and track
    changes and references if nobody cares.
    
    We have to make sure to flush the TLB when enabling storage keys after
    the VM was already running: otherwise it might happen that we don't
    catch references or modifications afterwards.
    
    Add proper documentation to all callbacks.
    
    The kvm-unit-tests skey tests keeps on working with this change.
    
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Message-Id: <20210903155514.44772-14-david@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
    c3562238
    History
    hw/s390x/s390-skeys: lazy storage key enablement under TCG
    David Hildenbrand authored
    
    Let's enable storage keys lazily under TCG, just as we do under KVM.
    Only fairly old Linux versions actually make use of storage keys, so it
    can be kind of wasteful to allocate quite some memory and track
    changes and references if nobody cares.
    
    We have to make sure to flush the TLB when enabling storage keys after
    the VM was already running: otherwise it might happen that we don't
    catch references or modifications afterwards.
    
    Add proper documentation to all callbacks.
    
    The kvm-unit-tests skey tests keeps on working with this change.
    
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Message-Id: <20210903155514.44772-14-david@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>