Skip to content
Snippets Groups Projects
  1. Dec 18, 2021
  2. Nov 29, 2021
  3. Nov 04, 2021
  4. Nov 02, 2021
  5. Nov 01, 2021
  6. Oct 30, 2021
  7. Oct 13, 2021
  8. Oct 05, 2021
  9. Sep 30, 2021
  10. Sep 22, 2021
  11. Sep 14, 2021
  12. Sep 08, 2021
  13. Jul 21, 2021
  14. Jul 09, 2021
  15. Jul 08, 2021
    • David Hildenbrand's avatar
      softmmu/physmem: Extend ram_block_discard_(require|disable) by two discard types · 7e6d32eb
      David Hildenbrand authored
      
      We want to separate the two cases whereby we discard ram
      - uncoordinated: e.g., virito-balloon
      - coordinated: e.g., virtio-mem coordinated via the RamDiscardManager
      
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta@cloud.ionos.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: Peter Xu <peterx@redhat.com>
      Cc: Auger Eric <eric.auger@redhat.com>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Cc: teawater <teawaterz@linux.alibaba.com>
      Cc: Marek Kedzierski <mkedzier@redhat.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20210413095531.25603-12-david@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      7e6d32eb
    • David Hildenbrand's avatar
      memory: Helpers to copy/free a MemoryRegionSection · 22843838
      David Hildenbrand authored
      
      In case one wants to create a permanent copy of a MemoryRegionSections,
      one needs access to flatview_ref()/flatview_unref(). Instead of exposing
      these, let's just add helpers to copy/free a MemoryRegionSection and
      properly adjust references.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: Peter Xu <peterx@redhat.com>
      Cc: Auger Eric <eric.auger@redhat.com>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Cc: teawater <teawaterz@linux.alibaba.com>
      Cc: Marek Kedzierski <mkedzier@redhat.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20210413095531.25603-3-david@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      22843838
    • David Hildenbrand's avatar
      memory: Introduce RamDiscardManager for RAM memory regions · 8947d7fc
      David Hildenbrand authored
      We have some special RAM memory regions (managed by virtio-mem), whereby
      the guest agreed to only use selected memory ranges. "unused" parts are
      discarded so they won't consume memory - to logically unplug these memory
      ranges. Before the VM is allowed to use such logically unplugged memory
      again, coordination with the hypervisor is required.
      
      This results in "sparse" mmaps/RAMBlocks/memory regions, whereby only
      coordinated parts are valid to be used/accessed by the VM.
      
      In most cases, we don't care about that - e.g., in KVM, we simply have a
      single KVM memory slot. However, in case of vfio, registering the
      whole region with the kernel results in all pages getting pinned, and
      therefore an unexpected high memory consumption - discarding of RAM in
      that context is broken.
      
      Let's introduce a way to coordinate discarding/populating memory within a
      RAM memory region with such special consumers of RAM memory regions: they
      can register as listeners and get updates on memory getting discarded and
      populated. Using this machinery, vfio will be able to map only the
      currently populated parts, resulting in discarded parts not getting pinned
      and not consuming memory.
      
      A RamDiscardManager has to be set for a memory region before it is getting
      mapped, and cannot change while the memory region is mapped.
      
      Note: At some point, we might want to let RAMBlock users (esp. vfio used
      for nvme://
      
      ) consume this interface as well. We'll need RAMBlock notifier
      calls when a RAMBlock is getting mapped/unmapped (via the corresponding
      memory region), so we can properly register a listener there as well.
      
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta@cloud.ionos.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: Peter Xu <peterx@redhat.com>
      Cc: Auger Eric <eric.auger@redhat.com>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Cc: teawater <teawaterz@linux.alibaba.com>
      Cc: Marek Kedzierski <mkedzier@redhat.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20210413095531.25603-2-david@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      8947d7fc
  16. Jun 19, 2021
  17. Jun 15, 2021
  18. Jun 05, 2021
  19. May 26, 2021
Loading