From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET Date: Wed, 20 Jul 2011 16:10:21 -0500 Message-ID: <4E27443D.1040101@codemonkey.ws> References: <1309927078-5983-1-git-send-email-levinsasha928@gmail.com> <1309927078-5983-5-git-send-email-levinsasha928@gmail.com> <20110706114203.GA18368@redhat.com> <1309964506.15123.13.camel@sasha> <20110706155135.GA21638@redhat.com> <1310276083.2393.6.camel@sasha> <20110710080559.GC1630@redhat.com> <1310469824.2393.22.camel@sasha> <4E1C2F59.90600@redhat.com> <4E1D442E.6090308@redhat.com> <4E264238.2000803@codemonkey.ws> <1311155074.5161.9.camel@jaguar> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Sasha Levin , "Michael S. Tsirkin" , kvm@vger.kernel.org, Ingo Molnar , Marcelo Tosatti To: Pekka Enberg Return-path: Received: from mail-gy0-f174.google.com ([209.85.160.174]:55046 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584Ab1GTVKY (ORCPT ); Wed, 20 Jul 2011 17:10:24 -0400 Received: by gyh3 with SMTP id 3so314879gyh.19 for ; Wed, 20 Jul 2011 14:10:24 -0700 (PDT) In-Reply-To: <1311155074.5161.9.camel@jaguar> Sender: kvm-owner@vger.kernel.org List-ID: On 07/20/2011 04:44 AM, Pekka Enberg wrote: > On Tue, 2011-07-19 at 21:49 -0500, Anthony Liguori wrote: >> If you're not going to emulate a UART properly, why not just use a >> paravirtual serial device that you can keep simple? > > We want to emulate it correctly to make it robust. The problems you > pointed out were caused by me being under heavy dose of ignorance when I > wrote the emulation code. ;-) A UART has a fixed frequency associated with it and the divider latch will select the actual frequency based on a division of the fixed frequency. There is no way to send a byte over the serial line faster than the fixed frequency. The UART is so simple that it cannot DMA and it does not have very much memory on it for buffering so this limitation is visible to the guest. This means the driver has to be very involved in the flower control of the device. There's no way around this. You simply can't do 10gb/s over a serial line and still have something that looks and acts like a UART. BTW, it used to be we were pretty loose with how fast we'd move data through the serial port in QEMU and Linux would actually throw warnings if it saw more data moving through the serial port than is theoretically possible on bare metal. Those warnings were removed at some point but I'm sure if you dug up and kernel and ran it, you would run into them with your current emulation. Regards, Anthony Liguori > > Pekka >