qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 011025: s390x/cpu_model: disallow unpack for


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 011025: s390x/cpu_model: disallow unpack for --only-migrat...
Date: Fri, 05 Mar 2021 14:52:39 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0110253e690f37ff0add0c8d75f47747041d75fa
      
https://github.com/qemu/qemu/commit/0110253e690f37ff0add0c8d75f47747041d75fa
  Author: Christian Borntraeger <borntraeger@de.ibm.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M target/s390x/cpu_models.c

  Log Message:
  -----------
  s390x/cpu_model: disallow unpack for --only-migratable

Secure execution (aka protected virtualization) guests cannot be
migrated at the moment. If the unpack facility is provided in the cpu
model, a guest may choose to transition to secure mode, making the
guest unmigratable at that point in time. If the machine was explicitly
started with --only-migratable, we would get a failure only when the
guest actually tries to transition; instead, explicitly disallow the
unpack facility if --only-migratable was specified to avoid late
surprises.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Message-Id: <20210125135332.181324-1-borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>


  Commit: ea1b90b4fcb1230b2c85f3fd4ee09a84ddca7a6f
      
https://github.com/qemu/qemu/commit/ea1b90b4fcb1230b2c85f3fd4ee09a84ddca7a6f
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M target/s390x/arch_dump.c

  Log Message:
  -----------
  target/s390x/arch_dump: Fix warning for the name field in the PT_NOTE section

There is a compiler warning with GCC 9.3 when compiling with
the -fsanitize=thread compiler flag:

 In function 'strncpy',
    inlined from 's390x_write_elf64_notes' at ../target/s390x/arch_dump.c:219:9:
 /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error:
  '__builtin_strncpy' specified bound 8 equals destination size
  [-Werror=stringop-truncation]

Since the name should always be NUL-terminated, let's use g_strlcpy() to
silence this warning. And while we're at it, also add an assert() to make
sure that the provided names always fit the size field (which is fine for
the current callers, the function is called once with "CORE" and once with
"LINUX" as a name).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <20210205093921.848260-1-thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>


  Commit: 24056cbfd577fd219d55c03f69df66e6351456e7
      
https://github.com/qemu/qemu/commit/24056cbfd577fd219d55c03f69df66e6351456e7
  Author: Halil Pasic <pasic@linux.ibm.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M hw/s390x/meson.build

  Log Message:
  -----------
  hw/s390x: fix build for virtio-9p-ccw

Commit  2c44220d05 ("meson: convert hw/arch*"), which migrated the old
Makefile.objs to meson.build  accidentally excluded virtio-ccw-9p.c and
thus the virtio-9p-ccw device from the build (and potentially also
included the file virtio-ccw-blk.c twice in the source set). And since
CONFIG_VIRTFS can't be used the way it was used here (see commit
2c9dce0196 ("meson: do not use CONFIG_VIRTFS")), the preconditions have
to be written differently.

Let's fix this!

Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Fixes: 2c44220d05 ("meson: convert hw/arch*")
Reported-by: Jakob Naucke <jakob.naucke@ibm.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210218034059.1096078-1-pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>


  Commit: 403af209db8c030ed1e000640cd3cd80c6882883
      
https://github.com/qemu/qemu/commit/403af209db8c030ed1e000640cd3cd80c6882883
  Author: Matthew Rosato <mjrosato@linux.ibm.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M hw/s390x/s390-pci-inst.c

  Log Message:
  -----------
  s390x/pci: restore missing Query PCI Function CLP data

Some CLP response data was accidentally dropped when fixing endianness
issues with the Query PCI Function CLP response.  All of these values are
sent as 0s to the guest for emulated devices, so the impact is only
observed on passthrough devices.

Fixes: a4e2fff1b104 ("s390x/pci: fix endianness issues")
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Message-Id: <1613681609-9349-1-git-send-email-mjrosato@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>


  Commit: 151fcdfd628a396845b275831e920ddbc10a9f18
      
https://github.com/qemu/qemu/commit/151fcdfd628a396845b275831e920ddbc10a9f18
  Author: Cornelia Huck <cohuck@redhat.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M hw/s390x/virtio-ccw.c

  Log Message:
  -----------
  virtio-ccw: commands on revision-less devices

