From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZGez-0001fO-5j for qemu-devel@nongnu.org; Fri, 16 Nov 2012 02:48:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZGew-0005RO-32 for qemu-devel@nongnu.org; Fri, 16 Nov 2012 02:48:21 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:50754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZGev-0005R6-Qi for qemu-devel@nongnu.org; Fri, 16 Nov 2012 02:48:18 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Nov 2012 07:48:14 -0000 Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAG7m4rQ55509070 for ; Fri, 16 Nov 2012 07:48:04 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAG7mB3q022624 for ; Fri, 16 Nov 2012 00:48:11 -0700 Message-ID: <50A5EFB9.3090505@de.ibm.com> Date: Fri, 16 Nov 2012 08:48:09 +0100 From: Christian Borntraeger MIME-Version: 1.0 References: <1352992746-8767-1-git-send-email-stefanha@redhat.com> <1352992746-8767-4-git-send-email-stefanha@redhat.com> In-Reply-To: <1352992746-8767-4-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , "Michael S. Tsirkin" , qemu-devel@nongnu.org, khoa@us.ibm.com, Paolo Bonzini , Asias He On 15/11/12 16:19, Stefan Hajnoczi wrote: > +#include "trace.h" > +#include "hw/dataplane/vring.h" > + > +/* Map target physical address to host address > + */ > +static inline void *phys_to_host(Vring *vring, hwaddr phys) > +{ > + /* Adjust for 3.6-4 GB PCI memory range */ > + if (phys >= 0x100000000) { > + phys -= 0x100000000 - 0xe0000000; > + } else if (phys >= 0xe0000000) { > + fprintf(stderr, "phys_to_host bad physical address in " > + "PCI range %#lx\n", phys); > + exit(1); > + } I think non-pci virtio also wants to use dataplane. Any chance to move such pci specific things out of the main code? Christian