qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Vincenzo Maffione <v.maffione@gmail.com>
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Luigi Rizzo" <rizzo@iet.unipi.it>,
	"Jason Wang" <jasowang@redhat.com>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Giuseppe Lettieri" <g.lettieri@iet.unipi.it>,
	lersek@redhat.com, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v3] e1000: add interrupt mitigation support
Date: Tue, 30 Jul 2013 12:44:12 +0200	[thread overview]
Message-ID: <20130730104412.GD14452@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CA+_eA9huTzjq7+ZGEJxSrpfF88cjasFmhmm9OTsOsA_wsBoV8w@mail.gmail.com>

On Mon, Jul 29, 2013 at 04:46:22PM +0200, Vincenzo Maffione wrote:
> Actually it's not always zero because
> 
> - presave() calls e1000_mit_timer(), which sets mit_timer_on to 0 and
> calls set_interrupt_cause(ICR);
> 
> - if there are pending events, set_interrupt_cause(ICR) detects a
> raising edge, and doesn't filter out the interrupt since mit_timer_on
> == 0. Therefore, the timer is reloaded and mit_timer_on is set to 1.
> 
> However, I've just realized that this is a mistake, since it would
> need the post_load() to call qemu_mod_timer() when
> mit_timer_on is migrated as "1", otherwise the interrupt delivery
> would deadlock on the migrated system.
> 
> I think it's way better not to migrate mit_timer_on, so that the
> migrated system sees mit_timer_on==0  and doesn't need to call
> qemu_mod_timer() in post_load(). The first interrupt request
> (set_interrupt_cause()) will cause an immediate interrupt.

Thanks for explaining.  I agree that it's simpler to avoid migrating
mit_timer_on.

Stefan

      reply	other threads:[~2013-07-30 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26 15:02 [Qemu-devel] [PATCH v3] e1000: add interrupt mitigation support Vincenzo Maffione
2013-07-29 14:23 ` Stefan Hajnoczi
2013-07-29 14:46   ` Vincenzo Maffione
2013-07-30 10:44     ` Stefan Hajnoczi [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=20130730104412.GD14452@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=g.lettieri@iet.unipi.it \
    --cc=jasowang@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rizzo@iet.unipi.it \
    --cc=v.maffione@gmail.com \
    /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).