From: Alexander Gordeev <agordeev@redhat.com>
To: kvm@vger.kernel.org
Cc: Alexander Gordeev <agordeev@redhat.com>
Subject: [kvm-unit-tests PATCH v5 00/12] PCI bus support
Date: Tue, 19 Jul 2016 14:52:57 +0200 [thread overview]
Message-ID: <cover.1468928484.git.agordeev@redhat.com> (raw)
Hi Andrew,
This is 5th version of PCI support. Changes since v4 are mainly addressing
nits and a rework of pci_bar_addr() function. The biggest change - the PCI
test succeeds on arm, aarch64, i386 and x86_64 (I am not posting pci-testdev
enablement for x86 though).
There are few changes (some of them to already Reviewed-by patches) worth
a notice - here are the interdiffs commented:
[08/12] pci: Add pci_print(); pci_print() function:
- possibile devices with unimplemented gap BARs are printed correctly;
- pci_bar_size() is called once;
diff -u b/lib/pci.c b/lib/pci.c
--- b/lib/pci.c
+++ b/lib/pci.c
@@ -146,14 +146,15 @@
return;
for (i = 0; i < 6; i++) {
- phys_addr_t start, end;
+ phys_addr_t size, start, end;
uint32_t bar;
- if (!pci_bar_is_valid(dev, i))
- break;
+ size = pci_bar_size(dev, i);
+ if (!size)
+ continue;
start = pci_bar_get_addr(dev, i);
- end = start + pci_bar_size(dev, i) - 1;
+ end = start + size - 1;
if (pci_bar_is64(dev, i)) {
printf("\tBAR#%d,%d [%" PRIx64 "-%" PRIx64 " ",
[09/12] pci: Add generic ECAM host support; pci_probe() function:
- possibile devices with unimplemented gap BARs are scanned correctly;
@@ -276,7 +290,7 @@
+
+ size = pci_bar_size(dev, i);
+ if (!size)
-+ break;
++ continue;
+
+ bar = pci_bar_get(dev, i);
+ addr = pci_alloc_resource(bar, size);
[11/12] pci: Add pci-testdev PCI bus test device; pci_testdev_one() function:
- no-eventfd vs eventfd accesses (clarified by Paolo on qemu-devel list)
are handled now;
@@ -124,7 +124,11 @@
}
}
- return (int)ops->io_readl(&test->count) == nr_writes;
+ count = ops->io_readl(&test->count);
+ if (!count)
+ return true;
+
+ return (int)count == nr_writes;
}
void pci_testdev_print(struct pci_test_dev_hdr *test,
Alexander Gordeev (12):
[01/12] pci: Fix coding style in generic PCI files
[02/12] pci: x86: Rename pci_config_read() to pci_config_readl()
[03/12] pci: x86: Add remaining PCI configuration space accessors
[04/12] pci: Rework pci_bar_addr()
[05/12] pci: Factor out pci_bar_get()
[06/12] pci: Add pci_bar_set_addr()
[07/12] pci: Add pci_dev_exists()
[08/12] pci: Add pci_print()
[09/12] pci: Add generic ECAM host support
[10/12] arm/arm64: pci: Add PCI bus operation test
[11/12] pci: Add pci-testdev PCI bus test device
[12/12] arm/arm64: pci: Add pci-testdev PCI device operation test
arm/Makefile.common | 6 +-
arm/pci-test.c | 31 ++++
arm/run | 7 +-
lib/arm/asm/pci.h | 11 ++
lib/arm64/asm/pci.h | 1 +
lib/asm-generic/pci-host-bridge.h | 26 ++++
lib/pci-host-generic.c | 295 ++++++++++++++++++++++++++++++++++++++
lib/pci-host-generic.h | 46 ++++++
lib/pci-testdev.c | 188 ++++++++++++++++++++++++
lib/pci.c | 201 +++++++++++++++++++++++---
lib/pci.h | 34 ++++-
lib/x86/asm/pci.h | 31 +++-
x86/vmexit.c | 4 +-
13 files changed, 853 insertions(+), 28 deletions(-)
create mode 100644 arm/pci-test.c
create mode 100644 lib/arm/asm/pci.h
create mode 100644 lib/arm64/asm/pci.h
create mode 100644 lib/asm-generic/pci-host-bridge.h
create mode 100644 lib/pci-host-generic.c
create mode 100644 lib/pci-host-generic.h
create mode 100644 lib/pci-testdev.c
--
1.8.3.1
next reply other threads:[~2016-07-19 12:53 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 12:52 Alexander Gordeev [this message]
2016-07-19 12:52 ` [kvm-unit-tests PATCH v5 01/12] pci: Fix coding style in generic PCI files Alexander Gordeev
2016-07-20 7:47 ` Andrew Jones
2016-07-19 12:52 ` [kvm-unit-tests PATCH v5 02/12] pci: x86: Rename pci_config_read() to pci_config_readl() Alexander Gordeev
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 03/12] pci: x86: Add remaining PCI configuration space accessors Alexander Gordeev
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 04/12] pci: Rework pci_bar_addr() Alexander Gordeev
2016-07-20 8:14 ` Andrew Jones
2016-07-20 18:22 ` [kvm-unit-tests PATCH v6 " Alexander Gordeev
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 05/12] pci: Factor out pci_bar_get() Alexander Gordeev
2016-07-21 7:40 ` Andrew Jones
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 06/12] pci: Add pci_bar_set_addr() Alexander Gordeev
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 07/12] pci: Add pci_dev_exists() Alexander Gordeev
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 08/12] pci: Add pci_print() Alexander Gordeev
2016-07-21 9:22 ` Andrew Jones
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 09/12] pci: Add generic ECAM host support Alexander Gordeev
2016-07-21 9:26 ` Andrew Jones
2016-07-28 10:22 ` Alexander Gordeev
2016-07-21 9:32 ` Andrew Jones
2016-07-29 11:59 ` [kvm-unit-tests PATCH v6 " Alexander Gordeev
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 10/12] arm/arm64: pci: Add PCI bus operation test Alexander Gordeev
2016-07-21 9:38 ` Andrew Jones
2016-07-29 12:00 ` [kvm-unit-tests PATCH v6 " Alexander Gordeev
2016-07-29 13:06 ` Andrew Jones
2016-07-29 13:23 ` Andrew Jones
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 11/12] pci: Add pci-testdev PCI bus test device Alexander Gordeev
2016-07-21 8:17 ` Andrew Jones
2016-07-28 10:30 ` Alexander Gordeev
2016-07-28 11:04 ` Andrew Jones
2016-07-29 12:01 ` [kvm-unit-tests PATCH v6 " Alexander Gordeev
2016-07-29 13:15 ` Andrew Jones
2016-07-19 12:53 ` [kvm-unit-tests PATCH v5 12/12] arm/arm64: pci: Add pci-testdev PCI device operation test Alexander Gordeev
2016-07-20 17:17 ` Alexander Gordeev
2016-07-20 18:23 ` Alexander Gordeev
2016-07-21 9:03 ` Andrew Jones
2016-07-29 12:01 ` [kvm-unit-tests PATCH v6 " Alexander Gordeev
2016-07-29 13:19 ` Andrew Jones
2016-07-29 13:40 ` Andrew Jones
2016-08-16 15:27 ` Alexander Gordeev
2016-08-16 15:47 ` Andrew Jones
2016-07-29 13:21 ` [kvm-unit-tests PATCH v5 00/12] PCI bus support Andrew Jones
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=cover.1468928484.git.agordeev@redhat.com \
--to=agordeev@redhat.com \
--cc=kvm@vger.kernel.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 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.