From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch 1/2] qemu-kvm: use usptream eventfd code Date: Tue, 7 Sep 2010 14:25:03 -0300 Message-ID: <20100907172503.GA10311@amt.cnet> References: <20100906202015.433641568@amt.cnet> <20100906202301.291967128@amt.cnet> <4C85F60C.3060700@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Anthony Liguori To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35427 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757881Ab0IGRcd (ORCPT ); Tue, 7 Sep 2010 13:32:33 -0400 Content-Disposition: inline In-Reply-To: <4C85F60C.3060700@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Sep 07, 2010 at 11:21:32AM +0300, Avi Kivity wrote: > On 09/06/2010 11:20 PM, Marcelo Tosatti wrote: > >Upstream code is equivalent. > > > >Signed-off-by: Marcelo Tosatti > > > >Index: qemu-kvm/cpus.c > >=================================================================== > >--- qemu-kvm.orig/cpus.c > >+++ qemu-kvm/cpus.c > >@@ -290,11 +290,6 @@ void qemu_notify_event(void) > > { > > CPUState *env = cpu_single_env; > > > >- if (kvm_enabled()) { > >- qemu_kvm_notify_work(); > >- return; > >- } > >- > > qemu_event_increment (); > > if (env) { > > cpu_exit(env); > > qemu_event_increment() is indeed equivalent, but what about the > rest? Are we guaranteed that cpu_single_env == NULL? No, its not NULL. But env->current is, so its fine.