From patchwork Tue May 4 12:45:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 96784 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 o44DoG6Q014092 for ; Tue, 4 May 2010 13:50:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932220Ab0EDNt4 (ORCPT ); Tue, 4 May 2010 09:49:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15861 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932213Ab0EDNtw (ORCPT ); Tue, 4 May 2010 09:49:52 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o44DnoxH017342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 May 2010 09:49:50 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o44DbLme000317; Tue, 4 May 2010 09:49:49 -0400 Received: from amt.cnet (vpn2-10-150.ams2.redhat.com [10.36.10.150]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o44CwS7H023283; Tue, 4 May 2010 09:00:13 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id A9D8E68A98C; Tue, 4 May 2010 09:54:50 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id o44Csmv3016557; Tue, 4 May 2010 09:54:48 -0300 Message-Id: <20100504124634.157938055@redhat.com> User-Agent: quilt/0.47-1 Date: Tue, 04 May 2010 09:45:19 -0300 From: Marcelo Tosatti To: kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: Marcelo Tosatti Subject: [patch uq/master 1/9] kvm: set cpu_single_env around KVM_RUN ioctl References: <20100504124518.979470863@redhat.com> Content-Disposition: inline; filename=cpu-single-env X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 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]); Tue, 04 May 2010 13:50:20 +0000 (UTC) Index: qemu/kvm-all.c =================================================================== --- qemu.orig/kvm-all.c +++ qemu/kvm-all.c @@ -846,9 +846,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) {