Il 27/06/2014 04:08, Le Tan ha scritto:
1. In struct IOMMUTLBEntry, I think the addr_mask field should be the
mask of the page offset, right? But I see different usages of this
field. In spapr_tce_translate_iommu(), the addr_mask field is assigned
with the mask of the page offset. However, in pbm_translate_iommu(),
in the passthrough case, the addr_mask field seems to be assigned the
mask of the page number. Is there any problem here?

The intended usage is the one of spapr_tce_translate_iommu(). In practice it doesn't matter, both work.

2. For q35, how to identify origination of DMA requests? The VT-d
manual says we should use source-id(for PCI-Express devices, it is
requester identifier) to map devices to domains. What is the related
part in QEMU? Where can I get the source-id of a DMA request?

You need to create a different AddressSpace for each PCI bus or device.

Paolo

Reply via email to