qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 4f6a1e: pc-bios/s390-ccw/Makefile: Compile wi


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 4f6a1e: pc-bios/s390-ccw/Makefile: Compile with -std=gnu99...
Date: Thu, 08 Oct 2020 03:45:31 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4f6a1eb886961f1f9da2d553c4b0e5ef69cd3801
      
https://github.com/qemu/qemu/commit/4f6a1eb886961f1f9da2d553c4b0e5ef69cd3801
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/Makefile

  Log Message:
  -----------
  pc-bios/s390-ccw/Makefile: Compile with -std=gnu99, -fwrapv and -fno-common

The main QEMU code is compiled with -std=gnu99, -fwrapv and -fno-common.
We should use the same flags for the s390-ccw bios, too, to avoid that
we get different behavior with different compiler versions that changed
their default settings in the course of time (it happened at least with
-std=... and -fno-common in the past already).

While we're at it, also group the other flags here in a little bit nicer
fashion: Move the two "-m" flags out of the "-f" area and specify them on
a separate line.

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Message-Id: <20200806105349.632-2-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: d1f060a8b515a0b1d14c38f2c8f86ab54e79c3dc
      
https://github.com/qemu/qemu/commit/d1f060a8b515a0b1d14c38f2c8f86ab54e79c3dc
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/main.c

  Log Message:
  -----------
  pc-bios/s390-ccw: Move ipl-related code from main() into a separate function

Let's move this part of the code into a separate function to be able
to use it from multiple spots later.

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Message-Id: <20200806105349.632-3-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: f3180b0266386b31deb7bb83fcaea68af7d1bcee
      
https://github.com/qemu/qemu/commit/f3180b0266386b31deb7bb83fcaea68af7d1bcee
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/s390-ccw.h

  Log Message:
  -----------
  pc-bios/s390-ccw: Introduce ENODEV define and remove guards of others

Remove the "#ifndef E..." guards from the defines here - the header
guard S390_CCW_H at the top of the file should avoid double definition,
and if the error code is defined in a different file already, we're in
trouble anyway, then it's better to see the error at compile time instead
of hunting weird behavior during runtime later.
Also define ENODEV - we will use this in a later patch.

Message-Id: <20200806105349.632-4-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: d2cf4af1f4af02f6f2d5827d9a06c31690084d3b
      
https://github.com/qemu/qemu/commit/d2cf4af1f4af02f6f2d5827d9a06c31690084d3b
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/main.c

  Log Message:
  -----------
  pc-bios/s390-ccw: Move the inner logic of find_subch() to a separate function

Move the code to a separate function to be able to re-use it from a
different spot later.

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-Id: <20200806105349.632-5-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 605751b5a5334e187761b0b8a8266a216897bf70
      
https://github.com/qemu/qemu/commit/605751b5a5334e187761b0b8a8266a216897bf70
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/main.c
    M pc-bios/s390-ccw/s390-ccw.h
    M pc-bios/s390-ccw/virtio-blkdev.c
    M pc-bios/s390-ccw/virtio-scsi.c
    M pc-bios/s390-ccw/virtio-scsi.h

  Log Message:
  -----------
  pc-bios/s390-ccw: Do not bail out early if not finding a SCSI disk

In case the user did not specify a boot device, we want to continue
looking for other devices if there are no valid SCSI disks on a virtio-
scsi controller. As a first step, do not panic in this case and let
the control flow carry the error to the upper functions instead.

Message-Id: <20200806105349.632-6-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 869d0e2f593dd37297c366203f006b9acd1b7b45
      
https://github.com/qemu/qemu/commit/869d0e2f593dd37297c366203f006b9acd1b7b45
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/main.c

  Log Message:
  -----------
  pc-bios/s390-ccw: Scan through all devices if no boot device specified

If no boot device has been specified (via "bootindex=..."), the s390-ccw
bios scans through all devices to find a bootable device. But so far, it
stops at the very first block device (including virtio-scsi controllers
without attached devices) that it finds, no matter whether it is bootable
or not. That leads to some weird situatation where it is e.g. possible
to boot via:

 qemu-system-s390x -hda /path/to/disk.qcow2

but not if there is e.g. a virtio-scsi controller specified before:

 qemu-system-s390x -device virtio-scsi -hda /path/to/disk.qcow2

While using "bootindex=..." is clearly the preferred way of booting
on s390x, we still can make the life for the users at least a little
bit easier if we look at all available devices to find a bootable one.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1846975
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200806105349.632-7-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 5dc739f343cd06ecb9b058294564ce7504856f3f
      
