All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com
Subject: [PATCH 1/4] avoid halted state for in kernel irqchip
Date: Wed,  3 Jun 2009 14:25:41 -0400	[thread overview]
Message-ID: <1244053544-12074-2-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1244053544-12074-1-git-send-email-glommer@redhat.com>

This patch is part of a series that tries to provide
a kvm-free apic implementation. In the last interation,
Jan pointed out that halted state management with in kernel
irqchip gets quite messy. I don't disagree.

It broke this series specifically, as init IPIs had the
halted state set. The solution would be to rework halted
state management. But I'm too lazy. Besides, gleb told me
he would do it, which makes it his problem, not mine. ;-)

This patch can be used to bypass the problem entirely:
if kvm apic do not call apic_init_ipi, but a version of it
that does everything but mangling around with cpu states,
the problem becomes a non issue, and my glorious series
can be applied.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 hw/apic.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/apic.c b/hw/apic.c
index 86aa6b6..862289d 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -443,8 +443,7 @@ static void apic_get_delivery_bitmask(uint32_t *deliver_bitmask,
     }
 }
 
-
-static void apic_init_ipi(APICState *s)
+static void apic_init_ipi_state(APICState *s)
 {
     int i;
 
@@ -466,6 +465,11 @@ static void apic_init_ipi(APICState *s)
     s->next_time = 0;
 
     cpu_reset(s->cpu_env);
+}
+
+static void apic_init_ipi(APICState *s)
+{
+    apic_init_ipi_state(s);
 
     if (!(s->apicbase & MSR_IA32_APICBASE_BSP) &&
         (!kvm_enabled() || !qemu_kvm_irqchip_in_kernel()))
-- 
1.5.6.6


  reply	other threads:[~2009-06-03 18:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 18:25 [PATCH 0/4] kvm free implementation of apic/ioapic Glauber Costa
2009-06-03 18:25 ` Glauber Costa [this message]
2009-06-03 18:25   ` [PATCH 2/4] sipi and init: move common code Glauber Costa
2009-06-03 18:25     ` [PATCH 3/4] provide a kvm-free implementation of apic Glauber Costa
2009-06-03 18:25       ` [PATCH 4/4] provide a kvm-free implementation of ioapic Glauber Costa
2009-06-03 19:53     ` [PATCH 2/4] sipi and init: move common code Gleb Natapov
2009-06-03 21:11       ` Glauber Costa
2009-06-03 19:50   ` [PATCH 1/4] avoid halted state for in kernel irqchip Gleb Natapov
2009-06-03 21:10     ` Glauber Costa
2009-06-03 19:32 ` [PATCH 0/4] kvm free implementation of apic/ioapic Jan Kiszka
2009-06-03 21:19 [PATCH 0/4] apic/ioapic kvm free implementation Glauber Costa
2009-06-03 21:19 ` [PATCH 1/4] avoid halted state for in kernel irqchip Glauber Costa

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=1244053544-12074-2-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=avi@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.