From: Peter Xu <peterx@redhat.com>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: kvm@vger.kernel.org, Thomas Huth <thuth@redhat.com>,
Andrew Jones <drjones@redhat.com>
Subject: Re: [kvm-unit-tests PATCH v7 12/13] pci: Add pci-testdev PCI bus test device
Date: Thu, 13 Oct 2016 14:52:49 +0800 [thread overview]
Message-ID: <20161013065249.GD21663@pxdev.xzpeter.org> (raw)
In-Reply-To: <20161012165428.GB31167@dhcp-27-118.brq.redhat.com>
On Wed, Oct 12, 2016 at 06:54:28PM +0200, Alexander Gordeev wrote:
> On Fri, Sep 23, 2016 at 03:25:42PM +0800, Peter Xu wrote:
> > > + width = ops->io_readb(&test->width);
> > > + if (width != 1 && width != 2 && width != 4)
> > > + return false;
> >
> > IIUC we only have 1?
>
> I guess it boils what *have* does mean here.
>
> pci-testdev protocol allows it to be any, but hw/misc/pci-testdev.c
> implements just 1 (yet?).
Do we have other possible implementations for pci-testdev protocol?
>
> > > +
> > > + sig = ops->io_readl(&test->data);
> > > + off = ops->io_readl(&test->offset);
> > > +
> > > + for (i = 0; i < nr_writes; i++) {
> > > + switch (width) {
> > > + case 1: ops->io_writeb(sig, (void *)test + off); break;
> > > + case 2: ops->io_writew(sig, (void *)test + off); break;
> > > + case 4: ops->io_writel(sig, (void *)test + off); break;
> >
> > Here as well. Could I ask why we are handling 2/4?
>
> Basically, because x86 had it and this implementation mimics it.
Yes, actually I didn't notice that before. So I have the same question
for vmexit.c. But of course I don't think this question is a blocker
for the series.
[...]
> > x86/vmexit.c is using pci-testdev as well. Maybe we can generalize the
> > init part and share it? (Actually there is patch in my local tree for
> > this, but haven't posted :)
>
> Yep, I have x86 enabler and it is very simple. But x86 is just too
> different to try to generalize and we're not pursuing it right now.
Could I ask what's the difficulties? Again this is not a block for
sure, so, looking forward to your next version.
Thanks,
-- peterx
next prev parent reply other threads:[~2016-10-13 6:52 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 12:07 [kvm-unit-tests PATCH v7 00/13] PCI bus support Alexander Gordeev
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 01/13] pci: Fix coding style in generic PCI files Alexander Gordeev
2016-08-18 11:37 ` Thomas Huth
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 02/13] pci: x86: Rename pci_config_read() to pci_config_readl() Alexander Gordeev
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 03/13] pci: Add 'extern' to public function declarations Alexander Gordeev
2016-08-17 13:49 ` Andrew Jones
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 04/13] pci: x86: Add remaining PCI configuration space accessors Alexander Gordeev
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 05/13] pci: Factor out pci_bar_get() Alexander Gordeev
2016-08-18 11:39 ` Thomas Huth
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 06/13] pci: Rework pci_bar_addr() Alexander Gordeev
2016-09-23 7:14 ` Peter Xu
2016-09-23 8:51 ` Andrew Jones
2016-09-23 8:58 ` Peter Xu
2016-10-12 14:37 ` Alexander Gordeev
2016-10-13 6:40 ` Peter Xu
2016-10-13 14:16 ` Alexander Gordeev
2016-10-14 6:23 ` Peter Xu
2016-10-14 6:55 ` Andrew Jones
2016-10-14 9:09 ` Peter Xu
2016-10-14 12:37 ` Alexander Gordeev
2016-10-19 3:46 ` Peter Xu
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 07/13] pci: Add pci_bar_set_addr() Alexander Gordeev
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 08/13] pci: Add pci_dev_exists() Alexander Gordeev
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 09/13] pci: Add pci_print() Alexander Gordeev
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 10/13] pci: Add generic ECAM host support Alexander Gordeev
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 11/13] arm/arm64: pci: Add PCI bus operation test Alexander Gordeev
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 12/13] pci: Add pci-testdev PCI bus test device Alexander Gordeev
2016-08-17 14:03 ` Andrew Jones
2016-09-23 7:25 ` Peter Xu
2016-09-23 8:55 ` Andrew Jones
2016-10-12 16:54 ` Alexander Gordeev
2016-10-13 6:52 ` Peter Xu [this message]
2016-10-13 13:16 ` Alexander Gordeev
2016-10-14 5:01 ` Peter Xu
2016-10-14 7:07 ` Andrew Jones
2016-10-14 9:14 ` Peter Xu
2016-08-17 12:07 ` [kvm-unit-tests PATCH v7 13/13] arm/arm64: pci: Add pci-testdev PCI device operation test Alexander Gordeev
2016-08-17 14:26 ` [kvm-unit-tests PATCH v7 00/13] PCI bus support Andrew Jones
2016-08-23 18:28 ` Alexander Gordeev
2016-09-22 11:10 ` Andrew Jones
2016-09-28 6:33 ` Peter Xu
2016-10-12 8:00 ` Alexander Gordeev
2016-10-12 10:59 ` Peter Xu
2016-10-12 14:35 ` Alexander Gordeev
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=20161013065249.GD21663@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=agordeev@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.