From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWSZQ-0001oU-Cn for qemu-devel@nongnu.org; Wed, 16 Oct 2013 10:59:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWSZK-0008Kr-6C for qemu-devel@nongnu.org; Wed, 16 Oct 2013 10:59:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWSZJ-0008KX-UW for qemu-devel@nongnu.org; Wed, 16 Oct 2013 10:59:26 -0400 Message-ID: <525EA9C2.90805@redhat.com> Date: Wed, 16 Oct 2013 16:59:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <525E8DC3.70409@borntraeger.net> <525E8F53.3090603@redhat.com> <525EA150.3060107@de.ibm.com> In-Reply-To: <525EA150.3060107@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] RFC: KVM _CREATE_DEVICE considered harmful? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: "qemu-devel@nongnu.org" , Jens Freimann , Alexander Graf , Gleb Natapov , KVM list Il 16/10/2013 16:23, Christian Borntraeger ha scritto: > That would work, but it would change the ioctl number of KVM_*_DEVICE_ADDR, > due to the changed size of struct kvm_device_attr. We would then need compat > handlers in the kernel. Actually I did that on purpose :) but perhaps you're right that the complication would be too high. > If we could encode it in the existing interface the impact would be smaller. > e.g. > > #define ATTR_ATTR_MASK 0xffffffffULL > #define ATTR_LEN_MASK 0xffffffff00000000ULL > > > switch (attr->attr) { > ---> > switch (attr->attr & ATTR_ATTR_MASK) { > > Then we could keep the device model abstraction. That makes sense too. Paolo