qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org, dgibson@redhat.com, thuth@redhat.com,
	qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/3] tests: enable virtio tests on SPAPR
Date: Fri, 30 Sep 2016 19:06:34 +1000	[thread overview]
Message-ID: <20160930090634.GB23399@umbus.fritz.box> (raw)
In-Reply-To: <ff0ffaf8-cfaf-2be9-92c1-2018856fa35f@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3707 bytes --]

On Fri, Sep 30, 2016 at 08:59:39AM +0200, Laurent Vivier wrote:
> 
> 
> On 30/09/2016 03:30, David Gibson wrote:
> > On Thu, Sep 29, 2016 at 07:15:07PM +0200, Laurent Vivier wrote:
> >> but disable MSI-X tests on SPAPR as we can't check the result
> >> (the memory region used on PC is not readable on SPAPR).
> >>
> >> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> >> ---
> >>  tests/Makefile.include    |  3 ++-
> >>  tests/libqos/virtio-pci.c | 22 ++++++++++++++++++++--
> >>  tests/virtio-9p-test.c    | 11 ++++++++++-
> >>  tests/virtio-blk-test.c   | 22 +++++++++++++++++-----
> >>  tests/virtio-net-test.c   | 17 +++++++++++++++--
> >>  tests/virtio-rng-test.c   |  7 ++++++-
> >>  tests/virtio-scsi-test.c  | 10 +++++++++-
> >>  7 files changed, 79 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/tests/Makefile.include b/tests/Makefile.include
> >> index c46a32d..1e4a3d5 100644
> >> --- a/tests/Makefile.include
> >> +++ b/tests/Makefile.include
> >> @@ -278,6 +278,7 @@ check-qtest-ppc64-y += tests/usb-hcd-uhci-test$(EXESUF)
> >>  gcov-files-ppc64-y += hw/usb/hcd-uhci.c
> >>  check-qtest-ppc64-y += tests/usb-hcd-xhci-test$(EXESUF)
> >>  gcov-files-ppc64-y += hw/usb/hcd-xhci.c
> >> +check-qtest-ppc64-y += $(check-qtest-virtio-y)
> >>  
> >>  check-qtest-sh4-y = tests/endianness-test$(EXESUF)
> >>  
> >> @@ -604,7 +605,7 @@ libqos-pc-obj-y += tests/libqos/ahci.o
> >>  libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o
> >>  libqos-imx-obj-y = $(libqos-obj-y) tests/libqos/i2c-imx.o
> >>  libqos-usb-obj-y = $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/libqos/usb.o
> >> -libqos-virtio-obj-y = $(libqos-pc-obj-y) tests/libqos/virtio.o tests/libqos/virtio-pci.o tests/libqos/virtio-mmio.o tests/libqos/malloc-generic.o
> >> +libqos-virtio-obj-y = $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/libqos/virtio.o tests/libqos/virtio-pci.o tests/libqos/virtio-mmio.o tests/libqos/malloc-generic.o
> >>  
> >>  tests/device-introspect-test$(EXESUF): tests/device-introspect-test.o
> >>  tests/rtc-test$(EXESUF): tests/rtc-test.o
> >> diff --git a/tests/libqos/virtio-pci.c b/tests/libqos/virtio-pci.c
> >> index 6e005c1..ed81df6 100644
> >> --- a/tests/libqos/virtio-pci.c
> >> +++ b/tests/libqos/virtio-pci.c
> >> @@ -68,16 +68,34 @@ static uint8_t qvirtio_pci_config_readb(QVirtioDevice *d, uint64_t addr)
> >>      return qpci_io_readb(dev->pdev, (void *)(uintptr_t)addr);
> >>  }
> >>  
> >> +/* PCI is always read in little-endian order
> >> + * but virtio ( < 1.0) is in guest order
> >> + * so with a big-endian guest the order has been reversed
> >> + * reverse it again
> >> + */
> >> +
> >>  static uint16_t qvirtio_pci_config_readw(QVirtioDevice *d, uint64_t addr)
> >>  {
> >>      QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
> >> -    return qpci_io_readw(dev->pdev, (void *)(uintptr_t)addr);
> >> +    uint16_t value;
> >> +
> >> +    value = qpci_io_readw(dev->pdev, (void *)(uintptr_t)addr);
> >> +    if (target_big_endian()) {
> >> +        value = bswap16(value);
> >> +    }
> > 
> > Don't you need some sort of test to distinguish the virtio < 1.0 and
> > virtio-1.0 cases?
> 
> yes, but for the moment we don't test virtio-1.0, we will add the test
> when will support it.
> 
> http://wiki.qemu.org/Outreachy_2016_DecemberMarch#VIRTIO_1.0_support_in_libqos

Ok.  Please drop a comment in though, to make one less mystery for
whoever does end up adding the virtio 1.0 support.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-09-30 10:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 17:15 [Qemu-devel] [PATCH 0/3] tests: enable virtio tests on SPAPR Laurent Vivier
2016-09-29 17:15 ` [Qemu-devel] [PATCH 1/3] tests: use qtest_pc_boot()/qtest_pc_shutdown() in virtio tests Laurent Vivier
2016-09-30  1:27   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-09-30  6:56     ` Laurent Vivier
2016-09-30  8:33   ` [Qemu-devel] " Greg Kurz
2016-09-30  9:13     ` Laurent Vivier
2016-09-30 10:29       ` Greg Kurz
2016-09-30 10:33         ` Laurent Vivier
2016-09-30  9:56     ` Laurent Vivier
2016-09-30 10:34       ` Greg Kurz
2016-09-29 17:15 ` [Qemu-devel] [PATCH 2/3] qtest: evaluate endianness of the target in qtest_init() Laurent Vivier
2016-09-30  1:29   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-09-29 17:15 ` [Qemu-devel] [PATCH 3/3] tests: enable virtio tests on SPAPR Laurent Vivier
2016-09-30  1:30   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-09-30  6:59     ` Laurent Vivier
2016-09-30  9:06       ` David Gibson [this message]
2016-09-30 10:18   ` [Qemu-devel] " Greg Kurz
2016-09-30 10:30     ` Laurent Vivier
2016-09-30 10:52       ` Greg Kurz
2016-09-30 15:19       ` John Snow
2016-10-01 12:14         ` Greg Kurz

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=20160930090634.GB23399@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=dgibson@redhat.com \
    --cc=groug@kaod.org \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /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).