From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH RFC v3 3/4] Break dependency between vcpu index in vcpus array and vcpu_id. Date: Tue, 2 Jun 2009 16:42:25 +0300 Message-ID: <20090602134225.GC25846@redhat.com> References: <1243504487-25796-1-git-send-email-gleb@redhat.com> <1243504487-25796-4-git-send-email-gleb@redhat.com> <20090602123808.GC4099@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:38019 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333AbZFBNm1 (ORCPT ); Tue, 2 Jun 2009 09:42:27 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n52DgTtB021794 for ; Tue, 2 Jun 2009 09:42:29 -0400 Content-Disposition: inline In-Reply-To: <20090602123808.GC4099@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jun 02, 2009 at 09:38:08AM -0300, Marcelo Tosatti wrote: > > @@ -2223,6 +2226,10 @@ static long kvm_vm_ioctl(struct file *filp, > > r = kvm_irqfd(kvm, data.fd, data.gsi, data.flags); > > break; > > } > > + case KVM_SET_BOOT_CPU_ID: > > + kvm->bsp_vcpu_id = arg; > > + r = 0; > > + break; > > Don't you also need to update the bsp_vcpu pointer? And aren't these two Actually I think I need to return an error if userspace tries to change BSP after BSP cpu is already created. > (bsp_vcpu pointer and bsp_vcpu_id) somewhat redundant? > Sometimes pointer to bsp vcpu is needed. It can be found looping over all vcpus, but I prefer to have the pointer handy. -- Gleb.