https://github.com/qemu/qemu/commit/5dc739f343cd06ecb9b058294564ce7504856f3f
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/bootmap.c
    M pc-bios/s390-ccw/main.c

  Log Message:
  -----------
  pc-bios/s390-ccw: Allow booting in case the first virtio-blk disk is bad

If you try to boot with two virtio-blk disks (without bootindex), and
only the second one is bootable, the s390-ccw bios currently stops at
the first disk and does not continue booting from the second one. This
is annoying - and all other major QEMU firmwares succeed to boot from
the second disk in this case, so we should do the same in the s390-ccw
bios, too.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200806105349.632-8-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 49d4388ec03fd8c7701b907a4e11c437a28f8572
      
https://github.com/qemu/qemu/commit/49d4388ec03fd8c7701b907a4e11c437a28f8572
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/main.c

  Log Message:
  -----------
  pc-bios/s390-ccw/main: Remove superfluous call to enable_subchannel()

enable_subchannel() is already done during is_dev_possibly_bootable()
(which is called from find_boot_device() -> find_subch()), so there
is no need to do this again in the main() function.

Message-Id: <20200806105349.632-9-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 5f97ba0c74ccace0a4014460de9751ff3c6f454a
      
https://github.com/qemu/qemu/commit/5f97ba0c74ccace0a4014460de9751ff3c6f454a
  Author: Marc Hartmayer <mhartmay@linux.ibm.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/bootmap.c

  Log Message:
  -----------
  pc-bios/s390-ccw: fix off-by-one error

This error takes effect when the magic value "zIPL" is located at the
end of a block. For example if s2_cur_blk = 0x7fe18000 and the magic
value "zIPL" is located at 0x7fe18ffc - 0x7fe18fff.

Fixes: ba831b25262a ("s390-ccw: read stage2 boot loader data to find menu")
Reviewed-by: Collin Walling <walling@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Message-Id: <20200924085926.21709-2-mhartmay@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
[thuth: Use "<= ... - 4" instead of "< ... - 3"]
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 468184ec9024f4f7b55247f70ec57554e8a500d7
      
https://github.com/qemu/qemu/commit/468184ec9024f4f7b55247f70ec57554e8a500d7
  Author: Marc Hartmayer <mhartmay@linux.ibm.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/bootmap.c

  Log Message:
  -----------
  pc-bios/s390-ccw: break loop if a null block number is reached

Break the loop if `cur_block_nr` is a null block number because this
means that the end of chunk is reached. In this case we will try to
boot the default entry.

Fixes: ba831b25262a ("s390-ccw: read stage2 boot loader data to find menu")
Reviewed-by: Collin Walling <walling@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Message-Id: <20200924085926.21709-3-mhartmay@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 4906a4e41c29b65ad350736e0a989e5cf3387baf
      
https://github.com/qemu/qemu/commit/4906a4e41c29b65ad350736e0a989e5cf3387baf
  Author: Janosch Frank <frankja@linux.ibm.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/bootmap.c
    M pc-bios/s390-ccw/bootmap.h

  Log Message:
  -----------
  pc-bios: s390x: Fix bootmap.c zipl component entry data handling

The two main types of zipl component entries are execute and
load/data. The last member of the component entry struct therefore
denotes either a PSW or an address. Let's make this a bit more clear
by introducing a union and cleaning up the code that uses that struct
member.

The execute type component entries written by zipl contain short PSWs,
not addresses. Let's mask them and only pass the address part to
jump_to_IPL_code(uint64_t address) because it expects an address as
visible by the name of the argument.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201006094249.50640-2-frankja@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 26e0b96fa9c303194fe159037d69d9ec30355d07
      
https://github.com/qemu/qemu/commit/26e0b96fa9c303194fe159037d69d9ec30355d07
  Author: Janosch Frank <frankja@linux.ibm.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/jump2ipl.c

  Log Message:
  -----------
  pc-bios: s390x: Save PSW rework

We don't need to save the ipl_continue variable in lowcore and have it
limited to 32 bits because of the lowcore layout. Let's move it to a
new 64 bit variable and get rid of the reset info struct.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201006094249.50640-3-frankja@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 42ab98e7d71b834f4f8e2471f60b1c737b9543f3
      
https://github.com/qemu/qemu/commit/42ab98e7d71b834f4f8e2471f60b1c737b9543f3
  Author: Janosch Frank <frankja@linux.ibm.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/bootmap.c
    M pc-bios/s390-ccw/jump2ipl.c
    M pc-bios/s390-ccw/s390-ccw.h

  Log Message:
  -----------
  pc-bios: s390x: Use reset PSW if avaliable

