qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: DMA timeouts running a FreeBSD guest with last CVS snap


From: Carlo Marcelo Arenas Belon
Subject: [Qemu-devel] Re: DMA timeouts running a FreeBSD guest with last CVS snapshot
Date: Tue, 23 Jan 2007 04:40:42 -0600
User-agent: Mutt/1.4.1i

On Mon, Jan 22, 2007 at 11:55:11AM +0100, Aurelien Jarno wrote:
> Carlo Marcelo Arenas Belon a écrit :
> > 
> > The following patch moves the initialization of bm->cur_addr to match 
> > FreeBSD behavior while being also compatible with all other guests
> > 

the following snippet kept the initialization of bm->cur_addr inside the
ide_dma_start function as a failback as that is where it conceptually belongs.

that is not needed though, as the initialization of bm->addr and also
bm->cur_addr is now done when the address for DMA is send to the emulated
PIIX.

> > Index: hw/ide.c
> > ===================================================================
> > RCS file: /sources/qemu/qemu/hw/ide.c,v
> > retrieving revision 1.51
> > diff -u -r1.51 ide.c
> > --- hw/ide.c        20 Jan 2007 01:12:17 -0000      1.51
> > +++ hw/ide.c        22 Jan 2007 09:50:20 -0000
> > @@ -2230,10 +2230,11 @@
> >          return;
> >      bm->ide_if = s;
> >      bm->dma_cb = dma_cb;
> > -    bm->cur_addr = bm->addr;
> >      bm->cur_prd_last = 0;
> >      bm->cur_prd_addr = 0;
> >      bm->cur_prd_len = 0;
> > +    if (bm->cur_addr != bm->addr)
> > +        bm->cur_addr = bm->addr;
> 
> Why using a condition here? This will probably be slower than doing
> bm->cur_addr = bm->addr and the result is the same.

as I mentioned before, this initialization is not even needed, but I
kept it as a way to keep the original logic that used this function to setup
all initial values for the DMA.

in retrospective though I can see why it was a bad idea and confusing, so I'd
prepared version 2 of the patch that removes this and eliminates your concern
as well.

thanks,

Carlo




reply via email to

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