qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/3] s390x patches
@ 2020-08-27 12:20 Cornelia Huck
  2020-08-27 12:20 ` [PULL 1/3] virtio-ccw-input: fix description Cornelia Huck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Cornelia Huck @ 2020-08-27 12:20 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-s390x, Cornelia Huck, qemu-devel

The following changes since commit 8e49197ca5e76fdb8928833b2649ef13fc5aab2f:

  Merge remote-tracking branch 'remotes/hdeller/tags/target-hppa-v3-pull-request' into staging (2020-08-26 22:23:53 +0100)

are available in the Git repository at:

  https://github.com/cohuck/qemu tags/s390x-20200827

for you to fetch changes up to 0216b18b79c432585b9cc49532c6223d766d552f:

  hw/vfio/ap: Plug memleak in vfio_ap_get_group() (2020-08-27 12:37:03 +0200)

----------------------------------------------------------------
- document s390x boot devices
- bug fixes

----------------------------------------------------------------

Cornelia Huck (1):
  virtio-ccw-input: fix description

Pan Nengyuan (1):
  hw/vfio/ap: Plug memleak in vfio_ap_get_group()

Thomas Huth (1):
  docs/system/s390x: Add a chapter about s390x boot devices

 docs/system/s390x/bootdevices.rst | 82 +++++++++++++++++++++++++++++++
 docs/system/target-s390x.rst      |  1 +
 hw/s390x/virtio-ccw-input.c       |  2 +-
 hw/vfio/ap.c                      |  1 +
 4 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100644 docs/system/s390x/bootdevices.rst

-- 
2.25.4



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PULL 1/3] virtio-ccw-input: fix description
  2020-08-27 12:20 [PULL 0/3] s390x patches Cornelia Huck
@ 2020-08-27 12:20 ` Cornelia Huck
  2020-08-27 12:20 ` [PULL 2/3] docs/system/s390x: Add a chapter about s390x boot devices Cornelia Huck
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Cornelia Huck @ 2020-08-27 12:20 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Thomas Huth, qemu-s390x, Cornelia Huck, qemu-devel

Fix a copy/paste error.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200728102820.273598-1-cohuck@redhat.com>
---
 hw/s390x/virtio-ccw-input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/s390x/virtio-ccw-input.c b/hw/s390x/virtio-ccw-input.c
index 5601e25deed8..83136fbba15c 100644
--- a/hw/s390x/virtio-ccw-input.c
+++ b/hw/s390x/virtio-ccw-input.c
@@ -1,5 +1,5 @@
 /*
- * virtio ccw scsi implementation
+ * virtio ccw input implementation
  *
  * Copyright 2012, 2015 IBM Corp.
  *
-- 
2.25.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 2/3] docs/system/s390x: Add a chapter about s390x boot devices
  2020-08-27 12:20 [PULL 0/3] s390x patches Cornelia Huck
  2020-08-27 12:20 ` [PULL 1/3] virtio-ccw-input: fix description Cornelia Huck
