From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET Date: Wed, 20 Jul 2011 09:16:48 +0300 Message-ID: <1311142608.5871.12.camel@lappy> References: <1309927078-5983-1-git-send-email-levinsasha928@gmail.com> <4E1D442E.6090308@redhat.com> <4E1D9623.70801@redhat.com> <4E1D9E75.1070901@redhat.com> <4E1E9A3B.7090200@kernel.org> <4E1EA455.4010608@redhat.com> <4E1EA8A2.9020304@redhat.com> <4E1EBB7A.3030809@redhat.com> <4E1ED913.6070003@redhat.com> <1310646737.21171.23.camel@lappy> <4E1EE519.1020608@redhat.com> <1310648409.21171.34.camel@lappy> <4E1EE9A5.8040306@redhat.com> <1310649431.9498.28.camel@jaguar> <4E1EEDBB.10206@redhat.com> <4E2642E7.3020602@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Pekka Enberg , "Michael S. Tsirkin" , kvm@vger.kernel.org, Ingo Molnar , Marcelo Tosatti To: Anthony Liguori Return-path: Received: from mail-fx0-f52.google.com ([209.85.161.52]:34815 "EHLO mail-fx0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120Ab1GTGRQ (ORCPT ); Wed, 20 Jul 2011 02:17:16 -0400 Received: by fxd18 with SMTP id 18so1223788fxd.11 for ; Tue, 19 Jul 2011 23:17:15 -0700 (PDT) In-Reply-To: <4E2642E7.3020602@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2011-07-19 at 21:52 -0500, Anthony Liguori wrote: > On 07/14/2011 08:23 AM, Avi Kivity wrote: > > On 07/14/2011 04:17 PM, Pekka Enberg wrote: > >> > > >> > I still don't follow. The guest oopses? dmesg | less. An issue with > >> > tools/kvm? gdb -p `pgrep kvm`. > >> > >> When I was debugging tools/kvm virtio code, I used to 'instrument' the > >> guest kernel with printk() calls which helped a lot. > >> > > > > Sure, but do you really need it spewing out the serial port all the time? > > > >> Also, a bug in tools/kvm can manifest in many interesting ways in the > >> guest kernel during boot, for example. You can't do dmesg then and gdb > >> won't save you. I think you've lived too long in the table KVM and Qemu > >> land to remember how important reliable printk() is for development. > > > > I guess. Also I've switched to trace_printk() since it's much nicer (and > > intergrates with other ftrace features). > > > > And again, I'm not against tools/kvm optimizing serial. I just want > > better justification for socket-mmio. > > Just to be really thorough, the optimization is incorrect for UART > emulation. Maybe for a simple PIO based console where there were no > guest visible side effects to a character write, this would be okay, but > that is not how a UART works. To be honest, I haven't checked if the implementation we have is correct - I've just checked that it would benefit from the implementation of socket ioeventfds. I'll have to look at it again based on your review and probably fix it to work correctly :) > > Just implement virtio-serial :-) You can move data as fast as you'd > like through it. > > And if virtio-serial is too complicated, make a simpler version that > doesn't have such crazy semantics. We do have virtio-serial support in /tools/kvm, you can try it using '--console virtio'. Currently I prefer using simple serial most of the time since it's the most basic and simplest method of getting output from a guest, which is quite useful when developing the core of /tools/kvm. -- Sasha.