If a blob provides a reset PSW then we should use it instead of
branching to the PSW address and using our own mask.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201006094249.50640-4-frankja@linux.ibm.com>
[thuth: Use Elvis operator to shorten long line]
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 25f5adea5a10fe204e41d085dff6ea94aaf80a9f
      
https://github.com/qemu/qemu/commit/25f5adea5a10fe204e41d085dff6ea94aaf80a9f
  Author: Janosch Frank <frankja@linux.ibm.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw/start.S

  Log Message:
  -----------
  pc-bios: s390x: Go into disabled wait when encountering a PGM exception

Let's setup a PGM PSW, so we won't load 0s when a program exception
happens. Instead we'll load a disabled wait PSW.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201006094249.50640-5-frankja@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 6e05891c31012fccb071cc173ba0f31b09167bba
      
https://github.com/qemu/qemu/commit/6e05891c31012fccb071cc173ba0f31b09167bba
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw.img
    M pc-bios/s390-netboot.img

  Log Message:
  -----------
  pc-bios/s390: Update the s390-ccw bios binaries

Make sure that the binaries match the current state of the sources.

Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: eb32abd8d931994d10327bd965a4fb12d765a0fb
      
https://github.com/qemu/qemu/commit/eb32abd8d931994d10327bd965a4fb12d765a0fb
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M tests/qtest/cdrom-test.c

  Log Message:
  -----------
  tests/qtest/cdrom: Add more s390x-related boot tests

Let's add two new tests:

1) Booting with "bootindex" is the architected default behavior on the
s390x target, so we should have at least one test that is using the
"bootindex" property.

2) The s390-ccw bios used to fail when other unbootable devices have
been specified before the bootable device (without "bootindex"). Now
that the s390-ccw bios is a little bit smarter here, we should test
this scenario, too, to avoid regressions.

Message-Id: <20200806105349.632-10-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 6eeea6725a70e6fcb5abba0764496bdab07ddfb3
      
https://github.com/qemu/qemu/commit/6eeea6725a70e6fcb5abba0764496bdab07ddfb3
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M pc-bios/s390-ccw.img
    M pc-bios/s390-ccw/Makefile
    M pc-bios/s390-ccw/bootmap.c
    M pc-bios/s390-ccw/bootmap.h
    M pc-bios/s390-ccw/jump2ipl.c
    M pc-bios/s390-ccw/main.c
    M pc-bios/s390-ccw/s390-ccw.h
    M pc-bios/s390-ccw/start.S
    M pc-bios/s390-ccw/virtio-blkdev.c
    M pc-bios/s390-ccw/virtio-scsi.c
    M pc-bios/s390-ccw/virtio-scsi.h
    M pc-bios/s390-netboot.img
    M tests/qtest/cdrom-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/huth-gitlab/tags/pull-request-2020-10-06' into staging

* Don't stop at the first unbootable device, continue scanning
* Fix corner cases in booting from ECKD
* s390x-ccw bios cleanup part 2‚Äč

# gpg: Signature made Tue 06 Oct 2020 19:17:46 BST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-10-06:
  tests/qtest/cdrom: Add more s390x-related boot tests
  pc-bios/s390: Update the s390-ccw bios binaries
  pc-bios: s390x: Go into disabled wait when encountering a PGM exception
  pc-bios: s390x: Use reset PSW if avaliable
  pc-bios: s390x: Save PSW rework
  pc-bios: s390x: Fix bootmap.c zipl component entry data handling
  pc-bios/s390-ccw: break loop if a null block number is reached
  pc-bios/s390-ccw: fix off-by-one error
  pc-bios/s390-ccw/main: Remove superfluous call to enable_subchannel()
  pc-bios/s390-ccw: Allow booting in case the first virtio-blk disk is bad
  pc-bios/s390-ccw: Scan through all devices if no boot device specified
  pc-bios/s390-ccw: Do not bail out early if not finding a SCSI disk
  pc-bios/s390-ccw: Move the inner logic of find_subch() to a separate function
  pc-bios/s390-ccw: Introduce ENODEV define and remove guards of others
  pc-bios/s390-ccw: Move ipl-related code from main() into a separate function
  pc-bios/s390-ccw/Makefile: Compile with -std=gnu99, -fwrapv and -fno-common

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


Compare: https://github.com/qemu/qemu/compare/f2687fdb7571...6eeea6725a70



reply via email to

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