From: Gleb Natapov <gleb@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH] fix userspace irqchip.
Date: Sun, 6 Sep 2009 11:50:03 +0300 [thread overview]
Message-ID: <20090906085003.GB27325@redhat.com> (raw)
In-Reply-To: <1252021260-28941-1-git-send-email-glommer@redhat.com>
On Thu, Sep 03, 2009 at 07:41:00PM -0400, Glauber Costa wrote:
> It is broken since main loop reorganization. (6185d8b6)
>
What is broken? Boots WindowsXp for me here.
> Problem is that we, the emulator, has nothing to do with the CPU flags. has_work()
> should not depend on that at all.
IF_MASK flags is set into env->eflags on each exit by function just
above kvm_arch_has_work() and contains valid and relevant information.
The check your are removing should be there. It ensures that interrupts
are ignored if they are blocked by vcpu.
>
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> CC: Gleb Natapov <gleb@redhat.com>
> ---
> 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;
> }
> --
> 1.6.2.2
--
Gleb.
next prev parent reply other threads:[~2009-09-06 8:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 23:41 [PATCH] fix userspace irqchip Glauber Costa
2009-09-06 8:50 ` Gleb Natapov [this message]
2009-09-06 12:34 ` Glauber Costa
2009-09-06 13:19 ` Gleb Natapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090906085003.GB27325@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=glommer@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.