1. 21 4月, 2020 1 次提交
  2. 14 4月, 2020 1 次提交
  3. 31 3月, 2020 1 次提交
  4. 26 3月, 2020 1 次提交
  5. 24 3月, 2020 1 次提交
  6. 17 3月, 2020 4 次提交
    • S
      KVM: Ensure validity of memslot with respect to kvm_get_dirty_log() · 2a49f61d
      Sean Christopherson 提交于
      Rework kvm_get_dirty_log() so that it "returns" the associated memslot
      on success.  A future patch will rework memslot handling such that
      id_to_memslot() can return NULL, returning the memslot makes it more
      obvious that the validity of the memslot has been verified, i.e.
      precludes the need to add validity checks in the arch code that are
      technically unnecessary.
      
      To maintain ordering in s390, move the call to kvm_arch_sync_dirty_log()
      from s390's kvm_vm_ioctl_get_dirty_log() to the new kvm_get_dirty_log().
      This is a nop for PPC, the only other arch that doesn't select
      KVM_GENERIC_DIRTYLOG_READ_PROTECT, as its sync_dirty_log() is empty.
      
      Ideally, moving the sync_dirty_log() call would be done in a separate
      patch, but it can't be done in a follow-on patch because that would
      temporarily break s390's ordering.  Making the move in a preparatory
      patch would be functionally correct, but would create an odd scenario
      where the moved sync_dirty_log() would operate on a "different" memslot
      due to consuming the result of a different id_to_memslot().  The
      memslot couldn't actually be different as slots_lock is held, but the
      code is confusing enough as it is, i.e. moving sync_dirty_log() in this
      patch is the lesser of all evils.
      Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2a49f61d
    • S
      KVM: Provide common implementation for generic dirty log functions · 0dff0846
      Sean Christopherson 提交于
      Move the implementations of KVM_GET_DIRTY_LOG and KVM_CLEAR_DIRTY_LOG
      for CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT into common KVM code.
      The arch specific implemenations are extremely similar, differing
      only in whether the dirty log needs to be sync'd from hardware (x86)
      and how the TLBs are flushed.  Add new arch hooks to handle sync
      and TLB flush; the sync will also be used for non-generic dirty log
      support in a future patch (s390).
      
      The ulterior motive for providing a common implementation is to
      eliminate the dependency between arch and common code with respect to
      the memslot referenced by the dirty log, i.e. to make it obvious in the
      code that the validity of the memslot is guaranteed, as a future patch
      will rework memslot handling such that id_to_memslot() can return NULL.
      Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0dff0846
    • S
      KVM: Drop "const" attribute from old memslot in commit_memory_region() · 9d4c197c
      Sean Christopherson 提交于
      Drop the "const" attribute from @old in kvm_arch_commit_memory_region()
      to allow arch specific code to free arch specific resources in the old
      memslot without having to cast away the attribute.  Freeing resources in
      kvm_arch_commit_memory_region() paves the way for simplifying
      kvm_free_memslot() by eliminating the last usage of its @dont param.
      Reviewed-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9d4c197c
    • S
      KVM: Drop kvm_arch_create_memslot() · 414de7ab
      Sean Christopherson 提交于
      Remove kvm_arch_create_memslot() now that all arch implementations are
      effectively nops.  Removing kvm_arch_create_memslot() eliminates the
      possibility for arch specific code to allocate memory prior to setting
      a memslot, which sets the stage for simplifying kvm_free_memslot().
      
      Cc: Janosch Frank <frankja@linux.ibm.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      414de7ab
  7. 11 3月, 2020 1 次提交
  8. 28 2月, 2020 17 次提交
  9. 31 1月, 2020 3 次提交
  10. 28 1月, 2020 4 次提交
  11. 24 1月, 2020 4 次提交
  12. 10 10月, 2019 1 次提交
  13. 05 10月, 2019 1 次提交