From patchwork Mon Jun 28 16:14:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 108393 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5SGFokx025567 for ; Mon, 28 Jun 2010 16:15:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754142Ab0F1QPs (ORCPT ); Mon, 28 Jun 2010 12:15:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35523 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754011Ab0F1QPp (ORCPT ); Mon, 28 Jun 2010 12:15:45 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5SGFecH013040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 28 Jun 2010 12:15:40 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5SGFdvF028415; Mon, 28 Jun 2010 12:15:39 -0400 Received: from amt.cnet (vpn2-11-80.ams2.redhat.com [10.36.11.80]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5SGFblM017393; Mon, 28 Jun 2010 12:15:38 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 9A80068A87A; Mon, 28 Jun 2010 13:14:28 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id o5SGEPfM007576; Mon, 28 Jun 2010 13:14:25 -0300 From: Marcelo Tosatti To: Anthony Liguori Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Jan Kiszka , Avi Kivity Subject: [PATCH 1/7] kvm: Switch kvm_update_guest_debug to run_on_cpu Date: Mon, 28 Jun 2010 13:14:08 -0300 Message-Id: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 28 Jun 2010 16:15:51 +0000 (UTC) diff --git a/kvm-all.c b/kvm-all.c index c238f54..5684e51 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1033,16 +1033,6 @@ void kvm_setup_guest_memory(void *start, size_t size) } #ifdef KVM_CAP_SET_GUEST_DEBUG -static void on_vcpu(CPUState *env, void (*func)(void *data), void *data) -{ -#ifdef CONFIG_IOTHREAD - if (env != cpu_single_env) { - abort(); - } -#endif - func(data); -} - struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env, target_ulong pc) { @@ -1086,7 +1076,7 @@ int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap) kvm_arch_update_guest_debug(env, &data.dbg); data.env = env; - on_vcpu(env, kvm_invoke_set_guest_debug, &data); + run_on_cpu(env, kvm_invoke_set_guest_debug, &data); return data.err; }