From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Subject: [patch] fix kvm-userland on ia64 Date: Thu, 13 Nov 2008 15:02:38 +0100 Message-ID: <491C337E.1060109@sgi.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070300050907010502030002" To: Avi Kivity , "kvm@vger.kernel.org" , "kvm-ia64@vger.kernel.org" , Weidong Han Return-path: Received: from relay2.sgi.com ([192.48.179.30]:34169 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751859AbYKMOCn (ORCPT ); Thu, 13 Nov 2008 09:02:43 -0500 Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------070300050907010502030002 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Patch 6cb7f4d86438f56a5c917ff6148c70bd237ee0e5 introduced an unconditional call to kvm_arch_do_ioperm() without protecting with an #ifdef like the remaining calls are. Cheers, Jes --------------070300050907010502030002 Content-Type: text/plain; name="0001-kvm-qemufix-ioperm-build.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-kvm-qemufix-ioperm-build.patch" Protect calls to kvm_arch_do_ioperm() introduced in 6cb7f4d86438f56a5c917ff6148c70bd237ee0e5 with #ifdef USE_KVM_DEVICE_ASSIGNMENT similar to how the other calls to this function are protected. Signed-off-by: Jes Sorensen --- qemu/qemu-kvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: kvm-userspace.git/qemu/qemu-kvm.c =================================================================== --- kvm-userspace.git.orig/qemu/qemu-kvm.c +++ kvm-userspace.git/qemu/qemu-kvm.c @@ -444,7 +444,7 @@ { CPUState *env = _env; sigset_t signals; - struct ioperm_data *data; + struct ioperm_data *data = NULL; vcpu = &vcpu_info[env->cpu_index]; vcpu->env = env; @@ -454,9 +454,11 @@ kvm_create_vcpu(kvm_context, env->cpu_index); kvm_qemu_init_env(env); +#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 /* signal VCPU creation */ pthread_mutex_lock(&qemu_mutex); --------------070300050907010502030002--