From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines Date: Thu, 01 Dec 2011 15:31:50 +0200 Message-ID: <4ED781C6.4010905@redhat.com> References: <20111201125732.085553111@de.ibm.com> <20111201130408.897496445@de.ibm.com> <4ED77DD7.7090507@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tossati , Christian Borntraeger , Heiko Carstens , Martin Schwidefsky , Cornelia Huck , KVM , Joachim von Buttlar , Jens Freimann , Constantin Werner To: Carsten Otte Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3453 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754172Ab1LANb6 (ORCPT ); Thu, 1 Dec 2011 08:31:58 -0500 In-Reply-To: <4ED77DD7.7090507@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/01/2011 03:15 PM, Avi Kivity wrote: > > > + > > + if (kvm->arch.gmap) > > + gmap_free(kvm->arch.gmap); > > + > > + kvm->arch.gmap = NULL; > > Locking? > > What happens if a vcpu is created afterwards? > Having read the code, I think you can repurpose the argument of KVM_CREATE_VM to be a vm type; with 0 being a normal vm, and 1 being your new monster. The code already checks that the argument is zero, so we're safe there. -- error compiling committee.c: too many arguments to function