qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] bac658: hw/ppc/spapr: Fix virtio-scsi bootind


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] bac658: hw/ppc/spapr: Fix virtio-scsi bootindex handling f...
Date: Thu, 23 Nov 2017 05:48:43 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: bac658d1a4dc9dd637b2eb5006abda137071f17f
      
https://github.com/qemu/qemu/commit/bac658d1a4dc9dd637b2eb5006abda137071f17f
  Author: Thomas Huth <address@hidden>
  Date:   2017-11-22 (Wed, 22 Nov 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  hw/ppc/spapr: Fix virtio-scsi bootindex handling for LUNs >= 256

LUNs >= 256 have to be encoded with the so-called "flat space
addressing method" for virtio-scsi, where an additional bit has to
be set. SLOF already took care of this with the following commit:

 https://git.qemu.org/?p=SLOF.git;a=commitdiff;h=f72a37713fea47da
 (see https://bugzilla.redhat.com/show_bug.cgi?id=1431584 for details)

But QEMU does not use this encoding yet for device tree paths
that have to be handed over to SLOF to deal with the "bootindex"
property, so SLOF currently fails to boot from virtio-scsi devices
with LUNs >= 256 in the right boot order. Fix it by using the bit
to indicate the "flat space addressing method" for LUNs >= 256.

Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 6c3bc244d3cbdc5545504fda4fae0238ec36a3c0
      
https://github.com/qemu/qemu/commit/6c3bc244d3cbdc5545504fda4fae0238ec36a3c0
  Author: David Gibson <address@hidden>
  Date:   2017-11-22 (Wed, 22 Nov 2017)

  Changed paths:
    M hw/char/spapr_vty.c

  Log Message:
  -----------
  spapr: Implement bug in spapr-vty device to be compatible with PowerVM

The spapr-vty device implements the PAPR defined virtual console,
which is also implemented by IBM's proprietary PowerVM hypervisor.

PowerVM's implementation has a bug where it inserts an extra \0 after
every \r going to the guest.  Because of that Linux's guest side
driver has a workaround which strips \0 characters that appear
immediately after a \r.

That means that when running under qemu, sending a binary stream from
host to guest via spapr-vty which happens to include a \r\0 sequence
will get corrupted by that workaround.

To deal with that, this patch duplicates PowerVM's bug, inserting an
extra \0 after each \r.  Ugly, but the best option available.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>


  Commit: 6dd836f5d32b989e18c6dda655a26f4d73a52f6a
      
https://github.com/qemu/qemu/commit/6dd836f5d32b989e18c6dda655a26f4d73a52f6a
  Author: Laurent Vivier <address@hidden>
  Date:   2017-11-22 (Wed, 22 Nov 2017)

  Changed paths:
    M target/ppc/translate_init.c

  Log Message:
  -----------
  ppc: fix VTB migration

Migration of a system under stress (for example, with
"stress-ng --numa 2") triggers on the destination
some kernel watchdog messages like:

NMI watchdog: BUG: soft lockup - CPU#0 stuck for 3489660870s!
NMI watchdog: BUG: soft lockup - CPU#1 stuck for 3489660884s!

This problem appears with the changes introduced by
    42043e4 spapr: clock should count only if vm is running

I think this commit only triggers the problem.

Kernel computes the soft lockup duration using the
Virtual Timebase register (VTB), not using the Timebase
Register (TBR, the one 42043e4 stops).

It appears VTB is not migrated, so this patch adds it in
the list of the SPRs to migrate, and fixes the problem.

For the migration, I've tested a migration from qemu-2.8.0 and
pseries-2.8.0 to a patched master (qemu-2.11.0-rc1). The received
VTB is 0 (as is it not initialized by qemu-2.8.0), but the value
seems to be ignored by KVM and a non zero VTB is used by the kernel.
I have no explanation for that, but as the original problem appears
only with SMP system under stress I suspect some problems in KVM
(I think because VTB is shared by all threads of a core).

Signed-off-by: Laurent Vivier <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 1b89975d420c4c6c2967730ea20f0fd0ce211c1f
      
https://github.com/qemu/qemu/commit/1b89975d420c4c6c2967730ea20f0fd0ce211c1f
  Author: Peter Maydell <address@hidden>
  Date:   2017-11-23 (Thu, 23 Nov 2017)

  Changed paths:
    M hw/char/spapr_vty.c
    M hw/ppc/spapr.c
    M target/ppc/translate_init.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171122' 
into staging

ppc patch queue 2017-11-22

Several more fixes to merge for qemu-2.11.

# gpg: Signature made Wed 22 Nov 2017 04:29:57 GMT
# gpg:                using RSA key 0x6C38CACA20D9B392
# gpg: Good signature from "David Gibson <address@hidden>"
# gpg:                 aka "David Gibson (Red Hat) <address@hidden>"
# gpg:                 aka "David Gibson (ozlabs.org) <address@hidden>"
# gpg:                 aka "David Gibson (kernel.org) <address@hidden>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-2.11-20171122:
  ppc: fix VTB migration
  spapr: Implement bug in spapr-vty device to be compatible with PowerVM
  hw/ppc/spapr: Fix virtio-scsi bootindex handling for LUNs >= 256

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


Compare: https://github.com/qemu/qemu/compare/2fe47fce7860...1b89975d420c

reply via email to

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