From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] Call mask notifiers from pic.
Date: Wed, 14 Jul 2010 14:11:31 -0300 [thread overview]
Message-ID: <20100714171131.GF1100@amt.cnet> (raw)
In-Reply-To: <20100714162831.GL4689@redhat.com>
On Wed, Jul 14, 2010 at 07:28:31PM +0300, Gleb Natapov wrote:
> If pit delivers interrupt while pic is masking it OS will never do EOI
> and ack notifier will not be called so when pit will be unmasked no pit
> interrupts will be delivered any more. Calling mask notifiers solves this
> issue.
>
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
> index 819b748..80d98cd 100644
> --- a/arch/x86/kvm/i8259.c
> +++ b/arch/x86/kvm/i8259.c
> @@ -363,10 +363,18 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val)
> }
> } else
> switch (s->init_state) {
> - case 0: /* normal mode */
> + case 0: { /* normal mode */
> + u8 imr_diff = s->imr ^ val;
> s->imr = val;
> + for (irq = 0; irq < PIC_NUM_PINS/2; irq++)
> + if (imr_diff & (1 << irq))
> + kvm_fire_mask_notifiers(
> + s->pics_state->kvm,
> + SELECT_PIC(irq), irq,
> + !!(s->imr & (1 << irq)));
irqchip/pin parameters are wrong for PIC_SLAVE.
prev parent reply other threads:[~2010-07-14 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-14 16:28 [PATCH] Call mask notifiers from pic Gleb Natapov
2010-07-14 17:11 ` Marcelo Tosatti [this message]
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=20100714171131.GF1100@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=gleb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox