From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] KVM call minutes for Feb 8 Date: Mon, 14 Feb 2011 15:47:06 -0600 Message-ID: <4D59A2DA.6060705@codemonkey.ws> References: <4D52F20A.7070009@codemonkey.ws> <4D539800.3070802@codemonkey.ws> <20110210090748.GD673@redhat.com> <4D53BD22.1040800@redhat.com> <20110210111354.GA21681@redhat.com> <4D53DF42.4030700@codemonkey.ws> <20110210132730.GB24525@redhat.com> <4D53F06C.9090500@codemonkey.ws> <20110210142044.GD24525@redhat.com> <4D540CC5.2@codemonkey.ws> <4D57F96B.7010004@codemonkey.ws> <4D583793.10409@codemonkey.ws> <4D585E3C.9010404@codemonkey.ws> <4D599639.2030508@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Chris Wright , Gleb Natapov , kvm@vger.kernel.org, Markus Armbruster , qemu-devel@nongnu.org, Avi Kivity To: Blue Swirl Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:32956 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534Ab1BNVuk (ORCPT ); Mon, 14 Feb 2011 16:50:40 -0500 Received: by qwa26 with SMTP id 26so3478632qwa.19 for ; Mon, 14 Feb 2011 13:50:39 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 02/14/2011 03:25 PM, Blue Swirl wrote: > I'd still like to have the inline wrapper over the factory interface, > probably with similar signature to isa_serial_new. Then there would be > two functions, one going through qdev and the other bypassing it. I > don't see how that would be useful. > > The callers of the direct interface would force linkage between them > and so it would be impossible to build QEMU with that device. We don't > need that flexibility for every device though, but I don't see any > advantages for using the direct interface either. > > Why shouldn't we want all devices to be exposed to the user? For > example, there are still devices which don't show up in 'info qtree', > which is a shame. > Showing up in info qtree is goodness, but I'm talking about allowing a user to directly instantiate a device. Any device we expose to the user through -device needs to maintain a compatible interface forever. For our own sanity, I think we should try to expose as little as possible. A good example of a device that we should model through qdev but not expose via -device is actually SerialState. Today, we have ISASerialState which embeds SerialState. We can also create a MMIO version of SerialState although there's no direct structure that wraps that. Ideally, SerialState would be a proper qdev device that is embedded in both ISASerialState and MMIOSerialState (or pick a better name). info qtree should show a has-a relationship for these devices. Regards, Anthony Liguori