qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel <qemu-devel@nongnu.org>
Cc: Qemu-block <qemu-block@nongnu.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: make test failure for iotest 267 on qemu-system-sparc64
Date: Mon, 22 Jun 2020 11:25:49 +0200	[thread overview]
Message-ID: <d6a22c5f-2403-d6c4-da89-02e457ee0174@redhat.com> (raw)
In-Reply-To: <35510ff8-b301-a3a1-48a6-ae5864007c49@ilande.co.uk>

On 07/03/2020 10.48, Mark Cave-Ayland wrote:
> Hi all,
> 
> After a recent rebase I've started seeing iotest 267 after running "make check" on
> qemu-system-sparc64. The diff output looks similar to this:
> 
> --- /home/build/src/qemu/git/qemu/tests/qemu-iotests/267.out    2020-01-22
> 17:57:54.246650995 +0000
> +++ /home/build/src/qemu/git/qemu/tests/qemu-iotests/267.out.bad        2020-03-07
> 09:25:36.044451658 +0000
> @@ -41,13 +41,7 @@
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
>  Testing: -drive driver=IMGFMT,file=TEST_DIR/t.IMGFMT,if=none -device
> virtio-blk,drive=none0
>  QEMU X.Y.Z monitor - type 'help' for more information
> -(qemu) savevm snap0
> -(qemu) info snapshots
> -List of snapshots present on all disks:
> -ID        TAG                 VM SIZE                DATE       VM CLOCK
> ---        snap0                  SIZE yyyy-mm-dd hh:mm:ss   00:00:00.000
> -(qemu) loadvm snap0
> -(qemu) quit
> +(qemu) QEMU_PROG: -device virtio-blk,drive=none0: PCI: no slot/function available
> for virtio-blk-pci, all in use or reserved
> 
> The error message here is because the sun4u machine PCI root (default) bus contains
> only 2 PCI bridges and cannot have devices plugged into it directly. An example of
> how to use virtio-blk-pci on qemu-system-sparc64 is shown at
> https://wiki.qemu.org/Documentation/Platforms/SPARC#All_PCI_devices_are_attached_behind_one_of_the_simba_PCI_bridges.
> 
> It seems that all that is missing is a way to specify the bus= parameter for the
> virtio-blk-pci device for this test to work. Can anyone suggest a suitable way to do
> this?

 Hi!

Sorry for the late reply... but better late than never:

I think you likely don't want to change each and every current and
future iotest to contain a "bus=..." parameter - that's not reasonable.
So I see two possibilities to get "make check" working here again:

1) From a user point of view, it would be great if PCI devices could be
used on the sun4u machine also without specifying the "bus=..."
property. Is there a way to convince QEMU to plug PCI devices in a
different bus with free slots in case the root bus is already full? ...
I had a quick look at the sources, but unfortunately I failed to spot
the code that decides which PCI bus should be used in case no "bus=..."
property has been specified, so no clue whether this is feasible or not.

2) Simply change the _require_devices function in
tests/qemu-iotests/common.rc to filter out the virtio and pci devices on
sparc64. Something like this should do the job, I hope:

diff a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -788,6 +788,11 @@ _require_devices()
 {
     available=$($QEMU -M none -device help | \
                 grep ^name | sed -e 's/^name "//' -e 's/".*$//')
+    case "$QEMU_PROG" in
+        *qemu-system-sparc64)
+            available=$(grep -v -i -E 'pci|virtio' <<< $available)
+            ;;
+    esac
     for device
     do
         if ! echo "$available" | grep -q "$device" ; then

 HTH,
  Thomas



  reply	other threads:[~2020-06-22  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-07  9:48 make test failure for iotest 267 on qemu-system-sparc64 Mark Cave-Ayland
2020-06-22  9:25 ` Thomas Huth [this message]
2020-06-22 19:40   ` Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6a22c5f-2403-d6c4-da89-02e457ee0174@redhat.com \
    --to=thuth@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).