Skip to content
Snippets Groups Projects
  1. Apr 06, 2022
  2. May 26, 2021
  3. Sep 30, 2020
  4. Jul 21, 2020
  5. Dec 17, 2019
  6. Aug 16, 2019
    • Markus Armbruster's avatar
      sysemu: Split sysemu/runstate.h off sysemu/sysemu.h · 54d31236
      Markus Armbruster authored
      
      sysemu/sysemu.h is a rather unfocused dumping ground for stuff related
      to the system-emulator.  Evidence:
      
      * It's included widely: in my "build everything" tree, changing
        sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600
        objects (not counting tests and objects that don't depend on
        qemu/osdep.h, down from 5400 due to the previous two commits).
      
      * It pulls in more than a dozen additional headers.
      
      Split stuff related to run state management into its own header
      sysemu/runstate.h.
      
      Touching sysemu/sysemu.h now recompiles some 850 objects.  qemu/uuid.h
      also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400
      to 4200.  Touching new sysemu/runstate.h recompiles some 500 objects.
      
      Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also
      add qemu/main-loop.h.
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-30-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      [Unbreak OS-X build]
      54d31236
  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. Oct 02, 2018
    • Marc-André Lureau's avatar
      util: add qemu_write_pidfile() · 9e6bdef2
      Marc-André Lureau authored
      
      There are variants of qemu_create_pidfile() in qemu-pr-helper and
      qemu-ga. Let's have a common implementation in libqemuutil.
      
      The code is initially based from pr-helper write_pidfile(), with
      various improvements and suggestions from Daniel Berrangé:
      
        QEMU will leave the pidfile existing on disk when it exits which
        initially made me think it avoids the deletion race. The app
        managing QEMU, however, may well delete the pidfile after it has
        seen QEMU exit, and even if the app locks the pidfile before
        deleting it, there is still a race.
      
        eg consider the following sequence
      
              QEMU 1        libvirtd        QEMU 2
      
        1.    lock(pidfile)
      
        2.    exit()
      
        3.                 open(pidfile)
      
        4.                 lock(pidfile)
      
        5.                                  open(pidfile)
      
        6.                 unlink(pidfile)
      
        7.                 close(pidfile)
      
        8.                                  lock(pidfile)
      
        IOW, at step 8 the new QEMU has successfully acquired the lock, but
        the pidfile no longer exists on disk because it was deleted after
        the original QEMU exited.
      
        While we could just say no external app should ever delete the
        pidfile, I don't think that is satisfactory as people don't read
        docs, and admins don't like stale pidfiles being left around on
        disk.
      
        To make this robust, I think we might want to copy libvirt's
        approach to pidfile acquisition which runs in a loop and checks that
        the file on disk /after/ acquiring the lock matches the file that
        was locked. Then we could in fact safely let QEMU delete its own
        pidfiles on clean exit..
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20180831145314.14736-2-marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9e6bdef2
  9. May 08, 2018
  10. May 23, 2017
    • Eric Blake's avatar
      shutdown: Add source information to SHUTDOWN and RESET · cf83f140
      Eric Blake authored
      
      Time to wire up all the call sites that request a shutdown or
      reset to use the enum added in the previous patch.
      
      It would have been less churn to keep the common case with no
      arguments as meaning guest-triggered, and only modified the
      host-triggered code paths, via a wrapper function, but then we'd
      still have to audit that I didn't miss any host-triggered spots;
      changing the signature forces us to double-check that I correctly
      categorized all callers.
      
      Since command line options can change whether a guest reset request
      causes an actual reset vs. a shutdown, it's easy to also add the
      information to reset requests.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts]
      Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part]
      Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts]
      Message-Id: <20170515214114.15442-5-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      cf83f140
  11. 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
  12. Sep 11, 2015
  13. Nov 02, 2014
    • Michael Tokarev's avatar
      pidfile: stop making pidfile error a special case · fee78fd6
      Michael Tokarev authored
      
      In case of -daemonize, we write non-zero to the daemon
      pipe only if pidfile creation failed, so the parent will
      report error about pidfile problem.  There's no need to
      make special case for this, since all other errors are
      reported by the child just fine.  Let the parent report
      error and simplify logic in os_daemonize().
      
      This way, we don't need os_pidfile_error() function, since
      it only prints error now, so put the error reporting printf
      into the only place where qemu_create_pidfile() is called,
      in vl.c.
      
      While at it, fix wrong indentation in os_daemonize().
      
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      fee78fd6
  14. Feb 20, 2014
  15. Apr 12, 2013
  16. Dec 19, 2012
  17. Jun 15, 2012
  18. Dec 22, 2011
  19. Dec 06, 2011
  20. Nov 09, 2011
  21. Oct 21, 2011
  22. Aug 21, 2011
  23. Jun 15, 2011
    • Andreas Färber's avatar
      Introduce format string for pid_t · 953ffe0f
      Andreas Färber authored
      
      BeOS and Haiku on i386 use long for 32-bit types, including pid_t.
      Using %d with pid_t therefore results in a warning.
      
      Unfortunately POSIX:2008 does not define a PRId* string for pid_t.
      
      In some places pid_t was previously casted to long and %ld hardcoded.
      The predecessor of this patch added another upcast for the simpletrace
      filename but was not applied to date.
      
      Since new uses of pid_t with %d keep creeping in, let's instead define
      an OS-dependent format string and use that consistently.
      
      Cc: Stefan Hajnoczi <stefanha@gmail.com>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Ingo Weinhold <ingo_weinhold@gmx.de>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: default avatarAndreas Färber <andreas.faerber@web.de>
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      953ffe0f
  24. Mar 16, 2011
  25. Mar 13, 2011
  26. Feb 20, 2011
  27. Oct 30, 2010
  28. Oct 09, 2010
  29. Aug 15, 2010
  30. Jun 12, 2010
Loading