From patchwork Thu Sep 3 23:41:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 45453 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n83NEgnh022865 for ; Thu, 3 Sep 2009 23:14:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932492AbZICXOh (ORCPT ); Thu, 3 Sep 2009 19:14:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932475AbZICXOh (ORCPT ); Thu, 3 Sep 2009 19:14:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49768 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932466AbZICXOg (ORCPT ); Thu, 3 Sep 2009 19:14:36 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n83NEdBQ001269 for ; Thu, 3 Sep 2009 19:14:39 -0400 Received: from localhost.localdomain (virtlab1.virt.bos.redhat.com [10.16.72.21]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n83NEcix032535; Thu, 3 Sep 2009 19:14:38 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com, Gleb Natapov Subject: [PATCH] fix userspace irqchip. Date: Thu, 3 Sep 2009 19:41:00 -0400 Message-Id: <1252021260-28941-1-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org It is broken since main loop reorganization. (6185d8b6) Problem is that we, the emulator, has nothing to do with the CPU flags. has_work() should not depend on that at all. Signed-off-by: Glauber Costa CC: Gleb Natapov --- qemu-kvm-x86.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index f80d82b..66ed6b5 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1393,9 +1393,8 @@ void kvm_arch_post_kvm_run(void *opaque, CPUState *env) int kvm_arch_has_work(CPUState *env) { - if (((env->interrupt_request & CPU_INTERRUPT_HARD) && - (env->eflags & IF_MASK)) || - (env->interrupt_request & CPU_INTERRUPT_NMI)) + if (((env->interrupt_request & CPU_INTERRUPT_HARD) || + (env->interrupt_request & CPU_INTERRUPT_NMI))) return 1; return 0; }