From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: [PATCH 0/5] kvm-unittests: add pci PORT IO and MMIO speed tests Date: Wed, 3 Apr 2013 11:52:19 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: kvm@vger.kernel.org, pbonzini@redhat.com, gleb@redhat.com, mtosatti@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:6565 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755047Ab3DCIv0 (ORCPT ); Wed, 3 Apr 2013 04:51:26 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r338pQxF031819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Apr 2013 04:51:26 -0400 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: These patches add ability to measure speed of MMIO versus PIO, in different configurations. As I didn't want to reserve a hardcoded range of memory, I added pci bus scan support instead. Used together with the new pci-testdev backend. When not present, the new tests are skipped. Example output: mmio-no-eventfd:pci-mem 8796 mmio-wildcard-eventfd:pci-mem 3609 mmio-datamatch-eventfd:pci-mem 3685 portio-no-eventfd:pci-io 5287 portio-wildcard-eventfd:pci-io 1762 portio-datamatch-eventfd:pci-io 1777 First interesting conclusion is that the overhead of MMIO exit to QEMU as compared to PIO is double that of MMIO ioeventfd as compared to PIO eventfd. Is this a known fact? Michael S. Tsirkin (5): kvm-unittest: add printf %c support kvm-unittest: libcflat: add offsetof libcflat.h: define NULL lib: add pci bus scan support vmexit: add pci io and memory speed tests config-x86-common.mak | 1 + lib/libcflat.h | 3 + lib/printf.c | 3 + lib/x86/pci.c | 55 ++++++++++++ lib/x86/pci.h | 16 ++++ x86-run | 13 ++- x86/vmexit.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++--- 7 files changed, 302 insertions(+), 15 deletions(-) create mode 100644 lib/x86/pci.c create mode 100644 lib/x86/pci.h -- MST