@ 2020-08-27 12:20 ` Cornelia Huck
  2020-08-27 12:20 ` [PULL 3/3] hw/vfio/ap: Plug memleak in vfio_ap_get_group() Cornelia Huck
  2020-08-27 15:58 ` [PULL 0/3] s390x patches Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Cornelia Huck @ 2020-08-27 12:20 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Thomas Huth, qemu-s390x, Cornelia Huck, qemu-devel

From: Thomas Huth <thuth@redhat.com>

Booting on s390x is a little bit different compared to other architectures.
Let's add some information for people who are not yet used to this.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200806150507.12073-1-thuth@redhat.com>
[CH: minor wording tweaks]
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 docs/system/s390x/bootdevices.rst | 82 +++++++++++++++++++++++++++++++
 docs/system/target-s390x.rst      |  1 +
 2 files changed, 83 insertions(+)
 create mode 100644 docs/system/s390x/bootdevices.rst

diff --git a/docs/system/s390x/bootdevices.rst b/docs/system/s390x/bootdevices.rst
new file mode 100644
index 000000000000..9e591cb9dc36
--- /dev/null
+++ b/docs/system/s390x/bootdevices.rst
@@ -0,0 +1,82 @@
+Boot devices on s390x
+=====================
+
+Booting with bootindex parameter
+--------------------------------
+
+For classical mainframe guests (i.e. LPAR or z/VM installations), you always
+have to explicitly specify the disk where you want to boot from (or "IPL" from,
+in s390x-speak -- IPL means "Initial Program Load"). In particular, there can
+also be only one boot device according to the architecture specification, thus
+specifying multiple boot devices is not possible (yet).
+
+So for booting an s390x guest in QEMU, you should always mark the
+device where you want to boot from with the ``bootindex`` property, for
+example::
+
+ qemu-system-s390x -drive if=none,id=dr1,file=guest.qcow2 \
+                   -device virtio-blk,drive=dr1,bootindex=1
+
+For booting from a CD-ROM ISO image (which needs to include El-Torito boot
+information in order to be bootable), it is recommended to specify a ``scsi-cd``
+device, for example like this::
+
+ qemu-system-s390x -blockdev file,node-name=c1,filename=... \
+                   -device virtio-scsi \
+                   -device scsi-cd,drive=c1,bootindex=1
+
+Note that you really have to use the ``bootindex`` property to select the
+boot device. The old-fashioned ``-boot order=...`` command of QEMU (and
+also ``-boot once=...``) is not supported on s390x.
+
+
+Booting without bootindex parameter
+-----------------------------------
+
+The QEMU guest firmware (the so-called s390-ccw bios) has also some rudimentary
+support for scanning through the available block devices. So in case you did
+not specify a boot device with the ``bootindex`` property, there is still a
+chance that it finds a bootable device on its own and starts a guest operating
+system from it. However, this scanning algorithm is still very rough and may
+be incomplete, so that it might fail to detect a bootable device in many cases.
+It is really recommended to always specify the boot device with the
+``bootindex`` property instead.
+
+This also means that you should avoid the classical short-cut commands like
+``-hda``, ``-cdrom`` or ``-drive if=virtio``, since it is not possible to
+specify the ``bootindex`` with these commands. Note that the convenience
+``-cdrom`` option even does not give you a real (virtio-scsi) CD-ROM device on
+s390x. Due to technical limitations in the QEMU code base, you will get a
+virtio-blk device with this parameter instead, which might not be the right
+device type for installing a Linux distribution via ISO image. It is
+recommended to specify a CD-ROM device via ``-device scsi-cd`` (as mentioned
+above) instead.
+
+
+Booting from a network device
+-----------------------------
+
+Beside the normal guest firmware (which is loaded from the file ``s390-ccw.img``
+in the data directory of QEMU, or via the ``-bios`` option), QEMU ships with
+a small TFTP network bootloader firmware for virtio-net-ccw devices, too. This
+firmware is loaded from a file called ``s390-netboot.img`` in the QEMU data
+directory. In case you want to load it from a different filename instead,
+you can specify it via the ``-global s390-ipl.netboot_fw=filename``
+command line option.
+
+The ``bootindex`` property is especially important for booting via the network.
+If you don't specify the the ``bootindex`` property here, the network bootloader
+firmware code won't get loaded into the guest memory so that the network boot
+will fail. For a successful network boot, try something like this::
+
+ qemu-system-s390x -netdev user,id=n1,tftp=...,bootfile=... \
+                   -device virtio-net-ccw,netdev=n1,bootindex=1
+
+The network bootloader firmware also has basic support for pxelinux.cfg-style
+configuration files. See the `PXELINUX Configuration page
+<https://wiki.syslinux.org/wiki/index.php?title=PXELINUX#Configuration>`__
+for details how to set up the configuration file on your TFTP server.
+The supported configuration file entries are ``DEFAULT``, ``LABEL``,
+``KERNEL``, ``INITRD`` and ``APPEND`` (see the `Syslinux Config file syntax
+<https://wiki.syslinux.org/wiki/index.php?title=Config>`__ for more
+information).
diff --git a/docs/system/target-s390x.rst b/docs/system/target-s390x.rst
index 644e404ef9fd..c636f64113d7 100644
--- a/docs/system/target-s390x.rst
+++ b/docs/system/target-s390x.rst
@@ -31,4 +31,5 @@ Architectural features
 ======================
 
 .. toctree::
