[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 6/6] pci-testdev: add pv mmio test
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCH v2 6/6] pci-testdev: add pv mmio test |
Date: |
Thu, 4 Apr 2013 13:40:15 +0300 |
Add ability to test the speed of PV MMIO.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/pci-testdev.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/pci-testdev.c b/hw/pci-testdev.c
index f0ebf99..9a50631 100644
--- a/hw/pci-testdev.c
+++ b/hw/pci-testdev.c
@@ -19,6 +19,7 @@ typedef struct IOTest {
EventNotifier notifier;
bool hasnotifier;
unsigned size;
+ bool pv;
bool match_data;
PCITestDevHdr *hdr;
unsigned bufsize;
@@ -33,7 +34,8 @@ typedef struct IOTest {
static const char *iotest_test[] = {
"no-eventfd",
"wildcard-eventfd",
- "datamatch-eventfd"
+ "datamatch-eventfd",
+ "pv-eventfd"
};
static const char *iotest_type[] = {
@@ -80,7 +82,7 @@ static int pci_testdev_start(IOTest *test)
memory_region_add_eventfd(test->mr,
le32_to_cpu(test->hdr->offset),
test->size,
- false,
+ test->pv,
test->match_data,
test->hdr->data,
&test->notifier);
@@ -95,7 +97,7 @@ static void pci_testdev_stop(IOTest *test)
memory_region_del_eventfd(test->mr,
le32_to_cpu(test->hdr->offset),
test->size,
- false,
+ test->pv,
test->match_data,
test->hdr->data,
&test->notifier);
@@ -237,7 +239,8 @@ static int pci_testdev_init(PCIDevice *pci_dev)
g_free(name);
test->hdr->offset = cpu_to_le32(IOTEST_SIZE(i) + i *
IOTEST_ACCESS_WIDTH);
test->size = IOTEST_ACCESS_WIDTH;
- test->match_data = strcmp(IOTEST_TEST(i), "wildcard-eventfd");
+ test->pv = !strcmp(IOTEST_TEST(i), "pv-eventfd");
+ test->match_data = !strcmp(IOTEST_TEST(i), "datamatch-eventfd");
test->hdr->test = i;
test->hdr->data = test->match_data ? IOTEST_DATAMATCH : IOTEST_NOMATCH;
test->hdr->width = IOTEST_ACCESS_WIDTH;
--
MST
- [Qemu-devel] [PATCH v2 0/6] kvm: pci PORT IO MMIO and PV MMIO speed tests, Michael S. Tsirkin, 2013/04/04
- [Qemu-devel] [PATCH v2 4/6] pci: add pci test device, Michael S. Tsirkin, 2013/04/04
- [Qemu-devel] [PATCH v2 2/6] kvm: support any size for pio eventfd, Michael S. Tsirkin, 2013/04/04
- [Qemu-devel] [PATCH v2 1/6] kvm: remove unused APIs, Michael S. Tsirkin, 2013/04/04
- [Qemu-devel] [PATCH v2 3/6] kvm: support non datamatch ioeventfd, Michael S. Tsirkin, 2013/04/04
- [Qemu-devel] [PATCH v2 6/6] pci-testdev: add pv mmio test,
Michael S. Tsirkin <=
- [Qemu-devel] [PATCH v2 5/6] kvm: add PV MMIO, Michael S. Tsirkin, 2013/04/04
- Re: [Qemu-devel] [PATCH v2 5/6] kvm: add PV MMIO, Peter Maydell, 2013/04/04