qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] efb1c1: hw/scsi/lsi53c895a: add timer to scri


From: Paolo Bonzini
Subject: [Qemu-commits] [qemu/qemu] efb1c1: hw/scsi/lsi53c895a: add timer to scripts processing
Date: Tue, 05 Mar 2024 03:16:49 -0800

  Branch: refs/heads/coverity
  Home:   https://github.com/qemu/qemu
  Commit: efb1c1d294a097507acdd9f1c725d140f347bf02
      
https://github.com/qemu/qemu/commit/efb1c1d294a097507acdd9f1c725d140f347bf02
  Author: Sven Schnelle <svens@stackframe.org>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M hw/scsi/lsi53c895a.c
    M hw/scsi/trace-events

  Log Message:
  -----------
  hw/scsi/lsi53c895a: add timer to scripts processing

HP-UX 10.20 seems to make the lsi53c895a spinning on a memory location
under certain circumstances. As the SCSI controller and CPU are not
running at the same time this loop will never finish. After some
time, the check loop interrupts with a unexpected device disconnect.
This works, but is slow because the kernel resets the scsi controller.
Instead of signaling UDC, start a timer and exit the loop. Until the
timer fires, the CPU can process instructions which might changes the
memory location.

The limit of instructions is also reduced because scripts running on
the SCSI processor are usually very short. This keeps the time until
the loop is exit short.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Message-ID: <20240229204407.1699260-1-svens@stackframe.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 50a715c77c23d963bb5196caaedcf555833c1f24
      
https://github.com/qemu/qemu/commit/50a715c77c23d963bb5196caaedcf555833c1f24
  Author: Dmitrii Gavrilov <ds-gavr@yandex-team.ru>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M system/qdev-monitor.c

  Log Message:
  -----------
  system/qdev-monitor: move drain_call_rcu call under if (!dev) in 
qmp_device_add()

Original goal of addition of drain_call_rcu to qmp_device_add was to cover
the failure case of qdev_device_add. It seems call of drain_call_rcu was
misplaced in 7bed89958bfbf40df what led to waiting for pending RCU callbacks
under happy path too. What led to overall performance degradation of
qmp_device_add.

In this patch call of drain_call_rcu moved under handling of failure of
qdev_device_add.

Signed-off-by: Dmitrii Gavrilov <ds-gavr@yandex-team.ru>
Message-ID: <20231103105602.90475-1-ds-gavr@yandex-team.ru>
Fixes: 7bed89958bf ("device_core: use drain_call_rcu in in qmp_device_add", 
2020-10-12)
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6ed0b8431ca71d14a1f73947b5303f96524ca339
      
https://github.com/qemu/qemu/commit/6ed0b8431ca71d14a1f73947b5303f96524ca339
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson: Remove --warn-common ldflag

--warn-common ldflag causes warnings for multiple definitions of
___asan_globals_registered when enabling AddressSanitizer with clang.
The warning is somewhat obsolete so just remove it.

