On Fri, 11 Nov 2022 at 18:35, Alex Bennée <alex.ben...@linaro.org> wrote:
>
> This is simulating a bus master writing data back into system memory.
> Mark it as such.
>
> Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
> ---
>  hw/audio/intel-hda.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
> index f38117057b..95c28b315c 100644
> --- a/hw/audio/intel-hda.c
> +++ b/hw/audio/intel-hda.c
> @@ -345,7 +345,7 @@ static void intel_hda_corb_run(IntelHDAState *d)
>
>  static void intel_hda_response(HDACodecDevice *dev, bool solicited, uint32_t 
> response)
>  {
> -    const MemTxAttrs attrs = { .memory = true };
> +    const MemTxAttrs attrs = { .requester_type = MTRT_PCI, .memory = true };

This doesn't look right -- it says "the requester_id field
is a PCI requester ID" but it doesn't fill in requester_id.


>      HDACodecBus *bus = HDA_BUS(dev->qdev.parent_bus);
>      IntelHDAState *d = container_of(bus, IntelHDAState, codecs);
>      hwaddr addr;

What breaks if we don't set this? Put another way, why do
we need to change this but not all the other PCI device models that
do DMA writes, most of which use MEMTXATTRS_UNSPECIFIED ?

I wonder if stl_le_pci_dma() and friends should set the
requester_id on the attrs that they are passed ?

-- PMM

Reply via email to