qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Compile dma only once


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH] Compile dma only once
Date: Sun, 30 May 2010 01:13:08 +0100
User-agent: KMail/1.13.3 (Linux/2.6.33-2-amd64; KDE/4.4.3; x86_64; ; )

> On Fri, May 28, 2010 at 7:34 PM, Paul Brook <address@hidden> wrote:
> >> Use a qemu_irq to request CPU exit.
> > 
> > Needing to request a CPU exit at all is just wrong. See previous
> > discussions about how any use of qemu_bh_schedule_idle is fundamentally
> > broken.
> 
> I agree for the device case. Is the attached patch then OK?

No. You can't remove code without understanding why it was there in the first 
place.  I'm pretty sure this will break FDC emulation, or at least make it 
unfeasibly slow.

The underlying problem is that devices (in particular the FDC) don't 
communicate properly with the DMA engine.  Instead they rely on the DMA device 
polling state at poorly defined intervals.  Removing DMA_schedule without 
removing qemu_bh_schedule_idle is almost certainly wrong.

My main objection to you original patch is that it introduces a new API for 
something that is just plain wrong. At minimum it needs a comment documenting 
that this function should never be used for anything - It only exists because 
we're too lazy to fix legacy code.

> But what about other uses (with the patch applied):

I was just referring to device emulation.

qemu_notify_event is also pretty bogus.  It is a horrible hack to workaround 
deficiencies in the network API.

Paul



reply via email to

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