The virtio standard specifies that any non-transitional device must
reject commands prior to revision setting (which we do). Devices
that are transitional need to assume revision 0 (legacy) if the
driver sends a non-revision-setting command first in order to
support legacy drivers. We neglected to do the latter.

Fortunately, nearly everything worked as intended anyway; the only
problem was not properly rejecting revision setting after some other
command had been issued. Easy to fix by setting revision to 0 if
we see a non-revision command on a legacy-capable revision-less
device.

Found by code inspection, not observed in the wild.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Message-Id: <20210216111830.1087847-1-cohuck@redhat.com>


  Commit: a54b8ac340c20531daa89929c5ce7fed89fa401d
      
https://github.com/qemu/qemu/commit/a54b8ac340c20531daa89929c5ce7fed89fa401d
  Author: Pierre Morel <pmorel@linux.ibm.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M target/s390x/ioinst.c

  Log Message:
  -----------
  css: SCHIB measurement block origin must be aligned

The Measurement Block Origin inside the SCHIB is used when
Measurement Block format 1 is in used and must be aligned
on 64 bytes otherwise an operand exception is recognized
when issuing the Modify Sub CHannel (MSCH) instruction.

Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1613741973-3711-2-git-send-email-pmorel@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>


  Commit: d6cd66311f527ee29c1d7b0988059cda00ad92fa
      
https://github.com/qemu/qemu/commit/d6cd66311f527ee29c1d7b0988059cda00ad92fa
  Author: Eric Farman <farman@linux.ibm.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M hw/vfio/ccw.c

  Log Message:
  -----------
  vfio-ccw: Do not read region ret_code after write

A pwrite() call returns the number of bytes written (or -1 on error),
and vfio-ccw compares this number with the size of the region to
determine if an error had occurred or not.

If they are not equal, this is a failure and the errno is used to
determine exactly how things failed. An errno of zero is possible
(though unlikely) in this situation and would be translated to a
successful operation.

If they ARE equal, the ret_code field is read from the region to
determine how to proceed. While the kernel sets the ret_code field
as necessary, the region and thus this field is not "written back"
to the user. So the value can only be what it was initialized to,
which is zero.

So, let's convert an unexpected length with errno of zero to a
return code of -EFAULT, and explicitly set an expected length to
a return code of zero. This will be a little safer and clearer.

Suggested-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20210303160739.2179378-1-farman@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>


  Commit: 39d5d1404ed695f4a1cd2b117a6cf2d92dd8e8b9
      
https://github.com/qemu/qemu/commit/39d5d1404ed695f4a1cd2b117a6cf2d92dd8e8b9
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M target/s390x/kvm.c

  Log Message:
  -----------
  target/s390x/kvm: Simplify debug code

We already have the 'run' variable holding 'cs->kvm_run' value.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210303182219.1631042-3-philmd@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>


  Commit: 91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1
      
https://github.com/qemu/qemu/commit/91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-03-05 (Fri, 05 Mar 2021)

  Changed paths:
    M hw/s390x/meson.build
    M hw/s390x/s390-pci-inst.c
    M hw/s390x/virtio-ccw.c
    M hw/vfio/ccw.c
    M target/s390x/arch_dump.c
    M target/s390x/cpu_models.c
    M target/s390x/ioinst.c
    M target/s390x/kvm.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210305' into 
staging

some accumulated s390x fixes

# gpg: Signature made Fri 05 Mar 2021 15:50:00 GMT
# gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
# gpg:                issuer "cohuck@redhat.com"
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown]
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full]
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full]
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>" [unknown]
# gpg:                 aka "Cornelia Huck <cohuck@redhat.com>" [unknown]
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck-gitlab/tags/s390x-20210305:
  target/s390x/kvm: Simplify debug code
  vfio-ccw: Do not read region ret_code after write
  css: SCHIB measurement block origin must be aligned
  virtio-ccw: commands on revision-less devices
  s390x/pci: restore missing Query PCI Function CLP data
  hw/s390x: fix build for virtio-9p-ccw
  target/s390x/arch_dump: Fix warning for the name field in the PT_NOTE section
  s390x/cpu_model: disallow unpack for --only-migratable

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/bb736b20a31f...91e92cad67ca



reply via email to

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