From patchwork Wed May 19 22:28:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 101088 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4JMT0dT010594 for ; Wed, 19 May 2010 22:29:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751634Ab0ESW26 (ORCPT ); Wed, 19 May 2010 18:28:58 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:47027 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041Ab0ESW25 (ORCPT ); Wed, 19 May 2010 18:28:57 -0400 Received: from smtp04.web.de ( [172.20.0.225]) by fmmailgate03.web.de (Postfix) with ESMTP id 85499150F8425; Thu, 20 May 2010 00:28:46 +0200 (CEST) Received: from [88.65.39.229] (helo=[192.168.1.10]) by smtp04.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1OErkq-0004AF-00; Thu, 20 May 2010 00:28:44 +0200 Message-ID: <4BF4661D.5050108@web.de> Date: Thu, 20 May 2010 00:28:45 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti CC: kvm , qemu-devel Subject: [PATCH] kvm: Switch kvm_update_guest_debug to run_on_cpu X-Enigmail-Version: 0.95.7 X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX19kaGYHy7n3THMVk2qIMHdUIg4SDXByi7mg/SrU WM/8TXykPmqiswnUY9XcQX/u4f+ZkDEvivD8Ts04j6dCeSb27o mvtA3wgrA= 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]); Wed, 19 May 2010 22:29:00 +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; }