From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: RFC: KVM _CREATE_DEVICE considered harmful? Date: Wed, 16 Oct 2013 16:59:14 +0200 Message-ID: <525EA9C2.90805@redhat.com> References: <525E8DC3.70409@borntraeger.net> <525E8F53.3090603@redhat.com> <525EA150.3060107@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alexander Graf , Gleb Natapov , Jens Freimann , KVM list , "qemu-devel@nongnu.org" To: Christian Borntraeger Return-path: Received: from mx1.redhat.com ([209.132.183.28]:12868 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751472Ab3JPO72 (ORCPT ); Wed, 16 Oct 2013 10:59:28 -0400 In-Reply-To: <525EA150.3060107@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: 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