From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEn25-0006K7-Cx for qemu-devel@nongnu.org; Thu, 11 Jun 2009 12:21:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEn21-0006B1-Rt for qemu-devel@nongnu.org; Thu, 11 Jun 2009 12:21:41 -0400 Received: from [199.232.76.173] (port=50989 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEn21-0006As-Od for qemu-devel@nongnu.org; Thu, 11 Jun 2009 12:21:37 -0400 Received: from mx2.redhat.com ([66.187.237.31]:32805) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEn21-0000dj-CQ for qemu-devel@nongnu.org; Thu, 11 Jun 2009 12:21:37 -0400 Date: Thu, 11 Jun 2009 21:51:30 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH] virtio-serial: PCI device for simple host <-> guest communication Message-ID: <20090611162129.GA19119@amit-x200.pnq.redhat.com> References: <1244565768-9103-1-git-send-email-amit.shah@redhat.com> <1244565768-9103-2-git-send-email-amit.shah@redhat.com> <1244565768-9103-3-git-send-email-amit.shah@redhat.com> <1244565768-9103-4-git-send-email-amit.shah@redhat.com> <20090609181714.GB11485@amd.home.annexia.org> <4A2EB079.6020909@codemonkey.ws> <20090611135155.GA13426@amit-x200.pnq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: "Richard W.M. Jones" , qemu-devel@nongnu.org On (Thu) Jun 11 2009 [19:07:26], Blue Swirl wrote: > On 6/11/09, Amit Shah wrote: > > On (Tue) Jun 09 2009 [13:56:57], Anthony Liguori wrote: > > > Richard W.M. Jones wrote: > > >> On Tue, Jun 09, 2009 at 10:12:48PM +0530, Amit Shah wrote: > > >> [...] > > >> > > >> Are you going to post the virtio driver for the Linux kernel later? > > >> > > > > > > Yeah, I'd like to see the Linux driver before drawing conclusions. > > > > Pasting here a slightly older version of the patch. I'm actively working > > on it; a few things might have changed but the basic idea remains the > > same. > > > + * along with this program; if not, write to the Free Software > > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > > Old FSF address, the new one is on Franklin St. OK, will update. > > +struct virtio_serial_port { > > > + unsigned int read_len; > > This limits the maximum transfer length to 4G, which is way too short > on 64 bit hosts. ;-) This is only valid for a single packet that's transmitted via the queue at a time and I doubt anyone's going to use bigger packets :-) (That size is also limited by the kernel -- and the current code only alloctes one PAGE_SIZE buffer for the transfer.) > > +struct virtio_serial_config { > > + __u8 nr_ports; > > + __u16 status; > > +} __attribute__((packed)); > > The structure should be redesigned to work without packed attribute. > status field is unaligned. I'll see how to untangle it. Amit