qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 4051a1: hw/scsi/lsi53c895a: Do not abort when


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 4051a1: hw/scsi/lsi53c895a: Do not abort when DMA requeste...
Date: Thu, 16 Dec 2021 10:19:37 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4051a1f062c9b336343e22efa291ed15d235cd4f
      
https://github.com/qemu/qemu/commit/4051a1f062c9b336343e22efa291ed15d235cd4f
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2021-11-30 (Tue, 30 Nov 2021)

  Changed paths:
    M hw/scsi/lsi53c895a.c

  Log Message:
  -----------
  hw/scsi/lsi53c895a: Do not abort when DMA requested and no data queued

If asked for DMA request and no data is available, simply wait
for data to be queued, do not abort. This fixes:

  $ cat << EOF | \
    qemu-system-i386 -nographic -M q35,accel=qtest -serial none \
      -monitor none -qtest stdio -trace lsi* \
      -drive if=none,id=drive0,file=null-co://,file.read-zeroes=on,format=raw \
      -device lsi53c895a,id=scsi0 -device 
scsi-hd,drive=drive0,bus=scsi0.0,channel=0,scsi-id=0,lun=0
  lsi_reset Reset
  lsi_reg_write Write reg DSP2 0x2e = 0xff
  lsi_reg_write Write reg DSP3 0x2f = 0xff
  lsi_execute_script SCRIPTS dsp=0xffff0000 opcode 0x184a3900 arg 0x4a8b2d75
  qemu-system-i386: hw/scsi/lsi53c895a.c:624: lsi_do_dma: Assertion 
`s->current' failed.

  (gdb) bt
  #5  0x00007ffff4e8a3a6 in __GI___assert_fail
      (assertion=0x5555560accbc "s->current", file=0x5555560acc28 
"hw/scsi/lsi53c895a.c", line=624, function=0x5555560adb18 "lsi_do_dma") at 
assert.c:101
  #6  0x0000555555aa33b9 in lsi_do_dma (s=0x555557805ac0, out=1) at 
hw/scsi/lsi53c895a.c:624
  #7  0x0000555555aa5042 in lsi_execute_script (s=0x555557805ac0) at 
hw/scsi/lsi53c895a.c:1250
  #8  0x0000555555aa757a in lsi_reg_writeb (s=0x555557805ac0, offset=47, 
val=255 '\377') at hw/scsi/lsi53c895a.c:1984
  #9  0x0000555555aa875b in lsi_mmio_write (opaque=0x555557805ac0, addr=47, 
val=255, size=1) at hw/scsi/lsi53c895a.c:2095

Cc: qemu-stable@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Vadim Rozenfeld <vrozenfe@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reported-by: Jérôme Poulin <jeromepoulin@gmail.com>
Reported-by: Ruhr-University <bugs-syssec@rub.de>
Reported-by: Gaoning Pan <pgn@zju.edu.cn>
Reported-by: Cheolwoo Myung <cwmyung@snu.ac.kr>
Fixes: b96a0da06bd ("lsi: move dma_len+dma_buf into lsi_request")
BugLink: https://bugs.launchpad.net/qemu/+bug/697510
BugLink: https://bugs.launchpad.net/qemu/+bug/1905521
BugLink: https://bugs.launchpad.net/qemu/+bug/1908515
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/84
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/305
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/552
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20211123111732.83137-2-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: aa62976c9d207d85fd503af7dc397c19e5782dae
      
https://github.com/qemu/qemu/commit/aa62976c9d207d85fd503af7dc397c19e5782dae
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2021-11-30 (Tue, 30 Nov 2021)

  Changed paths:
    M MAINTAINERS
    A tests/qtest/fuzz-lsi53c895a-test.c
    M tests/qtest/meson.build

  Log Message:
  -----------
  tests/qtest: Add fuzz-lsi53c895a-test

Without the previous commit, this test triggers:

  $ make check-qtest-x86_64
  [...]
  Running test qtest-x86_64/fuzz-lsi53c895a-test
  qemu-system-x86_64: hw/scsi/lsi53c895a.c:624: lsi_do_dma: Assertion 
`s->current' failed.
  ERROR qtest-x86_64/fuzz-lsi53c895a-test - too few tests run (expected 1, got 
0)

Suggested-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20211123111732.83137-3-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 226fad7371c6559d4f0bdca66d0e08d45d3cb767
      
