qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] e1000/rtl8139: forbid dealing with packets when


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] e1000/rtl8139: forbid dealing with packets when VM is paused
Date: Tue, 6 May 2014 14:55:50 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Apr 28, 2014 at 03:22:34AM +0000, Zhanghailiang wrote:
> > On Sat, Apr 26, 2014 at 9:04 PM, Peter Maydell <address@hidden>
> > wrote:
> > > On 26 April 2014 11:44, Amos Kong <address@hidden> wrote:
> > >>
> > >> I'm ok with the patch idea.
> > >>
> > >> On Sat, Apr 26, 2014 at 06:19:12PM +0800, zhanghailiang wrote:
> > >>> For e1000/rtl8139, qemu can still send/receive packets when VM is
> > paused.
> > >>
> > ^^^^^^^^^
> > >>                                                            ->
> > isn't
> > >> running
> > >>
> > >> There are many kinds of RunState, "is paused" doesn't equal to "isn't
> > running".
> > >>
> > >>> If this happened in *migration's* last PAUSE VM stage, the new dirty RAM
> > related to the packets will be missed.
> > >>> To avoid this, do things like virtio-net, forbid sending/receiving
> > >>> packets when VM is suspend.
> > >>                   ^^^^^^^^^^^  -> isn't running.
> > >
> > > Shouldn't this be handled in the generic net code rather than
> > > requiring every ethernet device model to include identical code?
> > >
> > 
> > +1.
> > 
> > > thanks
> > > -- PMM
> > >
> Hi,
> Thanks for replying.
> It is a good idea to handle the VM runstate check in generic net code.
> Before send such a patch, I will look into other network cards emulated by 
> qemu, and test if they have the same problem.

Yes, please!

virtio-net has a partial solution, it listens for VM runstate changes.
But it's a bit buggy because it does not flush the peer's queue when
runstate changes back to running.

If you implement this in the net layer then that problem is easy to
resolve since we can flush all queues when the guest resumes to get
packets flowing again.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]