qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] De-assert ISA PIC IRQs properly
Date: Thu, 21 Aug 2008 05:15:21 +0200	[thread overview]
Message-ID: <20080821031521.GH3371@volta.aurel32.net> (raw)
In-Reply-To: <48AC3535.2080506@siemens.com>

On Wed, Aug 20, 2008 at 05:16:05PM +0200, Jan Kiszka wrote:
> [ Taking latest isapc changes into account. ]

Applied, thanks.

> In case the PIC IRQ gets de-asserted on an isapc machine, we also have
> to reset CPU_INTERRUPT_HARD. This is what older qemu (before the
> routing-through-APIC changes) used to do as well.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  hw/pc.c |   10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> Index: b/hw/pc.c
> ===================================================================
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -118,17 +118,19 @@ static void pic_irq_request(void *opaque
>  {
>      CPUState *env = first_cpu;
>  
> -    if (!level)
> -        return;
> -
>      if (env->apic_state) {
> +        if (!level)
> +            return;
>          while (env) {
>              if (apic_accept_pic_intr(env))
>                  apic_local_deliver(env, APIC_LINT0);
>              env = env->next_cpu;
>          }
>      } else {
> -        cpu_interrupt(env, CPU_INTERRUPT_HARD);
> +        if (level)
> +            cpu_interrupt(env, CPU_INTERRUPT_HARD);
> +        else
> +            cpu_reset_interrupt(env, CPU_INTERRUPT_HARD);
>      }
>  }
>  
> 
> 
> 

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

  reply	other threads:[~2008-08-21  3:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18 15:43 [Qemu-devel] [RESEND][PATCH] De-assert PIC IRQs properly at APIC level Jan Kiszka
2008-08-20 15:16 ` [Qemu-devel] [PATCH 1/2] De-assert ISA PIC IRQs properly Jan Kiszka
2008-08-21  3:15   ` Aurelien Jarno [this message]
2008-08-20 15:16 ` [Qemu-devel] [PATCH 2/2] De-assert PIC IRQs properly at APIC level Jan Kiszka
2008-08-21  3:15   ` Aurelien Jarno

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=20080821031521.GH3371@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).