https://github.com/qemu/qemu/commit/226fad7371c6559d4f0bdca66d0e08d45d3cb767
  Author: Yanan Wang <wangyanan55@huawei.com>
  Date:   2021-11-30 (Tue, 30 Nov 2021)

  Changed paths:
    M qapi/machine.json

  Log Message:
  -----------
  qapi/machine.json: Fix incorrect description for die-id

In terms of scope, die-id should mean "the die number within
socket the CPU belongs to" instead of "the die number within
node/board the CPU belongs to". Fix it to avoid confusing
the Doc reader.

Fixes: 176d2cda0d ("i386/cpu: Consolidate die-id validity in smp context")
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20211122032651.16064-1-wangyanan55@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 4006a27c5e44734350009262efb0e2ec8da5ff09
      
https://github.com/qemu/qemu/commit/4006a27c5e44734350009262efb0e2ec8da5ff09
  Author: Evan Miller <emmiller@gmail.com>
  Date:   2021-11-30 (Tue, 30 Nov 2021)

  Changed paths:
    M scripts/entitlement.sh

  Log Message:
  -----------
  scripts/entitlement.sh: Use backward-compatible cp flags

Older versions of Mac OS X do not support cp -a. The cp man page indicates
that -a is equivalent to -pPR.

Signed-off-by: Evan Miller <emmiller@gmail.com>
Message-Id: <40635C6E-059A-4146-B1E2-F6376700EE85@gmail.com>
[Leave out -R, these are files and not directories. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a4663f1a5506626175fc64c86e52135587c36872
      
https://github.com/qemu/qemu/commit/a4663f1a5506626175fc64c86e52135587c36872
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M include/hw/virtio/virtio-gpu-bswap.h

  Log Message:
  -----------
  virtio-gpu: do not byteswap padding

In Linux 5.16, the padding of struct virtio_gpu_ctrl_hdr has become a
single-byte field followed by a uint8_t[3] array of padding bytes,
and virtio_gpu_ctrl_hdr_bswap does not compile anymore.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211111110604.207376-2-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 43709a0ca3b09e952bde3f38112f1d7fbf7c65b1
      
https://github.com/qemu/qemu/commit/43709a0ca3b09e952bde3f38112f1d7fbf7c65b1
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M include/standard-headers/drm/drm_fourcc.h
    M include/standard-headers/linux/ethtool.h
    M include/standard-headers/linux/fuse.h
    M include/standard-headers/linux/pci_regs.h
    M include/standard-headers/linux/virtio_gpu.h
    M include/standard-headers/linux/virtio_ids.h
    M include/standard-headers/linux/virtio_vsock.h
    M linux-headers/asm-arm64/unistd.h
    M linux-headers/asm-generic/unistd.h
    M linux-headers/asm-mips/unistd_n32.h
    M linux-headers/asm-mips/unistd_n64.h
    M linux-headers/asm-mips/unistd_o32.h
    M linux-headers/asm-powerpc/unistd_32.h
    M linux-headers/asm-powerpc/unistd_64.h
    M linux-headers/asm-s390/unistd_32.h
    M linux-headers/asm-s390/unistd_64.h
    M linux-headers/asm-x86/kvm.h
    M linux-headers/asm-x86/unistd_32.h
    M linux-headers/asm-x86/unistd_64.h
    M linux-headers/asm-x86/unistd_x32.h
    M linux-headers/linux/kvm.h

  Log Message:
  -----------
  linux-headers: update to 5.16-rc1

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211111110604.207376-3-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ecd39d620b0a3938dc3a80721e8aa436075d2916
      
https://github.com/qemu/qemu/commit/ecd39d620b0a3938dc3a80721e8aa436075d2916
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M gdbstub.c

  Log Message:
  -----------
  gdbstub: reject unsupported flags in handle_set_qemu_sstep

handle_query_qemu_sstepbits is reporting NOIRQ and NOTIMER bits
even if they are not supported (as is the case with record/replay).
Instead, store the supported singlestep flags and reject
any unsupported bits in handle_set_qemu_sstep.  This removes
the need for the get_sstep_flags() wrapper.

While at it, move the variables in GDBState, instead of using
global variables.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
[Extracted from Maxim's patch into a separate commit. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211111110604.207376-4-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 12bc5b4cd5e59b3f8689b71d9d038a55e2777cdc
      
https://github.com/qemu/qemu/commit/12bc5b4cd5e59b3f8689b71d9d038a55e2777cdc
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M accel/kvm/kvm-all.c
    M gdbstub.c
    M include/sysemu/kvm.h

  Log Message:
  -----------
  gdbstub, kvm: let KVM report supported singlestep flags

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
[Extracted from Maxim's patch into a separate commit. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211111110604.207376-5-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: fd2ddd168935690056a42b0ffe8f2480d8537751
      
https://github.com/qemu/qemu/commit/fd2ddd168935690056a42b0ffe8f2480d8537751
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M accel/kvm/kvm-all.c

  Log Message:
  -----------
  kvm: add support for KVM_GUESTDBG_BLOCKIRQ

Use the KVM_GUESTDBG_BLOCKIRQ debug flag if supported.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
[Extracted from Maxim's patch into a separate commit. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211111110604.207376-6-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 1105812382e1126d86dddc16b3700f8c79dc93d1
      
https://github.com/qemu/qemu/commit/1105812382e1126d86dddc16b3700f8c79dc93d1
  Author: Yang Zhong <yang.zhong@intel.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M hw/core/numa.c
    M hw/i386/acpi-build.c
    M hw/i386/sgx-epc.c
    M hw/i386/sgx-stub.c
    M hw/i386/sgx.c
    M include/hw/i386/sgx-epc.h
    M monitor/hmp-cmds.c
    M qapi/machine.json
    M qemu-options.hx

  Log Message:
  -----------
  numa: Enable numa for SGX EPC sections

The basic SGX did not enable numa for SGX EPC sections, which
result in all EPC sections located in numa node 0. This patch
enable SGX numa function in the guest and the EPC section can
work with RAM as one numa node.

The Guest kernel related log:
[    0.009981] ACPI: SRAT: Node 0 PXM 0 [mem 0x180000000-0x183ffffff]
[    0.009982] ACPI: SRAT: Node 1 PXM 1 [mem 0x184000000-0x185bfffff]
The SRAT table can normally show SGX EPC sections menory info in different
numa nodes.

The SGX EPC numa related command:
 ......
 -m 4G,maxmem=20G \
 -smp sockets=2,cores=2 \
 -cpu host,+sgx-provisionkey \
 -object memory-backend-ram,size=2G,host-nodes=0,policy=bind,id=node0 \
 -object 
memory-backend-epc,id=mem0,size=64M,prealloc=on,host-nodes=0,policy=bind \
 -numa node,nodeid=0,cpus=0-1,memdev=node0 \
 -object memory-backend-ram,size=2G,host-nodes=1,policy=bind,id=node1 \
 -object 
memory-backend-epc,id=mem1,size=28M,prealloc=on,host-nodes=1,policy=bind \
 -numa node,nodeid=1,cpus=2-3,memdev=node1 \
 -M 
sgx-epc.0.memdev=mem0,sgx-epc.0.node=0,sgx-epc.1.memdev=mem1,sgx-epc.1.node=1 \
 ......

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-2-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 4755927ae12547c2e7cb22c5fa1b39038c6c11b1
      
https://github.com/qemu/qemu/commit/4755927ae12547c2e7cb22c5fa1b39038c6c11b1
  Author: Yang Zhong <yang.zhong@intel.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M hw/i386/sgx.c
    M qapi/misc-target.json

  Log Message:
  -----------
  numa: Support SGX numa in the monitor and Libvirt interfaces

Add the SGXEPCSection list into SGXInfo to show the multiple
SGX EPC sections detailed info, not the total size like before.
This patch can enable numa support for 'info sgx' command and
QMP interfaces. The new interfaces show each EPC section info
in one numa node. Libvirt can use QMP interface to get the
detailed host SGX EPC capabilities to decide how to allocate
host EPC sections to guest.

(qemu) info sgx
 SGX support: enabled
 SGX1 support: enabled
 SGX2 support: enabled
 FLC support: enabled
 NUMA node #0: size=67108864
 NUMA node #1: size=29360128

The QMP interface show:
(QEMU) query-sgx
{"return": {"sgx": true, "sgx2": true, "sgx1": true, "sections": \
[{"node": 0, "size": 67108864}, {"node": 1, "size": 29360128}], "flc": true}}

(QEMU) query-sgx-capabilities
{"return": {"sgx": true, "sgx2": true, "sgx1": true, "sections": \
[{"node": 0, "size": 17070817280}, {"node": 1, "size": 17079205888}], "flc": 
true}}

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-4-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d1889b36098c79e2e6ac90faf3d0dc5ec0057677
      
https://github.com/qemu/qemu/commit/d1889b36098c79e2e6ac90faf3d0dc5ec0057677
  Author: Yang Zhong <yang.zhong@intel.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M docs/system/i386/sgx.rst

  Log Message:
  -----------
  doc: Add the SGX numa description

Add the SGX numa reference command and how to check if
SGX numa is support or not with multiple EPC sections.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-5-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: cbe08c35cfa8f96125512a8aa3e1bf251b1410a5
      
https://github.com/qemu/qemu/commit/cbe08c35cfa8f96125512a8aa3e1bf251b1410a5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: remove dead variables

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


  Commit: 29eb5c2c86f935b0e9700fad2ecfe8a32b011d57
      
https://github.com/qemu/qemu/commit/29eb5c2c86f935b0e9700fad2ecfe8a32b011d57
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-12-16 (Thu, 16 Dec 2021)

  Changed paths:
    M MAINTAINERS
    M accel/kvm/kvm-all.c
    M configure
    M docs/system/i386/sgx.rst
    M gdbstub.c
    M hw/core/numa.c
    M hw/i386/acpi-build.c
    M hw/i386/sgx-epc.c
    M hw/i386/sgx-stub.c
    M hw/i386/sgx.c
    M hw/scsi/lsi53c895a.c
    M include/hw/i386/sgx-epc.h
    M include/hw/virtio/virtio-gpu-bswap.h
    M include/standard-headers/drm/drm_fourcc.h
    M include/standard-headers/linux/ethtool.h
    M include/standard-headers/linux/fuse.h
    M include/standard-headers/linux/pci_regs.h
    M include/standard-headers/linux/virtio_gpu.h
    M include/standard-headers/linux/virtio_ids.h
    M include/standard-headers/linux/virtio_vsock.h
    M include/sysemu/kvm.h
    M linux-headers/asm-arm64/unistd.h
    M linux-headers/asm-generic/unistd.h
    M linux-headers/asm-mips/unistd_n32.h
    M linux-headers/asm-mips/unistd_n64.h
    M linux-headers/asm-mips/unistd_o32.h
    M linux-headers/asm-powerpc/unistd_32.h
    M linux-headers/asm-powerpc/unistd_64.h
    M linux-headers/asm-s390/unistd_32.h
    M linux-headers/asm-s390/unistd_64.h
    M linux-headers/asm-x86/kvm.h
    M linux-headers/asm-x86/unistd_32.h
    M linux-headers/asm-x86/unistd_64.h
    M linux-headers/asm-x86/unistd_x32.h
    M linux-headers/linux/kvm.h
    M monitor/hmp-cmds.c
    M qapi/machine.json
    M qapi/misc-target.json
    M qemu-options.hx
    M scripts/entitlement.sh
    A tests/qtest/fuzz-lsi53c895a-test.c
    M tests/qtest/meson.build

  Log Message:
  -----------
  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* improve compatibility for macOS scripts/entitlement.sh (Evan)
* add support for KVM_GUESTDBG_BLOCKIRQ (Maxim)
* update linux-headers to Linux 5.16 (myself)
* configure cleanups (myself)
* lsi53c895a assertion failure fix (Philippe)
* fix incorrect description for die-id (Yanan)
* support for NUMA in SGX enclave memory (Yang Zhong)

# gpg: Signature made Wed 15 Dec 2021 02:49:44 AM PST
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [unknown]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  configure: remove dead variables
  doc: Add the SGX numa description
  numa: Support SGX numa in the monitor and Libvirt interfaces
  numa: Enable numa for SGX EPC sections
  kvm: add support for KVM_GUESTDBG_BLOCKIRQ
  gdbstub, kvm: let KVM report supported singlestep flags
  gdbstub: reject unsupported flags in handle_set_qemu_sstep
  linux-headers: update to 5.16-rc1
  virtio-gpu: do not byteswap padding
  scripts/entitlement.sh: Use backward-compatible cp flags
  qapi/machine.json: Fix incorrect description for die-id
  tests/qtest: Add fuzz-lsi53c895a-test
  hw/scsi/lsi53c895a: Do not abort when DMA requested and no data queued

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/69a80f14ce5c...29eb5c2c86f9



reply via email to

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