+   s390x/bootdevices
    s390x/protvirt
-- 
2.25.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 3/3] hw/vfio/ap: Plug memleak in vfio_ap_get_group()
  2020-08-27 12:20 [PULL 0/3] s390x patches Cornelia Huck
  2020-08-27 12:20 ` [PULL 1/3] virtio-ccw-input: fix description Cornelia Huck
  2020-08-27 12:20 ` [PULL 2/3] docs/system/s390x: Add a chapter about s390x boot devices Cornelia Huck
@ 2020-08-27 12:20 ` Cornelia Huck
  2020-08-27 15:58 ` [PULL 0/3] s390x patches Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Cornelia Huck @ 2020-08-27 12:20 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Pierre Morel, Pan Nengyuan, Cornelia Huck, Li Qiang, qemu-devel,
	qemu-s390x, Euler Robot

From: Pan Nengyuan <pannengyuan@huawei.com>

Missing g_error_free() in vfio_ap_get_group() error path. Fix that.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200814160241.7915-3-pannengyuan@huawei.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 hw/vfio/ap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index b9330a8e6fc8..cec6fe159932 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -71,6 +71,7 @@ static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev, Error **errp)
     if (!group_path) {
         error_setg(errp, "%s: no iommu_group found for %s: %s",
                    VFIO_AP_DEVICE_TYPE, vapdev->vdev.sysfsdev, gerror->message);
+        g_error_free(gerror);
         return NULL;
     }
 
-- 
2.25.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PULL 0/3] s390x patches
  2020-08-27 12:20 [PULL 0/3] s390x patches Cornelia Huck
                   ` (2 preceding siblings ...)
  2020-08-27 12:20 ` [PULL 3/3] hw/vfio/ap: Plug memleak in vfio_ap_get_group() Cornelia Huck
@ 2020-08-27 15:58 ` Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2020-08-27 15:58 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: qemu-s390x, QEMU Developers

On Thu, 27 Aug 2020 at 13:21, Cornelia Huck <cohuck@redhat.com> wrote:
>
> The following changes since commit 8e49197ca5e76fdb8928833b2649ef13fc5aab2f:
>
>   Merge remote-tracking branch 'remotes/hdeller/tags/target-hppa-v3-pull-request' into staging (2020-08-26 22:23:53 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/cohuck/qemu tags/s390x-20200827
>
> for you to fetch changes up to 0216b18b79c432585b9cc49532c6223d766d552f:
>
>   hw/vfio/ap: Plug memleak in vfio_ap_get_group() (2020-08-27 12:37:03 +0200)
>
> ----------------------------------------------------------------
> - document s390x boot devices
> - bug fixes
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-27 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 12:20 [PULL 0/3] s390x patches Cornelia Huck
2020-08-27 12:20 ` [PULL 1/3] virtio-ccw-input: fix description Cornelia Huck
2020-08-27 12:20 ` [PULL 2/3] docs/system/s390x: Add a chapter about s390x boot devices Cornelia Huck
2020-08-27 12:20 ` [PULL 3/3] hw/vfio/ap: Plug memleak in vfio_ap_get_group() Cornelia Huck
2020-08-27 15:58 ` [PULL 0/3] s390x patches Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).