From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xdb3C-00031p-6r for qemu-devel@nongnu.org; Mon, 13 Oct 2014 04:32:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xdb3A-0003FR-V6 for qemu-devel@nongnu.org; Mon, 13 Oct 2014 04:32:18 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:53339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xdb3A-0003Ez-PX for qemu-devel@nongnu.org; Mon, 13 Oct 2014 04:32:16 -0400 Received: by mail-wg0-f47.google.com with SMTP id x13so7977144wgg.6 for ; Mon, 13 Oct 2014 01:32:15 -0700 (PDT) Sender: Jiri Slaby Message-ID: <543B8E0D.9070201@suse.cz> Date: Mon, 13 Oct 2014 10:32:13 +0200 From: Jiri Slaby MIME-Version: 1.0 References: <5437C7C1.2010106@redhat.com> <1412942996-29645-1-git-send-email-jslaby@suse.cz> <5437F313.7080007@huawei.com> In-Reply-To: <5437F313.7080007@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1] pci-host: add educational driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Claudio Fontana , qemu-devel@nongnu.org Cc: Peter Maydell , Alvise Rigo On 10/10/2014, 04:54 PM, Claudio Fontana wrote: > Hello, > > On 10.10.2014 14:09, Jiri Slaby wrote: >> I am using qemu for teaching the Linux kernel at our university. I >> wrote a simple PCI device that can answer to writes/reads, generate >> interrupts and perform DMA. As I am dragging it locally over 2 years, >> I am sending it to you now. >> >> Signed-off-by: Jiri Slaby > > is this supposed to be architecture independent, or is it X86-specific? Hi, I did not plan it to be only x86 specific. If you see any problems, I will fix them. > Also at first glance I see multiple 32bit variables used to hold addresses, > is this 32bit-only? No, the DMA addresses are on purpose 32-bit: to teach the people always set the dma mask properly in the driver. This driver copies COMBO6x devices (liberouter.org) behaviour which I used until the cards got obsoleted (hard to find PCI-X slots nowadays). I can make this configurable if you wish. > I wonder if this work could be merged / integrated with the Generic PCI host patches that are flying around since some time... Could you point me to some? thanks, -- js suse labs