On Wed, Jul 13, 2016 at 04:17:01PM +0300, David Kiarie wrote:

[...]

> > +static MemTxResult vtd_mem_ir_read(void *opaque, hwaddr addr,
> > +                                   uint64_t *data, unsigned size,
> > +                                   MemTxAttrs attrs)
> > +{
> > +    addr += VTD_INTERRUPT_ADDR_FIRST;
> > +
> > +    VTD_DPRINTF(IR, "read mem_ir addr 0x%"PRIx64 " size %u",
> > +                addr, size);
> > +
> > +    if (dma_memory_read(&address_space_memory, addr, &data, size)) {
> > +        VTD_DPRINTF(GENERAL, "error: fail to access 0x%"PRIx64, addr);
> > +        return MEMTX_ERROR;
> > +    }
> > +
> > +    return MEMTX_OK;
> > +}
> 
> I'm looking at this and wondering whether dma_memory_read expected a
> double pointer as the third argument. (??)

Right. It's dangerous and should never be touched. Maybe I should keep
this an empty function, just like what APIC is doing. Read at
address_space_memory is odd here in all cases...

Thanks, David.

-- peterx

Reply via email to