From patchwork Wed May 12 21:24:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 99117 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 o4CLRXlD029387 for ; Wed, 12 May 2010 21:27:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757968Ab0ELV13 (ORCPT ); Wed, 12 May 2010 17:27:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29059 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757887Ab0ELV1L (ORCPT ); Wed, 12 May 2010 17:27:11 -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 o4CLR25c014560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 May 2010 17:27:02 -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 o4CLR1b3020954; Wed, 12 May 2010 17:27:01 -0400 Received: from amt.cnet (vpn2-10-158.ams2.redhat.com [10.36.10.158]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o4CLQxwO021851; Wed, 12 May 2010 17:27:00 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 8656F656077; Wed, 12 May 2010 18:25:44 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id o4CLPefM028644; Wed, 12 May 2010 18:25:40 -0300 From: Marcelo Tosatti To: Anthony Liguori Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Marcelo Tosatti , Avi Kivity Subject: [PATCH 02/12] kvm: set cpu_single_env around KVM_RUN ioctl Date: Wed, 12 May 2010 18:24:56 -0300 Message-Id: <273faf1b6dbdedd0fe9fc519ec73380eced667c2.1273699506.git.mtosatti@redhat.com> 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]); Wed, 12 May 2010 21:27:33 +0000 (UTC) diff --git a/kvm-all.c b/kvm-all.c index 6962b2b..fbd084c 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -838,9 +838,11 @@ int kvm_cpu_exec(CPUState *env) } kvm_arch_pre_run(env, run); + cpu_single_env = NULL; qemu_mutex_unlock_iothread(); ret = kvm_vcpu_ioctl(env, KVM_RUN, 0); qemu_mutex_lock_iothread(); + cpu_single_env = env; kvm_arch_post_run(env, run); if (ret == -EINTR || ret == -EAGAIN) {