* [PATCH] fix userspace irqchip.
@ 2009-09-03 23:41 Glauber Costa
2009-09-06 8:50 ` Gleb Natapov
0 siblings, 1 reply; 4+ messages in thread
From: Glauber Costa @ 2009-09-03 23:41 UTC (permalink / raw)
To: kvm; +Cc: avi, Gleb Natapov
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 <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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fix userspace irqchip.
2009-09-03 23:41 [PATCH] fix userspace irqchip Glauber Costa
@ 2009-09-06 8:50 ` Gleb Natapov
2009-09-06 12:34 ` Glauber Costa
0 siblings, 1 reply; 4+ messages in thread
From: Gleb Natapov @ 2009-09-06 8:50 UTC (permalink / raw)
To: Glauber Costa; +Cc: kvm, avi
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix userspace irqchip.
2009-09-06 8:50 ` Gleb Natapov
@ 2009-09-06 12:34 ` Glauber Costa
2009-09-06 13:19 ` Gleb Natapov
0 siblings, 1 reply; 4+ messages in thread
From: Glauber Costa @ 2009-09-06 12:34 UTC (permalink / raw)
To: Gleb Natapov; +Cc: Glauber Costa, kvm, avi
On Sun, Sep 6, 2009 at 5:50 AM, Gleb Natapov<gleb@redhat.com> wrote:
> 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.
Fedora guests don't boot.
>> 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.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix userspace irqchip.
2009-09-06 12:34 ` Glauber Costa
@ 2009-09-06 13:19 ` Gleb Natapov
0 siblings, 0 replies; 4+ messages in thread
From: Gleb Natapov @ 2009-09-06 13:19 UTC (permalink / raw)
To: Glauber Costa; +Cc: Glauber Costa, kvm, avi
On Sun, Sep 06, 2009 at 09:34:38AM -0300, Glauber Costa wrote:
> On Sun, Sep 6, 2009 at 5:50 AM, Gleb Natapov<gleb@redhat.com> wrote:
> > 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.
>
> Fedora guests don't boot.
>
Which one? I tested F10 live cd and F11 beta (both 32 bit). They work
fine here with userspace irq chip.
> >> 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.
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
>
>
> --
> Glauber Costa.
> "Free as in Freedom"
> http://glommer.net
>
> "The less confident you are, the more serious you have to act."
--
Gleb.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-06 13:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03 23:41 [PATCH] fix userspace irqchip Glauber Costa
2009-09-06 8:50 ` Gleb Natapov
2009-09-06 12:34 ` Glauber Costa
2009-09-06 13:19 ` Gleb Natapov
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.