Skip to content
Snippets Groups Projects
  1. 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
  2. Apr 07, 2020
    • Stefan Reiter's avatar
      job: take each job's lock individually in job_txn_apply · b660a84b
      Stefan Reiter authored
      
      All callers of job_txn_apply hold a single job's lock, but different
      jobs within a transaction can have different contexts, thus we need to
      lock each one individually before applying the callback function.
      
      Similar to job_completed_txn_abort this also requires releasing the
      caller's context before and reacquiring it after to avoid recursive
      locks which might break AIO_WAIT_WHILE in the callback. This is safe, since
      existing code would already have to take this into account, lest
      job_completed_txn_abort might have broken.
      
      This also brings to light a different issue: When a callback function in
      job_txn_apply moves it's job to a different AIO context, callers will
      try to release the wrong lock (now that we re-acquire the lock
      correctly, previously it would just continue with the old lock, leaving
      the job unlocked for the rest of the return path). Fix this by not caching
      the job's context.
      
      This is only necessary for qmp_block_job_finalize, qmp_job_finalize and
      job_exit, since everyone else calls through job_exit.
      
      One test needed adapting, since it calls job_finalize directly, so it
      manually needs to acquire the correct context.
      
      Signed-off-by: default avatarStefan Reiter <s.reiter@proxmox.com>
      Message-Id: <20200407115651.69472-2-s.reiter@proxmox.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      b660a84b
  3. Mar 11, 2020
  4. 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
  5. Aug 31, 2018
    • John Snow's avatar
      jobs: canonize Error object · 3d1f8b07
      John Snow authored
      
      Jobs presently use both an Error object in the case of the create job,
      and char strings in the case of generic errors elsewhere.
      
      Unify the two paths as just j->err, and remove the extra argument from
      job_completed. The integer error code for job_completed is kept for now,
      to be removed shortly in a separate patch.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Message-id: 20180830015734.19765-3-jsnow@redhat.com
      [mreitz: Dropped a superfluous g_strdup()]
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      3d1f8b07
  6. May 30, 2018
    • Kevin Wolf's avatar
      job: Add error message for failing jobs · 1266c9b9
      Kevin Wolf authored
      
      So far we relied on job->ret and strerror() to produce an error message
      for failed jobs. Not surprisingly, this tends to result in completely
      useless messages.
      
      This adds a Job.error field that can contain an error string for a
      failing job, and a parameter to job_completed() that sets the field. As
      a default, if NULL is passed, we continue to use strerror(job->ret).
      
      All existing callers are changed to pass NULL. They can be improved in
      separate patches.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
      1266c9b9
  7. May 23, 2018
Loading