qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d31347: scsi-disk: pass sense correctly for g


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] d31347: scsi-disk: pass sense correctly for guest-recovera...
Date: Tue, 16 Jul 2019 08:05:23 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d31347f5ff6c637a11245d244ff5449a94bf8256
      
https://github.com/qemu/qemu/commit/d31347f5ff6c637a11245d244ff5449a94bf8256
  Author: Shinichiro Kawasaki <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: pass sense correctly for guest-recoverable errors

When an error was passed down to the guest because it was recoverable,
the sense length was not copied from the SG_IO data.  As a result,
the guest saw the CHECK CONDITION status but not the sense data.

Signed-off-by: Shinichiro Kawasaki <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: bdf9613b7f87248eb84884b0bdff94e8ad0eab9b
      
https://github.com/qemu/qemu/commit/bdf9613b7f87248eb84884b0bdff94e8ad0eab9b
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M hw/scsi/scsi-disk.c
    M include/scsi/utils.h
    M scsi/utils.c

  Log Message:
  -----------
  scsi: explicitly list guest-recoverable sense codes

It's not really possible to fit all sense codes into errno codes,
especially in such a way that sense codes can be properly categorized as
either guest-recoverable or host-handled.  Create a new function that
checks for guest recoverable sense, then scsi_sense_buf_to_errno only
needs to be called for host handled sense codes.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 396ce7b94eef57194740347a011b9bed355e39b2
      
https://github.com/qemu/qemu/commit/396ce7b94eef57194740347a011b9bed355e39b2
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M scsi/utils.c

  Log Message:
  -----------
  scsi: add guest-recoverable ZBC errors

When running basic operations on zoned storage from the guest via
scsi-block, the following ASCs are reported for write or read commands
due to unexpected zone status or write pointer status:

     21h 04h: UNALIGNED WRITE COMMAND
     21h 05h: WRITE BOUNDARY VIOLATION
     21h 06h: ATTEMPT TO READ INVALID DATA
     55h 0Eh: INSUFFICIENT ZONE RESOURCES

Reporting these ASCs to the guest, the user applications can handle
them to manage zone/write pointer status, or help the user application
developers to understand the failure reason and fix bugs.

Reported-by: Shinichiro Kawasaki <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 00e3cccdf413eb1093d8e9f26588da0fc82fa55f
      
https://github.com/qemu/qemu/commit/00e3cccdf413eb1093d8e9f26588da0fc82fa55f
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  iscsi: fix busy/timeout/task set full

In this case, do_retry was set without calling aio_co_wake, thus never
waking up the coroutine.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8c460269aa77b6c8e434ac57cf66b71aed00ff09
      
https://github.com/qemu/qemu/commit/8c460269aa77b6c8e434ac57cf66b71aed00ff09
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M block/iscsi.c
    M scsi/utils.c

  Log Message:
  -----------
  iscsi: base all handling of check condition on scsi_sense_to_errno

Now that scsi-disk is not using scsi_sense_to_errno to separate 
guest-recoverable
sense codes, we can modify it to simplify iscsi's own sense handling.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c2e8a52ca21473afbca4c98a362a299f5dbf13c8
      
https://github.com/qemu/qemu/commit/c2e8a52ca21473afbca4c98a362a299f5dbf13c8
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M util/Makefile.objs

  Log Message:
  -----------
  build-sys: remove slirp cflags from main-loop.o

Left over from c2d63650d962612cfa1b21302782d4cd12142c74.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 60ae0b91fe78862a6cedc03966929258fa7a39e1
      
https://github.com/qemu/qemu/commit/60ae0b91fe78862a6cedc03966929258fa7a39e1
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M contrib/rdmacm-mux/main.c

  Log Message:
  -----------
  rdmacm-mux: fix strcpy string warning

../contrib/rdmacm-mux/main.c: In function ‘parse_args’:
../contrib/rdmacm-mux/main.c:118:13: error: ‘strncpy’ specified bound 3835 
equals destination size [-Werror=stringop-truncation]
  118 |             strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX);

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 97fd1ea8c1065839ae4c19bfdc3590033a5b9788
      
https://github.com/qemu/qemu/commit/97fd1ea8c1065839ae4c19bfdc3590033a5b9788
  Author: Julio Montes <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M hw/i386/Kconfig
    M hw/i386/pc.c

  Log Message:
  -----------
  hw/i386: turn off vmport if CONFIG_VMPORT is disabled

vmport device is not included when CONFIG_VMPORT is disabled, hence
QEMU fails with the following error:

`Unknown device 'vmport' for bus 'ISA': unknown.`

v2: imply VMPORT (Paolo Bonzini )

Signed-off-by: Julio Montes <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 838ec1177c45812ff177a35ff93990e9eb7f70c3
      
https://github.com/qemu/qemu/commit/838ec1177c45812ff177a35ff93990e9eb7f70c3
  Author: King Wang <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: unref the memory region in simplify flatview

