qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v11 14/28] intel_iommu: Add support for PCI MSI


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH v11 14/28] intel_iommu: Add support for PCI MSI remap
Date: Thu, 14 Jul 2016 13:23:05 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

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

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