Skip to content
Snippets Groups Projects
  1. Apr 06, 2022
  2. Mar 21, 2022
  3. Sep 07, 2021
  4. May 13, 2021
  5. Nov 16, 2020
    • David Hildenbrand's avatar
      util/vfio-helpers.c: Use ram_block_discard_disable() in qemu_vfio_open_pci() · b430b513
      David Hildenbrand authored
      
      Currently, when using "nvme://" for a block device, like
          -drive file=nvme://0000:01:00.0/1,if=none,id=drive0 \
          -device virtio-blk,drive=drive0 \
      
      VFIO may pin all guest memory, and discarding of RAM no longer works as
      expected. I was able to reproduce this easily with my
          01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd
                  NVMe SSD Controller SM981/PM981/PM983
      
      Similar to common VFIO, we have to disable it, making sure that:
      a) virtio-balloon won't discard any memory ("silently disabled")
      b) virtio-mem and nvme:// run mutually exclusive
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Wei Yang <richardw.yang@linux.intel.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>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20201116105947.9194-1-david@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b430b513
  6. Nov 03, 2020
  7. Oct 05, 2020
  8. Sep 01, 2020
  9. May 04, 2020
  10. Feb 18, 2020
  11. Oct 26, 2019
    • Wei Yang's avatar
      core: replace getpagesize() with qemu_real_host_page_size · 038adc2f
      Wei Yang authored
      
      There are three page size in qemu:
      
        real host page size
        host page size
        target page size
      
      All of them have dedicate variable to represent. For the last two, we
      use the same form in the whole qemu project, while for the first one we
      use two forms: qemu_real_host_page_size and getpagesize().
      
      qemu_real_host_page_size is defined to be a replacement of
      getpagesize(), so let it serve the role.
      
      [Note] Not fully tested for some arch or device.
      
      Signed-off-by: default avatarWei Yang <richardw.yang@linux.intel.com>
      Message-Id: <20191013021145.16011-3-richardw.yang@linux.intel.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      038adc2f
  12. Aug 16, 2019
  13. Mar 06, 2019
    • Yury Kotov's avatar
      exec: Change RAMBlockIterFunc definition · 754cb9c0
      Yury Kotov authored
      
      Currently, qemu_ram_foreach_* calls RAMBlockIterFunc with many
      block-specific arguments. But often iter func needs RAMBlock*.
      This refactoring is needed for fast access to RAMBlock flags from
      qemu_ram_foreach_block's callback. The only way to achieve this now
      is to call qemu_ram_block_from_host (which also enumerates blocks).
      
      So, this patch reduces complexity of
      qemu_ram_foreach_block() -> cb() -> qemu_ram_block_from_host()
      from O(n^2) to O(n).
      
      Fix RAMBlockIterFunc definition and add some functions to read
      RAMBlock* fields witch were passed.
      
      Signed-off-by: default avatarYury Kotov <yury-kotov@yandex-team.ru>
      Message-Id: <20190215174548.2630-2-yury-kotov@yandex-team.ru>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      754cb9c0
  14. Dec 11, 2018
  15. Nov 27, 2018
  16. May 20, 2018
  17. Mar 01, 2018
  18. Feb 08, 2018
Loading