The common block is used to allow duplicate definitions of uninitialized
global variables. In the past, GCC and clang used to place such
variables in a common block by default, which prevented programmers for
noticing accidental duplicate definitions. Commit 49237acdb725 ("Enable
ld flag --warn-common") added --warn-common ldflag so that ld warns in
such a case.

Today, both of GCC and clang don't use common blocks by default[1][2] so
any remaining use of common blocks should be intentional. Remove
--warn-common ldflag to suppress warnings for intentional use of
common blocks.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678
[2]: https://reviews.llvm.org/D75056

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20240304-common-v1-1-1a2005d1f350@daynix.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9ae56d2e469629858b14a8976b2de77cf154d40f
      
https://github.com/qemu/qemu/commit/9ae56d2e469629858b14a8976b2de77cf154d40f
  Author: Sven Schnelle <svens@stackframe.org>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M hw/scsi/lsi53c895a.c

  Log Message:
  -----------
  hw/scsi/lsi53c895a: stop script on phase mismatch

Netbsd isn't happy with qemu lsi53c895a emulation:

cd0(esiop0:0:2:0): command with tag id 0 reset
esiop0: autoconfiguration error: phase mismatch without command
esiop0: autoconfiguration error: unhandled scsi interrupt, sist=0x80 sstat1=0x0 
DSA=0x23a64b1 DSP=0x50

This is because lsi_bad_phase() triggers a phase mismatch, which
stops SCRIPT processing. However, after returning to
lsi_command_complete(), SCRIPT is restarted with lsi_resume_script().
Fix this by adding a return value to lsi_bad_phase(), and only resume
script processing when lsi_bad_phase() didn't trigger a host interrupt.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Tested-by: Helge Deller <deller@gmx.de>
Message-ID: <20240302214453.2071388-1-svens@stackframe.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ec2c2fce769234cc7298bc9a78b999fffa46d497
      
https://github.com/qemu/qemu/commit/ec2c2fce769234cc7298bc9a78b999fffa46d497
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M scripts/coverity-scan/run-coverity-scan

  Log Message:
  -----------
  run-coverity-scan: add --check-upload-only option

Add an option to check if upload is permitted without actually
attempting a build.  This can be useful to add a third outcome
beyond success and failure---namely, a CI job can self-cancel
if the uploading quota has been reached.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a6c474759d0438f96c52241b3675856bc06abe5c
      
https://github.com/qemu/qemu/commit/a6c474759d0438f96c52241b3675856bc06abe5c
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M .gitlab-ci.d/base.yml
    M .gitlab-ci.d/buildtest.yml

  Log Message:
  -----------
  gitlab-ci: add manual job to run Coverity

Add a job that can be run, either manually or on a schedule, to upload
a build to Coverity Scan.  The job uses the run-coverity-scan script
in multiple phases of check, download tools and upload, in order to
avoid both wasting time (skip everything if you are above the upload
quota) and avoid filling the log with the progress of downloading
the tools.

The job is intended to run on a scheduled pipeline run, and scheduled
runs will not get any other job.  It requires two variables to be in
GitLab CI, COVERITY_TOKEN and COVERITY_EMAIL.  Those are already set up
in qemu-project's configuration as protected and masked variables.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 4ec4bbf14fa8d32cf4fe780e9ab3b2cff664a35b
      
https://github.com/qemu/qemu/commit/4ec4bbf14fa8d32cf4fe780e9ab3b2cff664a35b
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M hw/intc/apic.c

  Log Message:
  -----------
  hw/intc/apic: fix memory leak

deliver_bitmask is allocated on the heap in apic_deliver(), but there
are many paths in the function that return before the corresponding
g_free() is reached.  Fix this by switching to g_autofree and, while at
it, also switch to g_new.  Do the same in apic_deliver_irq() as well
for consistency.

Fixes: b5ee0468e9d ("apic: add support for x2APIC mode", 2024-02-14)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bui Quang Minh <minhquangbui99@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 76d1d9bb14b42ba71de9df9b4475483e664644ec
      
https://github.com/qemu/qemu/commit/76d1d9bb14b42ba71de9df9b4475483e664644ec
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M util/oslib-posix.c

  Log Message:
  -----------
  oslib-posix: fix memory leak in touch_all_pages

touch_all_pages() can return early, before creating threads.  In this case,
however, it leaks the MemsetContext that it has allocated at the
beginning of the function.

Reported by Coverity as CID 1534922.

Fixes: 04accf43df8 ("oslib-posix: initialize backend memory objects in 
parallel", 2024-02-06)
Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9d75b4eae90475fd39947447f0be7036085b0d86
      
https://github.com/qemu/qemu/commit/9d75b4eae90475fd39947447f0be7036085b0d86
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M .gitlab-ci.d/buildtest.yml
    M configs/devices/mips-softmmu/common.mak
    M configs/devices/mips64el-softmmu/default.mak
    M hw/display/Kconfig
    M hw/mips/Kconfig

  Log Message:
  -----------
  mips: do not list individual devices from configs/

Add new "select" and "imply" directives if needed.  The resulting
config-devices.mak files are the same as before.
Builds without default devices will become much smaller
than before, and qtests fail (as expected, though suboptimal)
for mips64-softmmu because most tests do not use -nodefaults,
so remove it from build-without-defaults

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3af1c942d2eed24d8e8b2041c483d3573bbeb654
      
https://github.com/qemu/qemu/commit/3af1c942d2eed24d8e8b2041c483d3573bbeb654
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M target/i386/tcg/emit.c.inc
    M target/i386/tcg/translate.c

  Log Message:
  -----------
  target/i386: use TSTEQ/TSTNE to test low bits

When testing the sign bit or equality to zero of a partial register, it
is useful to use a single TSTEQ or TSTNE operation.  It can also be used
to test the parity flag, using bit 0 of the population count.

Do not do this for target_ulong-sized values however; the optimizer would
produce a comparison against zero anyway, and it avoids shifts by 64
which are undefined behavior.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8e6b9435e9f76af85c6b06d7a318b737209704d0
      
https://github.com/qemu/qemu/commit/8e6b9435e9f76af85c6b06d7a318b737209704d0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M target/i386/tcg/translate.c

  Log Message:
  -----------
  target/i386: use TSTEQ/TSTNE to check flags

The new conditions obviously come in handy when testing individual bits
of EFLAGS, and they make it possible to remove the .mask field of
CCPrepare.

Lowering to shift+and is done by the optimizer if necessary.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8d085756cde647c11d4b86124c89c5a671bbb2f0
      
https://github.com/qemu/qemu/commit/8d085756cde647c11d4b86124c89c5a671bbb2f0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M target/i386/tcg/translate.c

  Log Message:
  -----------
  target/i386: remove mask from CCPrepare

With the introduction of TSTEQ and TSTNE the .mask field is always -1,
so remove all the now-unnecessary code.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


Compare: https://github.com/qemu/qemu/compare/efb1c1d294a0%5E...8d085756cde6

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



reply via email to

[Prev in Thread] Current Thread [Next in Thread]