From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: KVM call minutes 2013-01-29 Date: Tue, 29 Jan 2013 15:39:51 -0600 Message-ID: <87sj5j7jo8.fsf@codemonkey.ws> References: <871ud4gfoa.fsf@elfo.elfo> <510836DD.3010707@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: KVM devel mailing list , qemu-devel qemu-devel , Andreas =?utf-8?Q?F=C3=A4rber?= To: Alexander Graf , quintela@redhat.com Return-path: Received: from e9.ny.us.ibm.com ([32.97.182.139]:47577 "EHLO e9.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750809Ab3A2Vj6 (ORCPT ); Tue, 29 Jan 2013 16:39:58 -0500 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Jan 2013 16:39:57 -0500 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id E1FFE6E8041 for ; Tue, 29 Jan 2013 16:39:52 -0500 (EST) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0TLdsHY22282438 for ; Tue, 29 Jan 2013 16:39:54 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0TLdr1A026553 for ; Tue, 29 Jan 2013 16:39:54 -0500 In-Reply-To: <510836DD.3010707@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: Alexander Graf writes: > On 01/29/2013 04:41 PM, Juan Quintela wrote: >> Alex will fill this > > When using -device, we can not specify an IRQ line to attach to the > device. This works for some special buses like PCI, but not in the > generic case. We need it generically for virtio-mmio and for potential > platform assigned vfio devices though. > > The conclusion we came up with was that in order to model IRQ lines > between arbitrary devices, we should use QOM and the QOM name space. > Details are up for Anthony to fill in :). Oh good :-) This is how far I got since I last touched this problem. https://github.com/aliguori/qemu/commits/qom-pin.4 qemu_irq is basically foreign to QOM/qdev. There are two things I did to solve this. The first is to have a stateful Pin object. Stateful is important because qemu_irq is totally broken wrt reset and live migration as it stands today. It's pretty easy to have a Pin object that can "connect" to a qemu_irq source or sink which means we can incrementally refactor by first converting each device under a bus to using Pins (using the qemu_irq connect interface to maintain compat) until the bus controller can be converted to export Pins allowing a full switch to using Pins only for that bus. The problems I ran into were (1) this is a lot of work (2) it basically requires that all bus children have been qdev/QOM-ified. Even with something like the ISA bus which is where I started, quite a few devices were not qdevified still. I'm not going to be able to work on this in the foreseeable future, but if someone wants to take it over, I'd be happy to provide advice. I'm also open to other approaches that require less refactoring but I honestly don't know that there is a way to avoid the heavy lifting. Regards, Anthony Liguori > > > Alex > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html