From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 1/2] qemu-kvm: use usptream eventfd code Date: Wed, 08 Sep 2010 11:25:14 +0300 Message-ID: <4C87486A.7090908@redhat.com> References: <20100906202015.433641568@amt.cnet> <20100906202301.291967128@amt.cnet> <4C85F60C.3060700@redhat.com> <20100907172503.GA10311@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Anthony Liguori To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64184 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758456Ab0IHIZT (ORCPT ); Wed, 8 Sep 2010 04:25:19 -0400 In-Reply-To: <20100907172503.GA10311@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 09/07/2010 08:25 PM, Marcelo Tosatti wrote: > 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. Ok, thanks. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.