From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH 1/2] KVM: device: add simple registration mechanism for kvm_device_ops Date: Mon, 30 Jun 2014 12:20:46 +0100 Message-ID: <20140630112046.GG25779@arm.com> References: <1403803817-22140-1-git-send-email-will.deacon@arm.com> <53AD7D15.2010209@redhat.com> <20140630131427.36b38620.cornelia.huck@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , "kvm@vger.kernel.org" , "kvmarm@lists.cs.columbia.edu" , Gleb Natapov , Marc Zyngier , Christoffer Dall , "agraf@suse.de" , Alex Williamson To: Cornelia Huck Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:64154 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750759AbaF3LUw (ORCPT ); Mon, 30 Jun 2014 07:20:52 -0400 Content-Disposition: inline In-Reply-To: <20140630131427.36b38620.cornelia.huck@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jun 30, 2014 at 12:14:27PM +0100, Cornelia Huck wrote: > On Fri, 27 Jun 2014 16:17:57 +0200 > Paolo Bonzini wrote: > > > Il 26/06/2014 19:30, Will Deacon ha scritto: > > > kvm_ioctl_create_device currently has knowledge of all the device types > > > and their associated ops. This is fairly inflexible when adding support > > > for new in-kernel device emulations, so move what we currently have out > > > into a table, which can support dynamic registration of ops by new > > > drivers for virtual hardware. > > > > > > I didn't try to port all current drivers over, as it's not always clear > > > which initialisation hook the ops should be registered from. > > > > Conny, Alex (Graf & Williamson), > > > > can you help Will here? The idea looks sane, but I'd rather merge it > > with all devices converted. > > FWIW, the following patch on top works for me on s390: > > From 7cc0bf5b143c2e2c1971a65ef785050ece35faf3 Mon Sep 17 00:00:00 2001 > From: Cornelia Huck > Date: Mon, 30 Jun 2014 12:47:35 +0200 > Subject: [PATCH] KVM: s390: register flic ops dynamically > > Using the new kvm_register_device_ops() interface makes us get rid of > an #ifdef in commom code. > > Signed-off-by: Cornelia Huck [...] Thanks Cornelia! I've fixed the minor conflicts against the vgic patch and added this to my series. Will