From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wi4us-0000i5-5n for qemu-devel@nongnu.org; Wed, 07 May 2014 12:42:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wi4ui-00029i-Dz for qemu-devel@nongnu.org; Wed, 07 May 2014 12:41:58 -0400 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:49202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wi4ui-00029R-6g for qemu-devel@nongnu.org; Wed, 07 May 2014 12:41:48 -0400 Received: by mail-ee0-f48.google.com with SMTP id e49so928576eek.7 for ; Wed, 07 May 2014 09:41:47 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <536A6244.3010000@redhat.com> Date: Wed, 07 May 2014 18:41:40 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1399478797.25347.6.camel@nilsson.home.kraxel.org> In-Reply-To: <1399478797.25347.6.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] qtest and pci mmio? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel Il 07/05/2014 18:06, Gerd Hoffmann ha scritto: > Hi, > > Trying to add something real to the new ehci test. Having trouble > accessing the ehci mmio registers. uhci io registers are working fine. > Current patch attached, which just does a register dump to stderr. uhci > looks sane. ehci shouldn't be all zeros. Anyone has a clue? > > thanks, > Gerd > diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c index 7e0907b..c9a0b91 100644 --- a/tests/libqos/pci.c +++ b/tests/libqos/pci.c @@ -103,7 +103,7 @@ void qpci_config_writew(QPCIDevice *dev, uint8_t offset, uint16_t value) void qpci_config_writel(QPCIDevice *dev, uint8_t offset, uint32_t value) { - dev->bus->config_writew(dev->bus, dev->devfn, offset, value); + dev->bus->config_writel(dev->bus, dev->devfn, offset, value); } This should help. :) Re. how to find it, I modified the -qtest-log option to use /dev/tty instead of /dev/null (there was a patch to add a QTEST_LOG environment variable...), and the BAR sizing looked a bit suspicious: [R +0.023561] outl 0xcf8 0x8000ef10 [S +0.023567] OK [R +0.023584] outw 0xcfc 0xffff [S +0.024013] OK [R +0.024036] outl 0xcf8 0x8000ef10 [S +0.024043] OK [R +0.024061] inl 0xcfc [S +0.024068] OK 0xf000 [R +0.024086] outl 0xcf8 0x8000ef10 [S +0.024093] OK [R +0.024110] outw 0xcfc 0x0 [S +0.024519] OK Paolo