From: Guillaume Thouvenin Subject: Re: [PATCH] kvm: qemu: support ioperm for vcpu hotplug Date: Wed, 12 Nov 2008 09:59:58 +0100 Message-ID: <20081112095958.1ee02225@frecb000711> References: <20081111162804.8899F25009C@il.qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Avi Kivity To: weidong.han@intel.com, kvm Return-path: Received: from ecfrec.frec.bull.fr ([129.183.4.8]:38857 "EHLO ecfrec.frec.bull.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751368AbYKLJAK (ORCPT ); Wed, 12 Nov 2008 04:00:10 -0500 In-Reply-To: <20081111162804.8899F25009C@il.qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 11 Nov 2008 16:28:04 -0000 Avi Kivity wrote: > @@ -450,6 +454,10 @@ static void *ap_main_loop(void *_env) > kvm_create_vcpu(kvm_context, env->cpu_index); > kvm_qemu_init_env(env); > > + /* do ioperm for io ports of assigned devices */ > + LIST_FOREACH(data, &ioperm_head, entries) > + on_vcpu(env, kvm_arch_do_ioperm, data); > + > /* signal VCPU creation */ > pthread_mutex_lock(&qemu_mutex); > vcpu->created = 1; kvm_arch_do_ioperm() is defined if USE_KVM_DEVICE_ASSIGNMENT is defined. So this should be wrapped by: #ifdef USE_KVM_DEVICE_ASSIGNMENT /* do ioperm for io ports of assigned devices */ LIST_FOREACH(data, &ioperm_head, entries) on_vcpu(env, kvm_arch_do_ioperm, data); #endif no? Best regards, Guillaume