From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmifS-0005We-14 for qemu-devel@nongnu.org; Mon, 27 Apr 2015 09:01:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmifM-0002rh-5i for qemu-devel@nongnu.org; Mon, 27 Apr 2015 09:01:45 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:47711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmifL-0002qy-OP for qemu-devel@nongnu.org; Mon, 27 Apr 2015 09:01:40 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Apr 2015 14:01:38 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2E85817D8063 for ; Mon, 27 Apr 2015 14:02:16 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3RD1Z4w58261620 for ; Mon, 27 Apr 2015 13:01:35 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3RD1WR2011675 for ; Mon, 27 Apr 2015 07:01:34 -0600 Date: Mon, 27 Apr 2015 15:01:30 +0200 From: Michael Mueller Message-ID: <20150427150130.134689ab@bee> In-Reply-To: <20150427141913.7014b017.cornelia.huck@de.ibm.com> References: <1428933396-37887-1-git-send-email-mimu@linux.vnet.ibm.com> <1428933396-37887-12-git-send-email-mimu@linux.vnet.ibm.com> <553DF033.1060405@de.ibm.com> <20150427114353.0386c3eb@bee> <553E1506.5080206@de.ibm.com> <20150427130758.5be04a87@bee> <20150427141913.7014b017.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 11/17] target-s390x: Add KVM VM attribute interface for S390 CPU models List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: linux-s390@vger.kernel.org, Eduardo Habkost , kvm@vger.kernel.org, Gleb Natapov , linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, Christian Borntraeger , Alexander Graf , "Jason J. Herne" , Daniel Hansel , Paolo Bonzini , Andreas Faerber , Richard Henderson On Mon, 27 Apr 2015 14:19:13 +0200 Cornelia Huck wrote: > > > >> Would it make sense to do the cast here.... > > > > > > > > cpu_model_get/set() is used to handle both attributes, > > > > KVM_S390_VM_CPU_MACHINE and KVM_S390_VM_CPU_PROCESSOR. > > > > Both require a different type in the signature, (S390ProcessorProps*) > > > > and (S390MachineProps*). Adding both as parameters seems to be odd > > > > and would require additionally logic in the function. > > > > Thus I think doing the cast outside is just the right thing to do. > > > > > > So what about a void pointer then as parameter? > > > I prefer a pointer for qemu process memory over uint64_t as part of the > > > function interface. This makes it somewhat clearer that this is an > > > address within QEMU. Both ways will certainly work, though. > > > > The interface calls are: > > > > int kvm_s390_get_machine_props(KVMState *s, S390MachineProps *prop) > > int kvm_s390_get_processor_props(S390ProcessorProps *prop) > > > > cpu_model_get/set() are just static helpers. > > So this makes them internal calls... > > > > > > > > > Conny, I guess you will pick up the patches. Any preference? > > ...and I'd prefer using a void pointer for them. Ok, I will make void pointers then to emphasize their address characteristics. Michael