Skip to content
Snippets Groups Projects
  1. Sep 29, 2020
  2. Sep 09, 2020
  3. Aug 21, 2020
    • Paolo Bonzini's avatar
      trace: switch position of headers to what Meson requires · 243af022
      Paolo Bonzini authored
      
      Meson doesn't enjoy the same flexibility we have with Make in choosing
      the include path.  In particular the tracing headers are using
      $(build_root)/$(<D).
      
      In order to keep the include directives unchanged,
      the simplest solution is to generate headers with patterns like
      "trace/trace-audio.h" and place forwarding headers in the source tree
      such that for example "audio/trace.h" includes "trace/trace-audio.h".
      
      This patch is too ugly to be applied to the Makefiles now.  It's only
      a way to separate the changes to the tracing header files from the
      Meson rewrite of the tracing logic.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      243af022
  4. Jul 10, 2020
  5. Jul 02, 2020
    • David Hildenbrand's avatar
      virtio-balloon: Rip out qemu_balloon_inhibit() · 06df2e69
      David Hildenbrand authored
      
      The only remaining special case is postcopy. It cannot handle
      concurrent discards yet, which would result in requesting already sent
      pages from the source. Special-case it in virtio-balloon instead.
      
      Introduce migration_in_incoming_postcopy(), to find out if incoming
      postcopy is active.
      
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Juan Quintela <quintela@redhat.com>
      Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20200626072248.78761-7-david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      06df2e69
    • David Hildenbrand's avatar
      exec: Introduce ram_block_discard_(disable|require)() · d24f31db
      David Hildenbrand authored
      
      We want to replace qemu_balloon_inhibit() by something more generic.
      Especially, we want to make sure that technologies that really rely on
      RAM block discards to work reliably to run mutual exclusive with
      technologies that effectively break it.
      
      E.g., vfio will usually pin all guest memory, turning the virtio-balloon
      basically useless and make the VM consume more memory than reported via
      the balloon. While the balloon is special already (=> no guarantees, same
      behavior possible afer reboots and with huge pages), this will be
      different, especially, with virtio-mem.
      
      Let's implement a way such that we can make both types of technology run
      mutually exclusive. We'll convert existing balloon inhibitors in successive
      patches and add some new ones. Add the check to
      qemu_balloon_is_inhibited() for now. We might want to make
      virtio-balloon an acutal inhibitor in the future - however, that
      requires more thought to not break existing setups.
      
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20200626072248.78761-3-david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      d24f31db
  6. Aug 16, 2019
  7. Jun 12, 2019
    • Markus Armbruster's avatar
      Include qemu-common.h exactly where needed · a8d25326
      Markus Armbruster authored
      
      No header includes qemu-common.h after this commit, as prescribed by
      qemu-common.h's file comment.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190523143508.25387-5-armbru@redhat.com>
      [Rebased with conflicts resolved automatically, except for
      include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c
      block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c
      target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h
      target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h
      target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h
      target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and
      net/tap-bsd.c fixed up]
      a8d25326
  8. Aug 17, 2018
  9. Mar 02, 2018
    • Markus Armbruster's avatar
      qapi: Empty out qapi-schema.json · 112ed241
      Markus Armbruster authored
      
      The previous commit improved compile time by including less of the
      generated QAPI headers.  This is impossible for stuff defined directly
      in qapi-schema.json, because that ends up in headers that that pull in
      everything.
      
      Move everything but include directives from qapi-schema.json to new
      sub-module qapi/misc.json, then include just the "misc" shard where
      possible.
      
      It's possible everywhere, except:
      
      * monitor.c needs qmp-command.h to get qmp_init_marshal()
      
      * monitor.c, ui/vnc.c and the generated qapi-event-FOO.c need
        qapi-event.h to get enum QAPIEvent
      
      Perhaps we'll get rid of those some other day.
      
      Adding a type to qapi/migration.json now recompiles some 120 instead
      of 2300 out of 5100 objects.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-25-armbru@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      112ed241
  10. Feb 09, 2018
  11. Jan 31, 2017
  12. Feb 04, 2016
    • Peter Maydell's avatar
      all: Clean up includes · d38ea87a
      Peter Maydell authored
      
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1454089805-5470-16-git-send-email-peter.maydell@linaro.org
      d38ea87a
  13. Nov 10, 2015
    • Dr. David Alan Gilbert's avatar
      Inhibit ballooning during postcopy · 371ff5a3
      Dr. David Alan Gilbert authored
      
      Postcopy detects accesses to pages that haven't been transferred yet
      using userfaultfd, and it causes exceptions on pages that are 'not
      present'.
      Ballooning also causes pages to be marked as 'not present' when the
      guest inflates the balloon.
      Potentially a balloon could be inflated to discard pages that are
      currently inflight during postcopy and that may be arriving at about
      the same time.
      
      To avoid this confusion, disable ballooning during postcopy.
      
      When disabled we drop balloon requests from the guest.  Since ballooning
      is generally initiated by the host, the management system should avoid
      initiating any balloon instructions to the guest during migration,
      although it's not possible to know how long it would take a guest to
      process a request made prior to the start of migration.
      Guest initiated ballooning will not know if it's really freed a page
      of host memory or not.
      
      Queueing the requests until after migration would be nice, but is
      non-trivial, since the set of inflate/deflate requests have to
      be compared with the state of the page to know what the final
      outcome is allowed to be.
      
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Reviewed-by: default avatarAmit Shah <amit.shah@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      371ff5a3
  14. Jun 22, 2015
  15. Apr 24, 2015
    • Luiz Capitulino's avatar
      balloon: improve error msg when adding second device · 46abb812
      Luiz Capitulino authored
      
      A VM supports only one balloon device, but due to several changes
      in infrastructure the error message got messed up when trying
      to add a second device. Fix it.
      
      Before this fix
      
      Command-line:
      
      qemu-qmp: -device virtio-balloon-pci,id=balloon0: Another balloon device already registered
      qemu-qmp: -device virtio-balloon-pci,id=balloon0: Adding balloon handler failed
      qemu-qmp: -device virtio-balloon-pci,id=balloon0: Device 'virtio-balloon-pci' could not be initialized
      
      HMP:
      
      Another balloon device already registered
      Adding balloon handler failed
      Device 'virtio-balloon-pci' could not be initialized
      
      QMP:
      
      { "execute": "device_add", "arguments": { "driver": "virtio-balloon-pci", "id": "balloon0" } }
      {
      	"error": {
      		"class": "GenericError",
      		"desc": "Adding balloon handler failed"
      	}
      }
      
      After this fix
      
      Command-line:
      
      qemu-qmp: -device virtio-balloon-pci,id=balloon0: Only one balloon device is supported
      qemu-qmp: -device virtio-balloon-pci,id=balloon0: Device 'virtio-balloon-pci' could not be initialized
      
      HMP:
      
      (qemu) device_add virtio-balloon-pci,id=balloon0
      Only one balloon device is supported
      Device 'virtio-balloon-pci' could not be initialized
      (qemu)
      
      QMP:
      
      { "execute": "device_add",
                "arguments": { "driver": "virtio-balloon-pci", "id": "balloon0" } }
      {
          "error": {
              "class": "GenericError",
              "desc": "Only one balloon device is supported"
          }
      }
      
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      46abb812
  16. Feb 23, 2015
  17. Jan 29, 2015
  18. Jun 23, 2014
  19. Dec 19, 2012
  20. Jun 15, 2012
    • Daniel P. Berrangé's avatar
      Add event notification for guest balloon changes · 973603a8
      Daniel P. Berrangé authored
      
      After setting a balloon target value, applications have to
      continually poll 'query-balloon' to determine whether the
      guest has reacted to this request. The virtio-balloon backend
      knows exactly when the guest has reacted though, and thus it
      is possible to emit a JSON event to tell the mgmt application
      whenever the guest balloon changes.
      
      This introduces a new 'qemu_balloon_changed()' API which is
      to be called by balloon driver backends, whenever they have
      a change in balloon value. This takes the 'actual' balloon
      value, as would be found in the BalloonInfo struct.
      
      The qemu_balloon_change API emits a JSON monitor event which
      looks like:
      
        {"timestamp": {"seconds": 1337162462, "microseconds": 814521},
         "event": "BALLOON_CHANGE", "data": {"actual": 944766976}}
      
      * balloon.c, balloon.h: Introduce qemu_balloon_changed() for
        emitting balloon change events on the monitor
      * hw/virtio-balloon.c: Invoke qemu_balloon_changed() whenever
        the guest changes the balloon actual value
      * monitor.c, monitor.h: Define QEVENT_BALLOON_CHANGE
      
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      Acked-by: default avatarAmit Shah <amit.shah@redhat.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      973603a8
  21. Apr 27, 2012
  22. Dec 06, 2011
  23. Oct 27, 2011
  24. Sep 09, 2011
  25. Aug 04, 2011
Loading