The memory region reference is increased when insert a range
into flatview range array, then decreased by destroy flatview.
If some flat range merged by flatview_simplify, the memory region
reference can not be decreased by destroy flatview any more.

In this case, start virtual machine by the command line:
qemu-system-x86_64
-name guest=ubuntu,debug-threads=on
-machine pc,accel=kvm,usb=off,dump-guest-core=off
-cpu host
-m 16384
-realtime mlock=off
-smp 8,sockets=2,cores=4,threads=1
-object 
memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages,share=yes,size=8589934592
-numa node,nodeid=0,cpus=0-3,memdev=ram-node0
-object 
memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages,share=yes,size=8589934592
-numa node,nodeid=1,cpus=4-7,memdev=ram-node1
-no-user-config
-nodefaults
-rtc base=utc
-no-shutdown
-boot strict=on
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x2
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3
-drive 
file=ubuntu.qcow2,format=qcow2,if=none,id=drive-virtio-disk0,cache=none,aio=native
-device 
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-chardev pty,id=charserial0
-device isa-serial,chardev=charserial0,id=serial0
-device usb-tablet,id=input0,bus=usb.0,port=1
-vnc 0.0.0.0:0
-device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x5
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
-msg timestamp=on

And run the script in guest OS:
while true
do
    setpci -s 00:06.0 04.b=03
        setpci -s 00:06.0 04.b=07
done

I found the reference of node0 HostMemoryBackendFile is a big one.
(gdb) p numa_info[0]->node_memdev->parent.ref
$6 = 1636278
(gdb)

Signed-off-by: King Wang<address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f2b143a28138a837e9a452e247e1703ebd6bf55e
      
https://github.com/qemu/qemu/commit/f2b143a28138a837e9a452e247e1703ebd6bf55e
  Author: Stefan Weil <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M target/i386/whpx-all.c

  Log Message:
  -----------
  Fix broken build with WHPX enabled

Signed-off-by: Stefan Weil <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e9ed92bd8d608722d05b4e6076355314dfd8c26c
      
https://github.com/qemu/qemu/commit/e9ed92bd8d608722d05b4e6076355314dfd8c26c
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M util/Makefile.objs
    R util/iohandler.c
    M util/main-loop.c

  Log Message:
  -----------
  util: merge main-loop.c and iohandler.c

main-loop.c has a dependency on iohandler.c, and everything breaks
if that dependency is instead satisfied by stubs/iohandler.c.
Just put everything in the same file to avoid strange dependencies
on the order of files in util-obj-y.

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 19752e09b4789f90721a96c4dcfa0d2e34510dfe
      
https://github.com/qemu/qemu/commit/19752e09b4789f90721a96c4dcfa0d2e34510dfe
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M hw/lm32/Kconfig

  Log Message:
  -----------
  hw/lm32/Kconfig: Milkymist One provides a USB 1.1 Controller

The Milkymist SoftUSB block provides the OHCI USB standard
(missed in 0858746b835).

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 874acb6f838a659cd010d0db4176e3f52d8f7a57
      
https://github.com/qemu/qemu/commit/874acb6f838a659cd010d0db4176e3f52d8f7a57
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M scripts/checkpatch.pl

  Log Message:
  -----------
  checkpatch: detect doubly-encoded UTF-8

Copy and pasting from Thunderbird's "view source" window results in double
encoding of multibyte UTF-8 sequences.  The appearance of those sequences is
very peculiar, so detect it and give an error despite the (low) possibility
of false positives.

As the major offender, I am also adding the same check to my applypatch-msg
and commit-msg hooks, but this will also cause patchew to croak loudly when
this mistake happens.

Signed-off-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 56e2ec9488b3b281130e064929f8ae5595d6ac39
      
https://github.com/qemu/qemu/commit/56e2ec9488b3b281130e064929f8ae5595d6ac39
  Author: Alex Williamson <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M target/i386/sev.c

  Log Message:
  -----------
  target/i386: sev: Do not unpin ram device memory region

The commit referenced below skipped pinning ram device memory when
ram blocks are added, we need to do the same when they're removed.

