qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Li Qiang <liq3ea@163.com>
Cc: pbonzini@redhat.com, liq3ea@gmail.com, qemu-devel@nongnu.org,
	mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] ioapic: clear irq_eoi when updating the ioapic redirect table entry
Date: Tue, 25 Jun 2019 10:29:20 +0800	[thread overview]
Message-ID: <20190625022920.GA9750@xz-x1> (raw)
In-Reply-To: <20190624151635.22494-1-liq3ea@163.com>

On Mon, Jun 24, 2019 at 08:16:35AM -0700, Li Qiang wrote:
> irq_eoi is used to count the number of irq injected during eoi
> broadcast. It should be set to 0 when updating the ioapic's redirect
> table entry.
> 
> Suggested-by: Peter Xu <peterx@redhat.com>
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
>  hw/intc/ioapic.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c
> index 7074489fdf..db9e518602 100644
> --- a/hw/intc/ioapic.c
> +++ b/hw/intc/ioapic.c
> @@ -380,6 +380,7 @@ ioapic_mem_write(void *opaque, hwaddr addr, uint64_t val,
>                  /* restore RO bits */
>                  s->ioredtbl[index] &= IOAPIC_RW_BITS;
>                  s->ioredtbl[index] |= ro_bits;
> +                s->irq_eoi[index] = 0;

It'll be cleared for twice for each ioapic entry because it only
supports 32bit write to these registers.  Though it seems fine, e.g.,
when the guest only want to update the vector info we should still
clear it:

Reviewed-by: Peter Xu <peterx@redhat.com>

>                  ioapic_fix_edge_remote_irr(&s->ioredtbl[index]);
>                  ioapic_service(s);
>              }
> -- 
> 2.17.1
> 
> 

Regards,

-- 
Peter Xu


  reply	other threads:[~2019-06-25  2:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 15:16 [Qemu-devel] [PATCH] ioapic: clear irq_eoi when updating the ioapic redirect table entry Li Qiang
2019-06-25  2:29 ` Peter Xu [this message]
2019-06-25  8:01 ` Paolo Bonzini

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=20190625022920.GA9750@xz-x1 \
    --to=peterx@redhat.com \
    --cc=liq3ea@163.com \
    --cc=liq3ea@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).