Cc: Brijesh Singh <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Fixes: cedc0ad539af ("target/i386: sev: Do not pin the ram device memory 
region")
Signed-off-by: Alex Williamson <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Singh, Brijesh <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a86588d6a91f3d7ca4a865969c37293889904305
      
https://github.com/qemu/qemu/commit/a86588d6a91f3d7ca4a865969c37293889904305
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M hw/usb/Kconfig
    M hw/usb/Makefile.objs

  Log Message:
  -----------
  hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI

The USB_EHCI entry currently include PCI code. Since the EHCI
implementation is already split in sysbus/PCI, add a new
USB_EHCI_PCI. There are no logical changes, but the Kconfig
dependencies tree is cleaner.

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c363fd483c011755d05e14baae0f777cfdfded9e
      
https://github.com/qemu/qemu/commit/c363fd483c011755d05e14baae0f777cfdfded9e
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M hw/usb/Kconfig

  Log Message:
  -----------
  hw/usb/Kconfig: USB_XHCI_NEC requires USB_XHCI

TYPE_NEC_XHCI is child of TYPE_XHCI. Add the missing Kconfig
dependency.

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2d1794e9562ef39e320a1e08a34831c152c18c1a
      
https://github.com/qemu/qemu/commit/2d1794e9562ef39e320a1e08a34831c152c18c1a
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M hw/Makefile.objs

  Log Message:
  -----------
  Makefile: do not repeat $(CONFIG_SOFTMMU) in hw/Makefile.objs

The device directories must be included only for softmmu builds.
Instead of repeating $(CONFIG_SOFTMMU), use an "if".

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3cae16db021601b5437622f89a86d5c489799fb3
      
https://github.com/qemu/qemu/commit/3cae16db021601b5437622f89a86d5c489799fb3
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-07-15 (Mon, 15 Jul 2019)

  Changed paths:
    M configure
    M scripts/create_config

  Log Message:
  -----------
  create_config: remove $(CONFIG_SOFTMMU) hack

CONFIG_TPM is defined to a rather weird $(CONFIG_SOFTMMU) so that it
expands to the right thing in hw/Makefile.objs.  This however is not
needed anymore and it has a corresponding hack in create_config
to turn it into "#define CONFIG_TPM 1".  Clean up.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 45d8bc3adedeceaf449d758aee1810bfbe6feff4
      
https://github.com/qemu/qemu/commit/45d8bc3adedeceaf449d758aee1810bfbe6feff4
  Author: Wei Yang <address@hidden>
  Date:   2019-07-16 (Tue, 16 Jul 2019)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: make sure char-pty message displayed by moving setbuf to the beginning

Recently we found a behavior change after commit 6ade45f2ac93611
('char-pty: Print "char device redirected" message to stdout').

When we redirect output to a file, the message "char device redirected
to PTY_NAME (label LABEL)" would not be seen at the beginning of the
file. Instead, the message is displayed after QEMU quit. This will block
test automation.

The reason is this message is printed after we set line buffer mode. So
move this to the beginning.

Signed-off-by: Wei Yang <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 697f59243f5a28b8a243ff5ad59e34bbecffcae1
      
https://github.com/qemu/qemu/commit/697f59243f5a28b8a243ff5ad59e34bbecffcae1
  Author: Peter Maydell <address@hidden>
  Date:   2019-07-16 (Tue, 16 Jul 2019)

  Changed paths:
    M block/iscsi.c
    M configure
    M contrib/rdmacm-mux/main.c
    M hw/Makefile.objs
    M hw/i386/Kconfig
    M hw/i386/pc.c
    M hw/lm32/Kconfig
    M hw/scsi/scsi-disk.c
    M hw/usb/Kconfig
    M hw/usb/Makefile.objs
    M include/scsi/utils.h
    M memory.c
    M scripts/checkpatch.pl
    M scripts/create_config
    M scsi/utils.c
    M target/i386/sev.c
    M target/i386/whpx-all.c
    M util/Makefile.objs
    R util/iohandler.c
    M util/main-loop.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* VFIO bugfix for AMD SEV (Alex)
* Kconfig improvements (Julio, Philippe)
* MemoryRegion reference counting bugfix (King Wang)
* Build system cleanups (Marc-André, myself)
* rdmacm-mux off-by-one (Marc-André)
* ZBC passthrough fixes (Shinichiro, myself)
* WHPX build fix (Stefan)
* char-pty fix (Wei Yang)

# gpg: Signature made Tue 16 Jul 2019 08:31:27 BST
# gpg:                using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>" [full]
# gpg:                 aka "Paolo Bonzini <address@hidden>" [full]
# 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

* remotes/bonzini/tags/for-upstream:
  vl: make sure char-pty message displayed by moving setbuf to the beginning
  create_config: remove $(CONFIG_SOFTMMU) hack
  Makefile: do not repeat $(CONFIG_SOFTMMU) in hw/Makefile.objs
  hw/usb/Kconfig: USB_XHCI_NEC requires USB_XHCI
  hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
  target/i386: sev: Do not unpin ram device memory region
  checkpatch: detect doubly-encoded UTF-8
  hw/lm32/Kconfig: Milkymist One provides a USB 1.1 Controller
  util: merge main-loop.c and iohandler.c
  Fix broken build with WHPX enabled
  memory: unref the memory region in simplify flatview
  hw/i386: turn off vmport if CONFIG_VMPORT is disabled
  rdmacm-mux: fix strcpy string warning
  build-sys: remove slirp cflags from main-loop.o
  iscsi: base all handling of check condition on scsi_sense_to_errno
  iscsi: fix busy/timeout/task set full
  scsi: add guest-recoverable ZBC errors
  scsi: explicitly list guest-recoverable sense codes
  scsi-disk: pass sense correctly for guest-recoverable errors

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/d7179eca739f...697f59243f5a



reply via email to

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